initial import
This commit is contained in:
31
daemontools/svscan.initd
Normal file
31
daemontools/svscan.initd
Normal file
@@ -0,0 +1,31 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2004 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
depend() {
|
||||
use net
|
||||
after firewall
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting service scan"
|
||||
setsid start-stop-daemon --start --exec /usr/sbin/svscan \
|
||||
--background --make-pidfile \
|
||||
--pidfile $PIDFILE -- $SERVICEFOLDER
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping service scan"
|
||||
start-stop-daemon --stop --exec /usr/sbin/svscan \
|
||||
--pidfile $PIDFILE
|
||||
eend $?
|
||||
|
||||
ebegin "Stopping service scan services"
|
||||
svc -dx $SERVICEFOLDER/* 2>/dev/null
|
||||
eend $?
|
||||
|
||||
ebegin "Stopping service scan logging"
|
||||
svc -dx $SERVICEFOLDER/*/log 2>/dev/null
|
||||
eend $?
|
||||
}
|
||||
Reference in New Issue
Block a user