Skip to content

Commit b4e441e

Browse files
committed
Fixes IRC startup issues
Error message: iniircd.py: error: Running this service as root is not recommended. Use the --setuid option to switch to an unprivileged account after startup. If you really intend to run as root, use "--setuid root".
1 parent 7f31336 commit b4e441e

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

piratebox/piratebox/init.d/piratebox

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,14 +200,14 @@ case "$1" in
200200

201201
. $CONF_IRC
202202

203-
IRC_PARMS="--daemon --motd $IRC_MOTD "
203+
IRC_PARMS="--setuid $IRC_USER --daemon --motd $IRC_MOTD "
204204

205205
if [ ! -z "$IRC_STATEDIR" ] ; then
206206
IRC_PARMS=" $IRCPARMS --statedir $IRC_STATEDIR "
207207
fi
208208

209209
log_daemon_msg "Starting Miniircd..."
210-
start-stop-daemon $IRC_USER -m -S -p $PIDFILE_IRC -x $PIRATEBOX/bin/miniircd.py -- $IRC_PARMS
210+
start-stop-daemon -m -S -p $PIDFILE_IRC -x $PIRATEBOX/bin/miniircd.py -- $IRC_PARMS
211211
log_end_msg $?
212212
fi
213213
fi

piratebox/piratebox/init.d/piratebox_alt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,13 +192,13 @@ case "$1" in
192192
#Start IRC Server
193193
if [ "$ENABLE_IRC_SERVER" = "yes" ] ; then
194194
. $CONF_IRC
195-
IRC_PARMS="--daemon --motd $IRC_MOTD "
195+
IRC_PARMS="--setuid $IRC_USER --daemon --motd $IRC_MOTD "
196196

197197
if [ ! -z "$IRC_STATEDIR" ] ; then
198198
IRC_PARMS=" $IRCPARMS --statedir $IRC_STATEDIR "
199199
fi
200200
echo "Starting Miniircd..."
201-
start-stop-daemon $IRC_USER -m -S -p $PIDFILE_IRC -x $PIRATEBOX/bin/miniircd.py -- $IRC_PARMS
201+
start-stop-daemon -m -S -p $PIDFILE_IRC -x $PIRATEBOX/bin/miniircd.py -- $IRC_PARMS
202202
echo $?
203203
fi
204204
fi

0 commit comments

Comments
 (0)