forked from Spark/ssm-services
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env watchman
|
||||
#!/usr/bin/env ssm
|
||||
|
||||
privoxy_username='privoxy'
|
||||
privoxy_configfile='/etc/privoxy/config'
|
||||
@@ -7,16 +7,6 @@ privoxy_configfile='/etc/privoxy/config'
|
||||
service_command='/usr/bin/privoxy'
|
||||
service_args=( --no-daemon --user "$privoxy_username" "$privoxy_configfile" )
|
||||
|
||||
privoxy::configtest() {
|
||||
pre_restart() {
|
||||
"$service_command" --config-test "${service_args[@]}"
|
||||
}
|
||||
|
||||
restart() {
|
||||
privoxy::configtest || {
|
||||
watchman.err "Config test failed, not restarting!"
|
||||
return 1
|
||||
}
|
||||
|
||||
watchman.stop
|
||||
watchman.start
|
||||
}
|
||||
|
Reference in New Issue
Block a user