diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2013-04-30 13:25:54 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-04-30 13:36:47 +0200 |
commit | 7367b78628577d330d9c5aa14f752a97cfd18f89 (patch) | |
tree | 7e177b345b2891a5e6fd04678217848836403c94 /main/samba/samba.initd | |
parent | 82996f6d17d73247734e5b1d84f8fd4d81e936d2 (diff) | |
download | aports-7367b78628577d330d9c5aa14f752a97cfd18f89.tar.bz2 aports-7367b78628577d330d9c5aa14f752a97cfd18f89.tar.xz |
main/samba: create piddir from init.d script
Diffstat (limited to 'main/samba/samba.initd')
-rwxr-xr-x[-rw-r--r--] | main/samba/samba.initd | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/main/samba/samba.initd b/main/samba/samba.initd index c352f4304f..b7bef10e72 100644..100755 --- a/main/samba/samba.initd +++ b/main/samba/samba.initd @@ -7,6 +7,8 @@ if [ "$DAEMON" != "samba" ]; then daemon_list=$DAEMON fi +PIDDIR=/var/run/samba + depend() { need net after firewall @@ -18,7 +20,7 @@ start_smbd() { } stop_smbd() { - start-stop-daemon --stop --quiet --pidfile /var/run/samba/smbd.pid + start-stop-daemon --stop --quiet --pidfile ${PIDDIR}/smbd.pid } start_nmbd() { @@ -27,7 +29,7 @@ start_nmbd() { } stop_nmbd() { - start-stop-daemon --stop --quiet --pidfile /var/run/samba/nmbd.pid + start-stop-daemon --stop --quiet --pidfile ${PIDDIR}/nmbd.pid } start_winbindd() { @@ -36,10 +38,12 @@ start_winbindd() { } stop_winbindd() { - start-stop-daemon --stop --quiet --pidfile /var/run/samba/winbindd.pid + start-stop-daemon --stop --quiet --pidfile ${PIDDIR}/winbindd.pid } start() { + checkpath --directory --owner root:root \ + --mode 755 "$PIDDIR" for i in $daemon_list; do ebegin "Starting $i" start_$i |