mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-09-02 04:11:33 +02:00
- rename yaws.init.d to yaws.initd - use tab as indent - remove install scripts - apk can handle empty dirs
53 lines
839 B
Plaintext
Executable File
53 lines
839 B
Plaintext
Executable File
#!/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 $?
|
|
}
|
|
|