1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
#!/sbin/runscript
#
# Startup script for the Yaws Web Server (for Gentoo Linux)
#
# config: /etc/conf.d/yaws
#
# description: yaws - Erlang enabled http server
#
# use: rc-update add yaws default
#
yaws=%bindir%/yaws
# By default we run with the default id
# idopts="--id myserverid"
conf="--conf %etcdir%/yaws/yaws.conf"
extra_commands="reload query"
depend() {
need net
}
start() {
ebegin "Starting yaws "
${yaws} --daemon --heart ${idopts} ${conf}
${yaws} ${idopts} --wait-started=10
eend $?
}
stop() {
ebegin "Stopping yaws "
${yaws} ${idopts} --stop
${yaws} ${idopts} --wait-stopped=10
eend $?
}
reload() {
ebegin "Reloading yaws "
${yaws} ${idopts} --hup
eend $?
}
query() {
ebegin "Querying yaws "
${yaws} ${idopts} --status
eend $?
}
|