diff options
author | Nicolas Thill <nico@openwrt.org> | 2005-08-22 07:11:48 +0000 |
---|---|---|
committer | Nicolas Thill <nico@openwrt.org> | 2005-08-22 07:11:48 +0000 |
commit | 78a3bc69d8ced21c04ce7b185099bd9d541a394f (patch) | |
tree | d76860a3187384df72163ca9a0c4bee58ef45cae /openwrt/package/samba/files/samba.init | |
parent | ebcfbc5c9abe13e0c5adac3d936d42e18ce3ec47 (diff) | |
download | mtk-20170518-78a3bc69d8ced21c04ce7b185099bd9d541a394f.zip mtk-20170518-78a3bc69d8ced21c04ce7b185099bd9d541a394f.tar.gz mtk-20170518-78a3bc69d8ced21c04ce7b185099bd9d541a394f.tar.bz2 |
add samba package
SVN-Revision: 1719
Diffstat (limited to 'openwrt/package/samba/files/samba.init')
-rw-r--r-- | openwrt/package/samba/files/samba.init | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/openwrt/package/samba/files/samba.init b/openwrt/package/samba/files/samba.init new file mode 100644 index 0000000..43ab372 --- /dev/null +++ b/openwrt/package/samba/files/samba.init @@ -0,0 +1,26 @@ +#!/bin/sh + +DEFAULT=/etc/default/samba +LOG_D=/var/log/samba +RUN_D=/var/run/samba +NMBD_PID_F=$RUN_D/nmbd.pid +SMBD_PID_F=$RUN_D/smbd.pid +[ -f $DEFAULT ] && . $DEFAULT + +case $1 in + start) + mkdir -p $LOG_D + mkdir -p $RUN_D + nmbd -D $NMBD_OPTIONS + smbd -D $SMBD_OPTIONS + ;; + stop) + [ -f $SMBD_PID_F ] && kill $(cat $SMBD_PID_F) + [ -f $NMBD_PID_F ] && kill $(cat $NMBD_PID_F) + ;; + *) + echo "usage: $0 (start|stop)" + exit 1 +esac + +exit $? |