-
October 28th, 2019, 10:31 AM
#4
The init.d script remains as per the install.
running the background script was just to prove it works.
#! /bin/sh
### BEGIN INIT INFO
# Provides: Lightstreamer
# Required-Start: $network
# Required-Stop: $network
# Should-Start:
# Should-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Lightstreamer Server
# Description: Lightstreamer Server, Real-Time Data Push - http://www.lightstreamer.com
### END INIT INFO
set -e
# Lightstreamer specific settings
# LS_HOME=/opt/Lightstreamer
LS_HOME="/Lightstreamer"
# LS_USER=lightstreamer
LS_USER="lightstreamer"
# LS_GROUP=lightstreamer
LS_GROUP="lightstreamer"
DAEMON="${LS_HOME}/bin/unix-like/LS.sh"
PIDFILE=/var/run/lightstreamer.pid
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DESC="Lightstreamer Server, Real-Time Data Push"
NAME="Lightstreamer"
test -x $DAEMON || exit 0
. /lib/lsb/init-functions
d_start() {
start-stop-daemon --start --make-pidfile \
--pidfile "${PIDFILE}" --oknodo \
--background --user ${LS_USER} --group ${LS_GROUP} \
--exec "${DAEMON}" -- run
}
d_stop() {
start-stop-daemon --stop --pidfile "${PIDFILE}" --oknodo
}
case "$1" in
start)
log_daemon_msg "Starting ${DESC}" "${NAME}"
d_start
log_end_msg $?
;;
stop)
log_daemon_msg "Stopping ${DESC}" "${NAME}"
d_stop
log_end_msg $?
;;
restart|force-reload)
log_daemon_msg "Restarting ${DESC}" "${NAME}"
d_stop
d_start
log_end_msg $?
;;
status)
status_of_proc -p "${PIDFILE}" "${DAEMON}" "${NAME}" && exit 0 || exit $?
;;
*)
echo "Usage: $0 {start|stop|restart|force-reload|status}" >&2
exit 1
;;
esac
exit 0
Similar Threads
-
By chenxun in forum Client SDKs
Replies: 1
Last Post: July 1st, 2010, 02:51 PM
-
By Eric.Patterson in forum General
Replies: 2
Last Post: May 16th, 2008, 01:43 PM
-
By tuongkha in forum Adapter SDKs
Replies: 2
Last Post: March 18th, 2008, 09:11 AM
-
By wmolde in forum Client SDKs
Replies: 2
Last Post: April 18th, 2007, 03:40 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
All times are GMT +1. The time now is 11:33 AM.
Bookmarks