Skip to content

testing/3proxy: fix wrong invocation of start-stop-daemon and 3proxy in init script

Johannes Heimansberg requested to merge 0564/aports:3proxy-fix-200901 into master

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, the -m option is required for start-stop-daemon, so the .pid file is created
  • Also, the -b option needs to be passed to start-stop-daemon (and the "daemon" option must not be present in 3proxy.cfg) so that start-stop-daemon knows the actual PID of the 3proxy process, otherwise it does not use the PID of the process that 3proxy forks into the background but instead that of the parent which exits right after forking
  • start-stop-daemon gets confused when passing a user name starting with a number via the --user option and interprets 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

This fixes issue #11909 (closed).

Merge request reports