Community


All times are UTC - 5 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: RHEL & CentOS 7 init script
PostPosted: Sun Apr 26, 2015 11:31 pm 
Offline

Joined: Sun Apr 26, 2015 11:27 pm
Posts: 1
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 26 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: