Created
February 11, 2012 04:25
-
-
Save firdausramlan/1796150 to your computer and use it in GitHub Desktop.
ColdFusion Init Script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -e | |
### BEGIN INIT INFO | |
# Provides: jrun | |
# Required-Start: $local_fs $remote_fs $network $syslog | |
# Required-Stop: $local_fs $remote_fs $network $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# X-Interactive: true | |
# Short-Description: Start/stop ColdFusion as service | |
### END INIT INFO | |
ENV="env -i LANG=C PATH=/usr/local/bin:/usr/bin:/bin" | |
set -e | |
. /lib/lsb/init-functions | |
test -f /etc/default/rcS && . /etc/default/rcS | |
CFJRUN="$ENV /opt/jrun4/bin/jrun" | |
INSTANCE_NAME="dev" | |
case $1 in | |
start) | |
echo -n "Starting CF server $INSTANCE_NAME" | |
$CFJRUN start $INSTANCE_NAME & | |
echo | |
;; | |
stop) | |
echo -n "Stopping CF server $INSTANCE_NAME" | |
$CFJRUN stop $INSTANCE_NAME | |
echo | |
;; | |
restart | force-reload) | |
echo -n "Restarting CF server $INSTANCE_NAME" | |
$CFJRUN restart $INSTANCE_NAME & | |
echo | |
;; | |
status) | |
echo -n "Getting CF server statuses" | |
$CFJRUN status | |
echo | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment