python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / nixos / modules / services / networking / ircd-hybrid / control.in
blob312dfaada329e8dbe60cb27009291fa604b8260b
1 #! @shell@ -e
3 # Make sure that the environment is deterministic.
4 export PATH=@coreutils@/bin
6 if 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;
24 if test "$1" = "stop" ; then 
25         @procps@/bin/pkill ircd;
26 fi;