Created
September 24, 2012 11:45
-
-
Save hfase01/3775583 to your computer and use it in GitHub Desktop.
You will need mono-fastcgi-server4 & libmono-microsoft-visualbasic10.0-cil
This file contains 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/bash | |
### BEGIN INIT INFO | |
# Provides: fastmono | |
# 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 | |
# Short-Description: Fast-cgi-mono. | |
# Description: Fast-cgi-mono mono-fastcgi-server4 startup script. | |
### END INIT INFO | |
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin | |
DAEMON=/usr/local/bin/mono | |
NAME=monoserver | |
DESC=monoserver | |
MONOSERVER=$(which fastcgi-mono-server4) | |
MONOSERVER_PID=$(ps auxf | grep fastcgi-mono-server | grep -v grep | awk '{print $2}') | |
WEBAPPS="nuketest.hfase.com:/:/var/www/DotNetNuke/" | |
case "$1" in | |
start) | |
if [ -z "${MONOSERVER_PID}" ]; then | |
echo "starting mono server" | |
${MONOSERVER} /applications=${WEBAPPS} /socket=tcp:0.0.0.0:9000 & | |
echo "mono server started" | |
else | |
echo ${WEBAPPS} | |
echo "mono server is running" | |
fi | |
;; | |
stop) | |
if [ -n "${MONOSERVER_PID}" ]; then | |
kill ${MONOSERVER_PID} | |
echo "mono server stopped" | |
else | |
echo "mono server is not running" | |
fi | |
;; | |
esac | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment