rc.galileo.new (776B)
1 #!/bin/sh 2 # 3 # Startup/shutdown script for the galileo gemini proxy. 4 # 5 6 galileo_start() { 7 if >/dev/null pidof galileo; then 8 echo "galileo is already running" 9 return 10 fi 11 12 echo -n "Starting the galileo gemini proxy: " 13 if galileo; then 14 echo "success" 15 else 16 echo "failed" 17 fi 18 } 19 20 galileo_status() { 21 if >/dev/null pidof galileo; then 22 echo "galileo is running" 23 else 24 echo "galileo is not running" 25 fi 26 } 27 28 galileo_stop() { 29 if ! >/dev/null pidof galileo; then 30 echo "galileo is not running" 31 return 32 fi 33 34 echo "Stopping the galileo gemini proxy" 35 pkill --exact -TERM galileo 36 } 37 38 case "$1" in 39 start) 40 galileo_start 41 ;; 42 status) 43 galileo_status 44 ;; 45 stop) 46 galileo_stop 47 ;; 48 *) 49 echo "Usage: $0 {reload|start|status|stop}" 50 exit 1 51 esac 52