blob: 6bbe7eea9fb943fa78f486beac53aefb51f6a0a7 (
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
53
54
55
56
57
58
59
60
61
62
63
64
65
|
#!/sbin/openrc-run
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
command="/usr/bin/python"
command_args="/usr/bin/syncplay-server"
name="syncplay server"
pidfile="/run/syncplay-server.pid"
description="Syncplay Server to synchronize media playback"
start() {
ebegin "Starting ${name}"
args=""
if [ -n "${port}" ]; then
args="${args} --port=${port}"
fi
if [ "${isolate}" = True ]; then
args="${args} --isolate-rooms"
fi
if [ -n "${password}" ]; then
args="${args} --password=${password}"
fi
if [ -n "${salt}" ]; then
args="${args} --salt=${salt}"
fi
if [ -n "${motd}" ]; then
args="${args} --motd-file=${motd}"
fi
if [ "${noReady}" = True ]; then
args="${args} --disable-ready"
fi
if [ "${noChat}" = True ]; then
args="${args} --disable-chat"
fi
if [ -n "${maxChatLength}" ]; then
args="${args} --max-chat-message-length=${maxChatLength}"
fi
if [ -n "${usernameLength}" ]; then
args="${args} --max-username-length=${usernameLength}"
fi
if [ -n "${statsFile}" ]; then
args="${args} --stats-db-file=${statsFile}"
fi
if [ -n "${tls}" ]; then
args="${args} --tls=${tls}"
fi
start-stop-daemon --start --background --make-pid --pidfile="${pidfile}" \
--exec "${command}" -- "${command_args}" ${args}
eend $?
}
|