Use systemd
This commit is contained in:
parent
9d29868bb2
commit
05d5092749
|
@ -8433,14 +8433,14 @@ function install_irc_server {
|
|||
mkdir /var/run/ngircd
|
||||
touch /var/run/ngircd/ngircd.pid
|
||||
chown -R irc:irc /var/run/ngircd
|
||||
service ngircd start
|
||||
systemctl restart ngircd
|
||||
|
||||
# keep the daemon running
|
||||
echo '' >> /usr/bin/$WATCHDOG_SCRIPT_NAME
|
||||
echo '# keep irc daemon running' >> /usr/bin/$WATCHDOG_SCRIPT_NAME
|
||||
echo 'IRC_RUNNING=$(pgrep ngircd > /dev/null && echo Running)' >> /usr/bin/$WATCHDOG_SCRIPT_NAME
|
||||
echo 'if [ ! $IRC_RUNNING ]; then' >> /usr/bin/$WATCHDOG_SCRIPT_NAME
|
||||
echo ' service ngircd start' >> /usr/bin/$WATCHDOG_SCRIPT_NAME
|
||||
echo ' systemctl start ngircd' >> /usr/bin/$WATCHDOG_SCRIPT_NAME
|
||||
echo ' echo -n $CURRENT_DATE >> $LOGFILE' >> /usr/bin/$WATCHDOG_SCRIPT_NAME
|
||||
echo ' echo " IRC daemon restarted" >> $LOGFILE' >> /usr/bin/$WATCHDOG_SCRIPT_NAME
|
||||
echo 'fi' >> /usr/bin/$WATCHDOG_SCRIPT_NAME
|
||||
|
|
Loading…
Reference in New Issue