21
homedir/.config/watchman/init.d/privoxy
Executable file
21
homedir/.config/watchman/init.d/privoxy
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env watchman
|
||||
|
||||
privoxy_configfile="$HOME/.config/privoxy/config"
|
||||
|
||||
service_respawn='true'
|
||||
service_command='/usr/bin/privoxy'
|
||||
service_args=( --no-daemon "$privoxy_configfile" )
|
||||
|
||||
privoxy::configtest() {
|
||||
"$service_command" --config-test "${service_args[@]}"
|
||||
}
|
||||
|
||||
restart() {
|
||||
privoxy::configtest || {
|
||||
watchman.err "Config test failed, not restarting!"
|
||||
return 1
|
||||
}
|
||||
|
||||
stop
|
||||
start
|
||||
}
|
Reference in New Issue
Block a user