Merge branch 'master' of github.com:fbt/watchman-services

This commit is contained in:
Jack L. Frost 2014-07-28 02:09:33 +04:00
commit b4d3135878
3 changed files with 30 additions and 3 deletions

24
init.d/nginx Executable file
View File

@ -0,0 +1,24 @@
#!/usr/bin/env watchman
service_command='/usr/bin/nginx'
service_pidfile='/run/nginx.pid'
nginx.test_config() { "$service_command" -tq; }
reload() {
nginx.test_config || {
watchman.err "Nginx config test failed, not reloading."
return 1
}
watchman.reload
}
restart() {
nginx.test_config || {
watchman.err "Nginx config test failed, not restarting."
return 1
}
stop; start
}

4
init.d/ntpd → init.d/ntp Executable file → Normal file
View File

@ -1,7 +1,5 @@
#!/usr/bin/env watchman #!/usr/bin/env watchman
cfg_ntpd_config='/etc/ntp.conf'
service_respawn='true' service_respawn='true'
service_command='/bin/ntpd' service_command='/bin/ntpd'
service_args="-c $cfg_ntpd_config -n" service_args='-n'

5
init.d/openntpd Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env watchman
service_respawn='true'
service_command='/bin/ntpd'
service_args='-d'