summaryrefslogtreecommitdiffstats
path: root/unmaintained/yaws/yaws.initd
diff options
context:
space:
mode:
Diffstat (limited to 'unmaintained/yaws/yaws.initd')
-rwxr-xr-xunmaintained/yaws/yaws.initd52
1 files changed, 52 insertions, 0 deletions
diff --git a/unmaintained/yaws/yaws.initd b/unmaintained/yaws/yaws.initd
new file mode 100755
index 000000000..5867acf5a
--- /dev/null
+++ b/unmaintained/yaws/yaws.initd
@@ -0,0 +1,52 @@
+#!/sbin/runscript
+#
+# Startup script for the Yaws Web Server (for Alpine Linux)
+#
+# config: /etc/conf.d/yaws
+#
+# description: yaws - Erlang enabled http server
+#
+# use: rc-update add yaws default
+#
+
+yaws=/usr/bin/yaws
+
+# By default we run with the default id
+# idopts="--id myserverid"
+
+conf="--conf /etc/yaws/yaws.conf"
+
+extra_started_commands="restart reload"
+extra_commands="query"
+
+depend() {
+ need net
+}
+
+
+start() {
+ ebegin "Starting yaws "
+ ${yaws} --daemon --heart ${conf}
+ eend $?
+}
+
+
+stop() {
+ ebegin "Stopping yaws "
+ ${yaws} --stop ${idopts}
+ eend $? "Failed to stop yaws"
+}
+
+
+reload() {
+ ebegin "Reloading yaws "
+ ${yaws} --hup ${idopts}
+ eend $? "Failed to reload yaws"
+}
+
+query() {
+ ebegin "Querying yaws "
+ ${yaws} --status ${idopts}
+ eend $?
+}
+