Skip to content

Instantly share code, notes, and snippets.

@lbp0200
Created May 30, 2018 15:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lbp0200/99002e341d748ce1dab54c3720fc7578 to your computer and use it in GitHub Desktop.
Save lbp0200/99002e341d748ce1dab54c3720fc7578 to your computer and use it in GitHub Desktop.
服务托管openrc下的polipo
#!/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