Posts

Showing posts from September, 2017

Naviserver Ubuntu16.04 service bootup,config

cd /etc/systemd/system
vim naviserver.service

-----------------------------------------------------------------
[Unit]

Description=NAVISERVER
After=network.target

[Service]

Type=forking
PIDFile=/opt/ns/logs/nsd.pid
ExecStart=/etc/init.d/naviserver start
ExecReload=/etc/init.d/naviserver restart
ExecStop=/etc/init.d/naviserver stop

[Install]

WantedBy=multi-user.target


:wq!
-----------------------------------------------------------------

cd /etc/init.d/vim naviserver

-----------------------------------------------------------------
#!/bin/sh
# /etc/rc.d/rc.naviserver
# Start/stop/restart
# the NaviServer (nsd) web server.

# To make Naviserver start automatically at boot, make this
# file executable: chmod 755 /etc/rc.d/rc.naviserver

### BEGIN INIT INFO
# Provides:          naviserver
# Required-Start:    $all
# Required-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:
# Short-Description: Naviserver
### END INIT INFO

INSTALL_DIR=/opt/ns
CONFIG_FILE_NAME=nsd.conf
PID_FILE=/opt/ns/logs/nsd.pid

case "$1" in
'…