You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
651 B

  1. #!/bin/sh
  2. echo 'plase remember to modify the command path in etc/conf/supervisord.conf(line 23)'
  3. PID="/tmp/supervisord.pid"
  4. CONF="conf/etc/supervisord.conf"
  5. LOGDIR="log"
  6. if [ ! -d $LOGDIR ]; then
  7. mkdir $LOGDIR
  8. fi
  9. stop() {
  10. if [ -f $PID ]; then
  11. kill `cat -- $PID`
  12. rm -f -- $PID
  13. echo "stopped"
  14. fi
  15. }
  16. start() {
  17. echo "starting"
  18. if [ ! -f $PID ]; then
  19. supervisord -c $CONF
  20. echo "started"
  21. fi
  22. }
  23. case "$1" in
  24. start)
  25. start
  26. ;;
  27. stop)
  28. stop
  29. ;;
  30. restart)
  31. stop
  32. start
  33. ;;
  34. *)
  35. echo "Usage: $0 {start|stop|restart}"
  36. esac