diff options
author | ScrumpyJack <scrumpyjack@st.ilet.to> | 2016-06-27 10:17:05 +0000 |
---|---|---|
committer | Carlo Landmeter <clandmeter@gmail.com> | 2016-07-04 11:42:28 +0200 |
commit | 2ff62bbb9f7b2c82a826d7b159c1bc482aa8f0bd (patch) | |
tree | 97c60fb3221dfe78cd7ccfda5db6125c81d5f676 /community/h2o/h2o.initd | |
parent | 00e8ff605f1c4f6386596f35f2a5287ff9b8bc55 (diff) | |
download | aports-2ff62bbb9f7b2c82a826d7b159c1bc482aa8f0bd.tar.bz2 aports-2ff62bbb9f7b2c82a826d7b159c1bc482aa8f0bd.tar.xz |
testing/[various]: move packages to community
Moves the packages listed below from the testing to the community
repository after successfully testing of said packages.
asciinema
at
calcurse
cmus
compton
cpio
dvd+rw-tools
fortune
fvwm
geary
h2o
heirloom-mailx
leafpad
nedit
nmh
rover
tor
torsocks
urlview
vdesk
w3m
wbar
xcalc
xclock
xeyes
xkill
Diffstat (limited to 'community/h2o/h2o.initd')
-rw-r--r-- | community/h2o/h2o.initd | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/community/h2o/h2o.initd b/community/h2o/h2o.initd new file mode 100644 index 0000000000..47e301d334 --- /dev/null +++ b/community/h2o/h2o.initd @@ -0,0 +1,45 @@ +#!/sbin/openrc-run + +extra_started_commands="reload" +extra_commands="configtest" +conffile=/etc/h2o.conf +pidfile=/var/run/h2o.pid +command=/usr/bin/h2o +command_args="-c $conffile -m master" + +depend() { + need net + after sshd + use dns logger netmount +} + +start_pre() { + configtest || return 1 +} + +start() { + ebegin "Starting h2o" + start-stop-daemon --start \ + --background \ + --pidfile ${pidfile} \ + --exec ${command} \ + -- ${command_args} + eend $? +} + +reload() { + configtest || return 1 + ebegin "Refreshing h2o configuration" + kill -HUP `cat $pidfile` &>/dev/null + eend $? "Failed to reload h2o" +} + +configtest() { + ebegin "Checking h2o configuration" + + if [ ! -f "${conffile}" ]; then + ewarn "${conffile} does not exist." + return 1 + fi +} + |