Again for those with DIY or Gentoo based runscript systems, here is a startup I wacked up for Houdini's License manager sesinetd
#!/sbin/runscript
opts="reload"
depend() {
use logger dns
}
PIDFILE_SAFE=/var/run/${SVCNAME}_safe.pid
PIDFILE=/var/run/${SVCNAME}.pid
LOG_FILE=/var/log/${SVCNAME}.log
source /etc/whereveryourbloodyenvis
SESI=/usr/lib/sesi # Directory where sesinetd is installed
SESINETD=${SESI}/sesinetd # Name of sesinetd executable to run
SESICTRL=${SESI}/sesictrl # Name of sesictrl executable to run
SESINETD_START=${SESI}/sesinetd_safe # Script to start sesinetd
OPTIONS=
start() {
ebegin "Starting ${SVCNAME}"
start-stop-daemon --start --chdir ${SESI} \
--exec ${SESINETD_START} --background \
--make-pidfile --pidfile ${PIDFILE_SAFE} \
-- --sesi=${SESI} --sesinetd=${SESINETD} \
--log-file=${LOG_FILE} --pid-file=${PIDFILE} ${OPTIONS}
eend $?
}
stop() {
ebegin "Stopping ${SVCNAME}"
kill -9 `cat ${PIDFILE_SAFE}` && kill -9 `cat ${PIDFILE}`
eend $?
}
reload() {
ebegin "Reloading ${SVCNAME}"
kill -9 `cat ${PIDFILE_SAFE}` && kill -9 `cat ${PIDFILE}`
start-stop-daemon --start --chdir ${SESI} \
--exec ${SESINETD_START} --background \
--make-pidfile --pidfile ${PIDFILE_SAFE} \
-- --sesi=${SESI} --sesinetd=${SESINETD} \
--log-file=${LOG_FILE} --pid-file=${PIDFILE} ${OPTIONS}
eend $?
}
Post a Comment