Created
May 30, 2018 15:22
-
-
Save lbp0200/99002e341d748ce1dab54c3720fc7578 to your computer and use it in GitHub Desktop.
服务托管openrc下的polipo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/sbin/openrc-run | |
pidfile="/run/$RC_SVCNAME.pid" | |
command="/usr/bin/polipo" | |
config="/etc/polipo.conf" | |
depend() { | |
need net | |
} | |
start() { | |
ebegin "Starting polipo" | |
start-stop-daemon --start --background \ | |
--exec $command \ | |
--make-pidfile --pidfile $pidfile \ | |
-- -c $config | |
eend $? | |
} | |
stop() { | |
ebegin "Stopping polipo" | |
start-stop-daemon --stop \ | |
--exec $command \ | |
--pidfile $pidfile | |
eend $? | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment