From 3857ed609d4f77e7554d18df5ef7c5a4d129f182 Mon Sep 17 00:00:00 2001 From: Claudio Sacerdoti Coen Date: Fri, 25 Oct 2002 15:47:36 +0000 Subject: [PATCH] Proof-checker ported to the mowgli version. --- helm/scripts/init.d/etc_default_helm | 7 ++- helm/scripts/init.d/helm-bootmisc.sh | 8 ++- helm/scripts/init.d/helm-proof-checker_mowgli | 59 +++++++++++++++++++ helm/scripts/init.d/helm-tomcat | 2 + 4 files changed, 70 insertions(+), 6 deletions(-) create mode 100755 helm/scripts/init.d/helm-proof-checker_mowgli diff --git a/helm/scripts/init.d/etc_default_helm b/helm/scripts/init.d/etc_default_helm index 53696cded..4d06f941f 100644 --- a/helm/scripts/init.d/etc_default_helm +++ b/helm/scripts/init.d/etc_default_helm @@ -17,9 +17,10 @@ UWOBO_INIT_SCRIPT="/projects/helm/shared/scripts/init.d/loadPredefinedStylesheet # 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 + /projects/helm/shared/cache/library + /projects/helm/shared/cache/library/http_getter + /projects/helm/shared/cache/rdf_library + /projects/helm/shared/cache/rdf_library/http_getter " # user which will own the daemons and the cache directories diff --git a/helm/scripts/init.d/helm-bootmisc.sh b/helm/scripts/init.d/helm-bootmisc.sh index d58c449ac..79e3b69a7 100755 --- a/helm/scripts/init.d/helm-bootmisc.sh +++ b/helm/scripts/init.d/helm-bootmisc.sh @@ -10,8 +10,10 @@ fi # 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 + if ! [ -d $d ]; then + mkdir -m 2775 $d + OWNER=`echo -n $OWNER | sed -e 's/:/./'` + chown $OWNER $d + fi done diff --git a/helm/scripts/init.d/helm-proof-checker_mowgli b/helm/scripts/init.d/helm-proof-checker_mowgli new file mode 100755 index 000000000..97874eb1e --- /dev/null +++ b/helm/scripts/init.d/helm-proof-checker_mowgli @@ -0,0 +1,59 @@ +#!/bin/sh +# +# init.d script for HELM proof checker +# +# by --Zack +# Created: Wed, 9 Oct 2002 11:12:01 +0200 +# Last-Modified: Wed, 9 Oct 2002 11:12:01 +0200 + +DAEMON=/projects/helm/proofChecker_mowgli/proofChecker.pl +USAGE="Usage: /etc/init.d/helm-proof-checker { start | stop | restart }" + +ENVSCRIPT="" +if [ -f /etc/default/helm_mowgli ]; then + . /etc/default/helm_mowgli +fi +if ! [ -f "$ENVSCRIPT" ]; then + echo "Can't find environment script '$ENVSCRIPT'" + exit 1 +fi +. $ENVSCRIPT &> /dev/null + +NAME=`basename $DAEMON` +PIDFILE=/projects/helm/run/$NAME.pid + +do_start () { + echo "Starting $DAEMON ..." + start-stop-daemon \ + --start --background --pidfile $PIDFILE --make-pidfile \ + --chuid $OWNER --exec $DAEMON +} + +do_stop () { + echo "Stopping $DAEMON ..." + start-stop-daemon --stop --pidfile $PIDFILE && \ + (if [ -f $PIDFILE ]; then rm -f $PIDFILE; else true; fi) +} + +case "$1" in + + start) + do_start + ;; + + stop) + do_stop + ;; + + restart) + do_stop + do_start + ;; + + *) + echo "$USAGE" >&2 + exit 1 + ;; + +esac + diff --git a/helm/scripts/init.d/helm-tomcat b/helm/scripts/init.d/helm-tomcat index 1c8d3d94e..166ab31b1 100755 --- a/helm/scripts/init.d/helm-tomcat +++ b/helm/scripts/init.d/helm-tomcat @@ -21,7 +21,9 @@ fi case "$1" in start) + echo -n "Loading UWOBO stylesheets (helm) ... " $UWOBO_INIT_SCRIPT > /dev/null + echo "done!" ;; stop) -- 2.39.2