aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/yaws/yaws.initd
blob: 5867acf5a8e37fc1e4630393da2b818cfeee1b0c (plain)
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
50
51
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 $?
}