Initial commit.

This commit is contained in:
Sergey Fedosov
2016-09-03 22:35:07 +03:00
commit 9177854a27
12 changed files with 1057 additions and 0 deletions

14
services/init.d/cronpl Executable file
View File

@@ -0,0 +1,14 @@
#!/opt/bin/watchman
# named init script for watchman
ROOTDIR='/share/MD0_DATA/.qpkg/Optware'
service_command="${ROOTDIR}/etc/cron.pl"
service_respawn=true
service_logfile='/share/Public/logs/cron.pl.log'
unset reload status
start() {
while [ ! -x /opt/bin/perl ]; do sleep 1; done
watchman.start
}

18
services/init.d/named Executable file
View File

@@ -0,0 +1,18 @@
#!/opt/bin/watchman
# named init script for watchman
ROOTDIR='/share/MD0_DATA/.qpkg/Optware'
service_command="${ROOTDIR}/etc/named/named.fucked"
service_respawn=true
service_logfile='/share/Public/logs/named/named.log'
unset reload
start() {
while [ ! -x /opt/sbin/named ]; do sleep 1; done
watchman.start
}
status() {
/opt/sbin/rndc -s 127.0.0.1 status
}

24
services/init.d/openvpn Executable file
View File

@@ -0,0 +1,24 @@
#!/opt/bin/watchman
# openvpn init script for watchman
ROOTDIR='/share/MD0_DATA/.qpkg/Optware'
service_command="/usr/sbin/openvpn"
service_respawn=true
service_args=(${ROOTDIR}/etc/openvpn/dia/dia.ovpn)
#service_pidfile="${ROOTDIR}/var/run/openvpndia.pid"
service_logfile='/share/Public/logs/openvpn/openvpndia.log'
unset reload
start(){
while [ ! -e /lib/modules/others/tun.ko ]; do sleep 1; done
while [ ! -x /usr/sbin/openvpn ]; do sleep 1; done
while [ ! -e ${ROOTDIR}/etc/openvpn/dia/dia.ovpn ]; do sleep 1; done
while [ $(lsmod|grep tun|wc -l) != 1 ]; do insmod /lib/modules/others/tun.ko; sleep 1; done
watchman.start
}
status() {
kill -USR2 $(< $service_pidfile)
}