aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--galileo/doinst.sh1
-rw-r--r--galileo/file/rc.galileo.new52
-rw-r--r--galileo/galileo.SlackBuild6
3 files changed, 56 insertions, 3 deletions
diff --git a/galileo/doinst.sh b/galileo/doinst.sh
index dc77396..166d8ad 100644
--- a/galileo/doinst.sh
+++ b/galileo/doinst.sh
@@ -23,3 +23,4 @@ preserve_perms() {
}
preserve_perms etc/galileo.conf.new
+preserve_perms etc/rc.d/rc.galileo.new
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
+
diff --git a/galileo/galileo.SlackBuild b/galileo/galileo.SlackBuild
index d574de8..9bc0228 100644
--- a/galileo/galileo.SlackBuild
+++ b/galileo/galileo.SlackBuild
@@ -4,7 +4,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=galileo
VERSION=${VERSION:-0.3}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_slackcoder}
PKGTYPE=${PKGTYPE:-txz}
@@ -79,8 +79,8 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
-mkdir -p "$PKG/etc"
-install -D -m 0644 "$CWD/file/galileo.conf.new" "$PKG/etc"
+install -D -m 0644 "$CWD/file/galileo.conf.new" "$PKG/etc/galileo.conf.new"
+install -D -m 0644 "$CWD/file/rc.galileo.new" "$PKG/etc/rc.d/rc.galileo.new"
cd "$PKG"
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE