/usr/lib/bosixnet/webui_launcher is in bosixnet-webui 1.6-2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
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 | #!/bin/bash
# Config file
CONF_FILE="/etc/bosixnet/bosixnet-webui.conf"
# If this script is run as root, switch to the specific user
USERID=bosixnet
GROUPID=bosixnet
# TCP port to which to bind on localhost
FCGIPORT=33169
# Number of children to spawn
FCGI_CHILDREN=1
# ABSOLUTE path to the spawn-fcgi binary
SPAWNFCGI="/usr/bin/spawn-fcgi"
# ABSOLUTE path to the program binary
FCGIPROGRAM="/usr/bin/bosixnet_webui"
# Read settings from config file if it exists
[ -e "${CONF_FILE}" ] && . "${CONF_FILE}"
# Check if user exists
if ! id -u ${USERID} >/dev/null 2>&1; then
echo ;
echo "User ${USERID} does not exist! Check what you use the correct USERID."
exit 1
fi
# Check if gruop exists
if ! id -g ${GROUPID} >/dev/null 2>&1; then
echo ;
echo "Group ${GROUPID} does not exist! Check what you use the correct GROUPID."
exit 1
fi
# Check the number of children for spawning
[ x${FCGI_CHILDREN} = x ] && FCGI_CHILDREN=5
# Launch program
if [ x${UID} = x0 ]; then
EX="${SPAWNFCGI} -p ${FCGIPORT} -f ${FCGIPROGRAM} -u ${USERID} -g ${GROUPID} -C ${FCGI_CHILDREN}"
else
EX="${SPAWNFCGI} -p ${FCGIPORT} -f ${FCGIPROGRAM} -C ${FCGI_CHILDREN}"
fi
# Clean the environment and set up a new one
env - ${E} ${EX} >/dev/null 2>&1
|