The easy Weblog and Wiki Software
[ start | index | login ]
start > comment-init.d-1

comment-init.d-1 commented init.d

Created by ThoMo. Last edited by ThoMo, 5 years and 6 days ago. Viewed 382 times. #1
[edit] [rdf]
labels
attachments
Hi, here are my first version of a init.d script to start/stop snipsnap while boot/shutdown the whole server.

#!/bin/sh
# chkconfig: 235 99 10
# description: Start or stop the SnipSnap server
#
### BEGIN INIT INFO
# Provides: snipsnap
# Required-Start: $network $httpd
# Required-Stop: $network $httpd
# Default-Start: 2 3 5
# Default-Stop: 0 1 6
# Description: Start or stop the SnipSnap server
### END INIT INFO

export JAVA_HOME=/usr/java/j2sdk1.4.2 SNIPDIR=/var/www/snipsnap-0.4.2a

[ -f $SNIPDIR/run.sh ] || exit 0

name='SnipSnap'

start () { echo -n $"Starting $name" cd $SNIPDIR ./run.sh >> /var/log/snipsnap 2>&1 & echo }

stop () { echo -n $"Stopping $name" cd $SNIPDIR ./run.sh -admin shutdown >> /var/log/snipsnap 2>&1 echo }

case "$1" in 'start') start ;; 'stop') stop ;; 'restart') stop start ;; *) echo "Usage: $0 { start | stop | restart }" ;; esac

14 comments (by phobia, ThoMo, csg, leo, funzel) | post comment

What is SnipSnap?
SnipSnap is a free and easy to install weblog and wiki tool written in Java.

SnipSnap download
Current version: 1.0b3-uttoxeter
Try our >>Web Start Demo!

Resources

5567 Users and 13712 Snips. Installed 6 years and 10 days ago

Logged in Users: (2)
… and 20 Guests.

snipsnap-changed for older changes.

< July 2008 >
SunMonTueWedThuFriSat
12345
6789101112
13141516171819
20212223242526
2728293031

snipsnap
Listed on BlogShares
XHTML 1.0 validated
CSS validated
RSS 2.0 validated
RSS Feed

pico-powered

Powered by SnipSnap 1.0b3-uttoxeter
YourKit >>Java Profiler

Fraunhofer FIRST

snipsnap.org | Copyright 2000-2006 Fraunhofer FIRST