summary'>refs'>log'>tree'>commit'>diffstats
diff options
context:
space:
mode:
authorBertrand Jacquin (Beber) <beber@meleeweb.net>2006-09-18 21:53:36 +0200
committerbeber <beber@meathook.meleeweb.net>2006-09-18 21:53:36 +0200
commit'>bff6128e8b703e9b81f83421236eaf90e392c8d5 ( ('>patch)
tree64aacad0721e2cdb37e3461469d82cf689cc94f6
parentupdate email adresse (diff)
downloadperso-bff6128e8b703e9b81f83421236eaf90e392c8d5.tar.gz
Add my init script for typo for gentoo
-rw-r--r--rails/typo/init/Makefile3
-rw-r--r--rails/typo/init/conf1
-rwxr-xr-xrails/typo/init/init44
3 files changed, 48 insertions, 0 deletions
diff --git a/rails/typo/init/Makefile b/rails/typo/init/Makefile
new file mode 100644
index 0000000..d8f7dd1
--- /dev/null
+++ b/rails/typo/init/Makefile
@@ -0,0 +1,3 @@
+all:
+ cp init /etc/init.d/typo
+ cp conf /etc/conf.d/typo
diff --git a/rails/typo/init/conf b/rails/typo/init/conf
new file mode 100644
index 0000000..567c833
--- /dev/null
+++ b/rails/typo/init/conf
@@ -0,0 +1 @@
+TYPOS_PATH="/var/www/blog/htdocs/ /var/www/else/blog/"
diff --git a/rails/typo/init/init b/rails/typo/init/init
new file mode 100755
index 0000000..0c098b5
--- /dev/null
+++ b/rails/typo/init/init
@@ -0,0 +1,44 @@
+#!/sbin/runscript
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+depend() {
+ need apache2
+}
+
+start() {
+ if [ ! -z "${TYPOS_PATH}" ]; then
+ for typo_install in ${TYPOS_PATH}; do
+ einfo "Starting Typo for $typo_install"
+ typo start $typo_install > /dev/null 2>&1
+ eend $?
+ done
+ else
+ error "No typo install"
+ fi
+}
+
+stop() {
+ if [ ! -z "${TYPOS_PATH}" ]; then
+ for typo_install in ${TYPOS_PATH}; do
+ einfo "Stopping Typo for $typo_install"
+ typo stop $typo_install > /dev/null 2>&1
+ eend $?
+ done
+ else
+ error "No typo install"
+ fi
+}
+
+svc_restart() {
+ if [ ! -z "${TYPOS_PATH}" ]; then
+ for typo_install in ${TYPOS_PATH}; do
+ einfo "Restarting Typo for $typo_install"
+ typo restart $typo_install > /dev/null 2>&1
+ eend $?
+ done
+ else
+ error "No typo install"
+ fi
+}