Skip to content
Snippets Groups Projects
Commit 354e0fc7 authored by Edileuton Henrique de Oliveira's avatar Edileuton Henrique de Oliveira
Browse files

Merge branch 'issue_1660' of /home/git/repositories/minicom/datasid

parents 43066f8f d8a19515
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
trap cleanUp EXIT
function cleanUp() {
kill $pids
}
cd /home/datasid/apache-tomcat/bin/
sh catalina.sh run >> /home/datasid/apache-tomcat/logs/catalina.out 2>&1 & pids=$!
wait $pids
\ No newline at end of file
#!/bin/bash
### BEGIN INIT INFO
# Provides: datasid
# Required-Start: $local_fs $named $network
# Required-Stop: $local_fs $named $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: start datasid web portal
# Description: Script to start datasid at boot
### END INIT INFO
set -e
DATASID_USER="datasid"
NAME="datasid"
DATASID_PIDFILE="/var/run/$NAME.pid"
DATASID="/home/datasid/spawn.sh"
DATASID_OPTS=""
do_start () {
printf "Starting WebService datasid\n"
start-stop-daemon --start --quiet --chuid $DATASID_USER --background \
--make-pidfile --pidfile $DATASID_PIDFILE --exec $DATASID -- $DATASID_OPTS
}
do_stop () {
printf "WebService datasid dead\n"
start-stop-daemon --stop --oknodo --pidfile $DATASID_PIDFILE
}
case "$1" in
start)
do_start
;;
restart)
do_stop
do_start
;;
stop)
do_stop
;;
status)
printf "%-50s" "Checking $NAME..."
if [ -f $DATASID_PIDFILE ]; then
PID=`cat $DATASID_PIDFILE`
if [ -z "`ps axf | grep ${PID} | grep -v grep`" ]; then
printf "%s\n" "Process dead but pidfile exists"
else
echo "Running"
fi
else
printf "%s\n" "Service not running"
fi
;;
esac
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment