aboutsummaryrefslogtreecommitdiffstats
path: root/main/samba/samba.initd
diff options
context:
space:
mode:
Diffstat (limited to 'main/samba/samba.initd')
-rwxr-xr-x[-rw-r--r--]main/samba/samba.initd10
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