File: yaws.init

package info (click to toggle)
yaws 2.1.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 8,012 kB
  • sloc: erlang: 42,153; sh: 2,501; javascript: 1,459; makefile: 968; ansic: 890; lisp: 79; python: 34; xml: 12; php: 1
file content (49 lines) | stat: -rw-r--r-- 857 bytes parent folder | download | duplicates (6)
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 $?
}