mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-12 16:06:42 +02:00
There are a couple of issues with the start-stop-daemon call in the init script, that prevent it from working with 3proxy 0.8.13: - 3proxy does not understand the --pidfile and --user options that are passed to it by start-stop-daemon (are they meant for start-stop-daemon instead?) - Since 3proxy does not write its own pidfile by default, start-stop-daemon would need the -m option, so it would create the .pid file; instead of doing that supervise-daemon is now used instead, which avoids PID files altogether - Both start-stop-daemon and supervise-daemon get confused when passing a user name starting with a number via the --user option and interpret it as a numeric UID; to avoid this, the UID/GID of the "3proxy" user/group are now fetched with ``id -u``/``id -g`` and then the correct numeric UID and GID are passed
12 lines
235 B
Bash
12 lines
235 B
Bash
#!/sbin/openrc-run
|
|
supervisor="supervise-daemon"
|
|
command="/usr/bin/3proxy"
|
|
CONFFILE=/etc/$SVCNAME/$SVCNAME.cfg
|
|
command_args="$CONFFILE"
|
|
command_user="$(id -u 3proxy):$(id -g 3proxy)"
|
|
required_files="$CONFFILE"
|
|
|
|
depend() {
|
|
need net
|
|
}
|
|
|