blob: ebd0787a7c8c3414fc40078fb07c382901bafe96 (
plain) (
blame)
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
53
54
55
56
57
58
59
60
61
62
63
64
65
|
#!/sbin/openrc-run
description="Start/stop the tipidee services"
depend()
{
after net
after localmount
}
_get_services()
{
. /etc/conf.d/tipidee
list=
if "$HTTP" ; then
if test -n "$TIPIDEED_IPv4" ; then
list="httpd-4"
fi
if test -n "$TIPIDEED_IPv6" ; then
list="$list httpd-6"
fi
fi
if "$HTTPS" ; then
if test -n "$TIPIDEED_IPV4" ; then
list="httpsd-4"
fi
if test -n "$TIPIDEED_IPV6" ; then
list="$list httpsd-6"
fi
fi
echo $list
}
stop()
{
ebegin "Stopping the tipidee services"
for i in `_get_services` ; do
s6-svunlink /run/service "$i"
done
eend $?
}
start()
{
ebegin "Starting the tipidee services"
for i in `_get_services` ; do
s6-svlink -t10000 /run/service "/var/lib/tipidee/services/$i"
done
eend $?
}
status()
{
for i in `_get_services` ; do
echo -n "${i}: "
s6-svstat "/run/service/${i}"
done
}
restart()
{
for i in `_get_services` ; do
s6-svc -rwR "/run/service/$i"
done
}
|