Guest User

Untitled

a guest
May 18th, 2016
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
  2. DAEMON=/usr/bin/mono
  3. NAME=monoserver
  4. DESC=monoserver
  5.  
  6. MONO_OPTIONS="--debug"
  7. MONOSERVER=$(which fastcgi-mono-server4)
  8. MONOSERVER_PID=$(ps auxf | grep fastcgi-mono-server4.exe | grep -v grep | awk '{print $2}')
  9.  
  10. WEBAPPSPATH=/:/var/www/vhost/kbs-community.de/api/public
  11.  
  12. case "$1" in
  13. start)
  14. if [ -z "${MONOSERVER_PID}" ]; then
  15. echo "starting mono server"
  16. export MONO_IOMAP=all
  17. start-stop-daemon -S -c www-data:www-data -x ${MONOSERVER} /applications=${WEBAPPSPATH} /socket=unix:/var/run/mono/monoserve.sock /logfile=/var/log/mono/fastcgi.log /printlog=True /verbose=True /loglevels=All &
  18. echo "mono server started"
  19. else
  20. echo ${WEBAPPSPATH}
  21. echo "mono server is running"
  22. fi
  23. ;;
  24. stop)
  25. if [ -n "${MONOSERVER_PID}" ]; then
  26. kill ${MONOSERVER_PID}
  27. echo "mono server stopped"
  28. else
  29. echo "mono server is not running"
  30. fi
  31. ;;
  32. esac
  33.  
  34. exit 0
Advertisement
Add Comment
Please, Sign In to add comment