aboutsummaryrefslogtreecommitdiff
path: root/galileo/file
diff options
context:
space:
mode:
Diffstat (limited to 'galileo/file')
-rw-r--r--galileo/file/rc.galileo.new52
1 files changed, 52 insertions, 0 deletions
diff --git a/galileo/file/rc.galileo.new b/galileo/file/rc.galileo.new
new file mode 100644
index 0000000..bf51872
--- /dev/null
+++ b/galileo/file/rc.galileo.new
@@ -0,0 +1,52 @@
+#!/bin/sh
+#
+# Startup/shutdown script for the galileo gemini proxy.
+#
+
+galileo_start() {
+ if >/dev/null pidof galileo; then
+ echo "galileo is already running"
+ return
+ fi
+
+ echo -n "Starting the galileo gemini proxy: "
+ if galileo; then
+ echo "success"
+ else
+ echo "failed"
+ fi
+}
+
+galileo_status() {
+ if >/dev/null pidof galileo; then
+ echo "galileo is running"
+ else
+ echo "galileo is not running"
+ fi
+}
+
+galileo_stop() {
+ if ! >/dev/null pidof galileo; then
+ echo "galileo is not running"
+ return
+ fi
+
+ echo "Stopping the galileo gemini proxy"
+ pkill --exact -TERM galileo
+}
+
+case "$1" in
+start)
+ galileo_start
+ ;;
+status)
+ galileo_status
+ ;;
+stop)
+ galileo_stop
+ ;;
+*)
+ echo "Usage: $0 {reload|start|status|stop}"
+ exit 1
+esac
+