Fix samba logging, hopefully finally!
This commit is contained in:
parent
e792992cfb
commit
03d8ec939c
6 changed files with 128 additions and 10 deletions
4
etc/init.d/.gitignore
vendored
Normal file
4
etc/init.d/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
/*
|
||||
!/.gitignore
|
||||
!/samba
|
||||
!/terraform-http-backend
|
||||
90
etc/init.d/samba
Executable file
90
etc/init.d/samba
Executable file
|
|
@ -0,0 +1,90 @@
|
|||
#!/sbin/openrc-run
|
||||
|
||||
extra_started_commands="reload"
|
||||
piddir=${piddir:-"/run/samba"}
|
||||
|
||||
DAEMON=${RC_SVCNAME#samba.}
|
||||
if [ "$DAEMON" != "$RC_SVCNAME" ]; then
|
||||
daemon_list=$DAEMON
|
||||
fi
|
||||
|
||||
depend() {
|
||||
need net
|
||||
after firewall
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
checkpath --directory "$piddir"
|
||||
}
|
||||
|
||||
start_samba() {
|
||||
start-stop-daemon --start --quiet --exec /usr/sbin/samba -- \
|
||||
${samba_options:-"-D" "-l" "/var/log/core.slackware.uk.net/today/samba"}
|
||||
}
|
||||
|
||||
stop_samba() {
|
||||
start-stop-daemon --stop --quiet --pidfile "$piddir"/samba.pid
|
||||
}
|
||||
|
||||
start_smbd() {
|
||||
start-stop-daemon --start --quiet --exec /usr/sbin/smbd -- \
|
||||
${smbd_options:-"-D"}
|
||||
}
|
||||
|
||||
stop_smbd() {
|
||||
start-stop-daemon --stop --quiet --pidfile "$piddir"/smbd.pid
|
||||
}
|
||||
|
||||
start_nmbd() {
|
||||
start-stop-daemon --start --quiet --exec /usr/sbin/nmbd -- \
|
||||
${nmbd_options:-"-D"}
|
||||
}
|
||||
|
||||
stop_nmbd() {
|
||||
start-stop-daemon --stop --quiet --pidfile "$piddir"/nmbd.pid
|
||||
}
|
||||
|
||||
start_winbindd() {
|
||||
start-stop-daemon --start --quiet --exec /usr/sbin/winbindd -- \
|
||||
${winbindd_options:-"-D"}
|
||||
}
|
||||
|
||||
stop_winbindd() {
|
||||
start-stop-daemon --stop --quiet --pidfile "$piddir"/winbindd.pid
|
||||
}
|
||||
|
||||
|
||||
start_bgqd() {
|
||||
start-stop-daemon --start --quiet --exec /usr/lib/samba/samba-bgqd -- \
|
||||
${bgqd_options:-"-D"}
|
||||
}
|
||||
|
||||
stop_bgqd() {
|
||||
start-stop-daemon --stop --quiet --pidfile "$piddir"/samba-bgqd.pid
|
||||
}
|
||||
|
||||
start() {
|
||||
for i in $daemon_list; do
|
||||
ebegin "Starting $i"
|
||||
start_$i
|
||||
eend $?
|
||||
done
|
||||
}
|
||||
|
||||
stop() {
|
||||
for i in $daemon_list; do
|
||||
ebegin "Stopping $i"
|
||||
stop_$i
|
||||
eend $?
|
||||
done
|
||||
}
|
||||
|
||||
reload() {
|
||||
for i in $daemon_list; do
|
||||
ebegin "Reloading $i"
|
||||
# bgqd binary is called samba-bgqd
|
||||
busybox killall -HUP ${i/bgqd/samba-bgqd}
|
||||
eend $?
|
||||
done
|
||||
}
|
||||
|
||||
19
etc/init.d/terraform-http-backend
Executable file
19
etc/init.d/terraform-http-backend
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
#!/sbin/openrc-run
|
||||
|
||||
depend() {
|
||||
need net
|
||||
after firewall
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting terraform-http-backend"
|
||||
source /etc/conf.d/terraform-http-backend || eend 1
|
||||
su "$TF_USER" -c "/opt/sbin/terraform-http-backend &" || eend 1
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping terraform-http-backend"
|
||||
busybox killall -TERM terraform-http-backend
|
||||
eend $?
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue