ssm-services/init.d/privoxy
2014-07-03 11:05:52 +04:00

23 lines
448 B
Plaintext
Executable File

#!/usr/bin/env watchman
privoxy_username='privoxy'
privoxy_configfile='/etc/privoxy/config'
service_respawn='true'
service_command='/usr/bin/privoxy'
service_args="--no-daemon --user ${privoxy_username} ${privoxy_configfile}"
privoxy::configtest() {
"${service_command}" --config-test ${service_args}
}
restart() {
privoxy::configtest || {
watchman.err "Config test failed, not restarting!"
return 1
}
watchman.stop
watchman.start
}