From: Claudio Sacerdoti Coen Date: Wed, 9 Oct 2002 14:48:17 +0000 (+0000) Subject: added bootmisc and tomcat scripts X-Git-Tag: BEFORE_METADATA_FOR_SORT_AND_REL~45 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=6e08ee8f963bfd73e271737154baf97240bd18c5;p=helm.git added bootmisc and tomcat scripts --- diff --git a/helm/scripts/init.d/etc_default_helm b/helm/scripts/init.d/etc_default_helm index d6e841310..53696cded 100644 --- a/helm/scripts/init.d/etc_default_helm +++ b/helm/scripts/init.d/etc_default_helm @@ -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 index 000000000..d58c449ac --- /dev/null +++ b/helm/scripts/init.d/helm-bootmisc.sh @@ -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 index 000000000..1c8d3d94e --- /dev/null +++ b/helm/scripts/init.d/helm-tomcat @@ -0,0 +1,48 @@ +#!/bin/sh +# +# init.d script for HELM daemons +# +# by --Zack +# 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 +