/usr/games/start-xpilot-ng-server is in xpilot-ng-server 1:4.7.3-2.2ubuntu1.
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 | #!/bin/bash
set -e
USER=`whoami`
PIDFILE="/run/xpilot-ng-server/xpilot-ng-server.pid"
LOGFIFO="/run/xpilot-ng-server/xpilot-ng-server.fifo"
if [ "$USER" = "xpilotng" ]; then
source /etc/default/xpilot-ng-server
test -f "$DEFAULTMAP" || exit 0
OPTIONS=""
echo $REPORTMETA |grep -iq no && OPTIONS="+reportMeta"
OPT="-noquit $OPTIONS $OTHEROPTIONS -map $DEFAULTMAP"
LOGGER="logger -p daemon.notice -t xpilot-ng-server"
rm -f $LOGFIFO ; mkfifo $LOGFIFO
/usr/games/xpilot-ng-server $OPT 2>&1 >$LOGFIFO &
echo "$!" >$PIDFILE
$LOGGER -f $LOGFIFO &
elif [ "$USER" = "root" ]; then
echo "XPilot server should not be run as root."
exit 1
else
/usr/games/xpilot-ng-server $*
fi
|