1#! @shell@ -e
2
3# Make sure that the environment is deterministic.
4export PATH=@coreutils@/bin
5
6if test "$1" = "start"; then
7 if ! @procps@/bin/pgrep ircd; then
8 if @ipv6Enabled@; then
9 while ! @iproute@/sbin/ip addr |
10 @gnugrep@/bin/grep inet6 |
11 @gnugrep@/bin/grep global; do
12 sleep 1;
13 done;
14 fi;
15 rm -rf /home/ircd
16 mkdir -p /home/ircd
17 chown ircd: /home/ircd
18 cd /home/ircd
19 env - HOME=/homeless-shelter $extraEnv \
20 @su@/bin/su ircd --shell=/bin/sh -c ' @ircdHybrid@/bin/ircd -configfile @out@/conf/ircd.conf </dev/null -logfile /home/ircd/ircd.log' 2>&1 >/var/log/ircd-hybrid.out
21 fi;
22fi
23
24if test "$1" = "stop" ; then
25 @procps@/bin/pkill ircd;
26fi;