#!/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=%prefix%/bin/yaws idopts="--id myserverid" conf="--conf %etcdir%/yaws.conf" opts="start stop reload restart query" depend() { need net } start() { ebegin "Starting yaws " ${yaws} --daemon --heart ${idopts} ${conf} eend $? } stop() { ebegin "Stopping yaws " ${yaws} --stop ${idopts} eend $? } reload() { ebegin "Reloading yaws " ${yaws} --hup ${idopts} eend $? } query() { ebegin "Querying yaws " ${yaws} --status ${idopts} eend $? }