NeoRouter
http://www.neorouter.com/forum/

RHEL & CentOS 7 init script
http://www.neorouter.com/forum/viewtopic.php?f=8&t=5680
Page 1 of 1

Author:  duress [ Sun Apr 26, 2015 11:31 pm ]
Post subject:  RHEL & CentOS 7 init script

rm -rf /etc/rc2.d/S99nrserver.sh
rm -rf /etc/rc3.d/S99nrserver.sh
rm -rf /etc/rc4.d/S99nrserver.sh
rm -rf /etc/rc5.d/S99nrserver.sh
rm -rf /etc/init.d/nrserver.sh

vi /lib/systemd/system/nrserver.service
Code:
[Unit]
Description=NeoRouter Server
After=network.target remote-fs.target nss-lookup.target

[Service]
Type=forking
ExecStart=/usr/bin/sh -c '( ( /usr/bin/nrserver &>/dev/null ) & )'
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID

[Install]
WantedBy=multi-user.target


systemctl daemon-reload
systemctl enable nrserver
systemctl start nrserver
systemctl status nrserver

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/