lider 530 B

123456789101112131415161718192021222324252627282930
  1. #! /bin/bash
  2. case "$1" in
  3. start)
  4. echo "Starting server"
  5. # Start the daemon
  6. systemctl start lider.service
  7. ;;
  8. stop)
  9. echo "Stopping server"
  10. systemctl stop lider.service
  11. ;;
  12. restart)
  13. echo "Restarting server"
  14. systemctl restart lider.service
  15. ;;
  16. status)
  17. echo "Server Status"
  18. # Status of the daemon
  19. systemctl status lider.service
  20. ;;
  21. *)
  22. # Refuse to do other stuff
  23. echo "Usage: /etc/init.d/lider-server {start|stop|restart|status}"
  24. exit 1
  25. ;;
  26. esac
  27. exit 0