Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Untitled

a guest Feb 14th, 2013 781 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/sh
  2.  
  3. SERVICE_NAME=Firewall
  4. SERVICE_DIRECTORY=/etc/firewall
  5. SERVICE_STARTUP_SCRIPT=firewall-start.sh
  6. SERVICE_SHUTDOWN_SCRIPT=firewall-stop.sh
  7.  
  8. ## Functions ##
  9. usage()
  10. {
  11.         echo "-----------------------"
  12.         echo "Usage: $0 (stop|start|restart)"
  13.         echo "-----------------------"
  14. }
  15. service_start()
  16. {
  17.         echo "Starting service '${SERVICE_NAME}'..."
  18.         OWD=`pwd`
  19.         cd ${SERVICE_DIRECTORY} ./${SERVICE_STARTUP_SCRIPT}
  20.         cd $OWD
  21.         echo "Service '${SERVICE_NAME}' started successfully"
  22. }
  23. service_stop()
  24. {
  25.         echo "Stopping service '${SERVICE_NAME}'..."
  26.         OWD=`pwd`
  27.         cd ${SERVICE_DIRECTORY} && ./${SERVICE_SHUTDOWN_SCRIPT}
  28.         cd $OWD
  29.         echo "Service '${SERVICE_NAME}' stopped"
  30. }
  31.  
  32. ## Main ##
  33. if [ -z $1 ]; then
  34.         usage
  35. fi
  36.  
  37. case $1 in
  38.         stop)
  39.                 service_stop
  40.         ;;
  41.         start)
  42.                 service_start
  43.         ;;
  44.         restart)
  45.                 service_stop
  46.                 service_start
  47.         ;;
  48.         *)
  49.                 usage
  50. esac
  51. exit 0
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top