]> matita.cs.unibo.it Git - helm.git/commitdiff
added bootmisc and tomcat scripts
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Wed, 9 Oct 2002 14:48:17 +0000 (14:48 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Wed, 9 Oct 2002 14:48:17 +0000 (14:48 +0000)
helm/scripts/init.d/etc_default_helm
helm/scripts/init.d/helm-bootmisc.sh [new file with mode: 0755]
helm/scripts/init.d/helm-tomcat [new file with mode: 0755]

index d6e8413106d01534961dcb4650ea174baf5a5b05..53696cdedbdf6a4b7a95f7b71498ac6c6d4b696c 100644 (file)
@@ -12,7 +12,17 @@ DAEMONS="
   # script used to define a good(TM) environment for daemons
 ENVSCRIPT="/projects/helm/shared/scripts/phd.rc"
 
-  # user which will own the daemons
+  # script used to load/unload uwobo predefined scripts
+UWOBO_INIT_SCRIPT="/projects/helm/shared/scripts/init.d/loadPredefinedStylesheets.pl"
+
+  # http getter cache dirs that need to be created at boot time
+HTTP_GETTER_CACHE_DIRS="
+  /ramfs/http_getter
+  /ramfs/http_getter/library
+  /ramfs/http_getter/rdf_library
+"
+
+  # user which will own the daemons and the cache directories
 OWNER="sacerdot:helm"
 
 # vim: set ft=sh:
diff --git a/helm/scripts/init.d/helm-bootmisc.sh b/helm/scripts/init.d/helm-bootmisc.sh
new file mode 100755 (executable)
index 0000000..d58c449
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+HTTP_GETTER_CACHE_DIRS=""
+if [ -f /etc/default/helm ]; then
+  . /etc/default/helm
+fi
+
+# clean pid file for helm related daemons
+( cd /projects/helm/run/ && rm -f *.pid )
+
+# create http_getter cache dirs
+for d in $HTTP_GETTER_CACHE_DIRS; do
+  mkdir -m 2755 $d
+  OWNER=`echo -n $OWNER | sed -e 's/:/./'`
+  chown $OWNER $d
+done
+
diff --git a/helm/scripts/init.d/helm-tomcat b/helm/scripts/init.d/helm-tomcat
new file mode 100755 (executable)
index 0000000..1c8d3d9
--- /dev/null
@@ -0,0 +1,48 @@
+#!/bin/sh
+#
+# init.d script for HELM daemons
+#
+# by --Zack <zack@cs.unibo.it>
+# Created: Wed,  9 Oct 2002 14:26:27 +0200
+# Last-Modified: Wed,  9 Oct 2002 14:26:27 +0200
+
+UWOBO_INIT_SCRIPT=""
+ENVSCRIPT=""
+if [ -f /etc/default/helm ]; then
+  . /etc/default/helm
+fi
+test -x "$UWOBO_INIT_SCRIPT" || exit 0
+if ! [ -f "$ENVSCRIPT" ]; then
+  echo "Can't find environment script '$ENVSCRIPT'"
+  exit 1
+fi
+. $ENVSCRIPT &> /dev/null
+
+case "$1" in
+
+  start)
+    $UWOBO_INIT_SCRIPT > /dev/null
+    ;;
+
+  stop)
+    $UWOBO_INIT_SCRIPT --unload > /dev/null
+    ;;
+
+  reload)
+    $UWOBO_INIT_SCRIPT --reload > /dev/null
+    ;;
+
+  restart)
+    $UWOBO_INIT_SCRIPT --unload > /dev/null
+    $UWOBO_INIT_SCRIPT > /dev/null
+    ;;
+
+  *)
+    echo
+    echo "Usage: /etc/init.d/helm-tomcat { start | stop | restart | reload }" >&2
+    echo
+    exit 1
+    ;;
+
+esac
+