Permalink
Browse files

*** empty log message ***

git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@956 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
  • Loading branch information...
1 parent 2bae931 commit 2e22685ba8d8fd5107ee466abcfadd16daf15f88 @klacke committed Mar 17, 2006
Showing with 24 additions and 19 deletions.
  1. +5 −4 scripts/darwin/Yaws.StartupItem
  2. +9 −7 scripts/gentoo/conf.d.yaws
  3. +4 −3 scripts/redhat/yaws.init.d
  4. +6 −5 scripts/suse/yaws.init.d
@@ -8,12 +8,13 @@
yaws=%prefix%/bin/yaws
lockdir=/var/spool/lock
+yawsid=myserverid
StartService ()
{
if [ "${YAWS:=-NO-}" = "-YES-" ]; then
ConsoleMessage "Starting yaws http daemon"
- HOME=/tmp $yaws -D -heart
+ HOME=/tmp $yaws --i d${yawsid} --daemon --heart
RETVAL=$?
[ $RETVAL = 0 ] && touch ${lockdir}/yaws
fi
@@ -22,15 +23,15 @@ StartService ()
StopService ()
{
ConsoleMessage "Stopping yaws http daemon"
- HOME=/tmp $yaws -s
- rm -f ${lockdir}/yaws /var/run/yaws.pid
+ HOME=/tmp $yaws --id ${yawsid} --stop
+ rm -f ${lockdir}/yaws -/var/run/yaws.pid
}
RestartService ()
{
if [ "${YAWS:=-NO-}" = "-YES-" ]; then
ConsoleMessage "Restarting yaws http daemon"
- HOME=/tmp $yaws -h
+ HOME=/tmp $yaws --id ${yawsid} --hup
else
StopService
fi
View
@@ -6,29 +6,31 @@
# Application name
YAWS_APP=yaws
+# set specific ID on /etc server
+# change this string to your liking
+YAWS_ID=myserverid
+
# Path to yaws executable
YAWS_EXEC=%prefix%/bin/yaws
-# NB: It is recomended that you don't run Yaws as root
-YAWS_UID=root
# The Yaws config file
YAWS_CONF_FILE=/etc/yaws.conf
# The start options
-YAWS_START_OPTS="-D -heart -c ${YAWS_CONF_FILE}"
+YAWS_START_OPTS="--daemon --heart --id ${YAWS_ID} --conf ${YAWS_CONF_FILE}"
# The stop options
-YAWS_STOP_OPTS="-s -c ${YAWS_CONF_FILE}"
+YAWS_STOP_OPTS="--stop --id ${YAWS_ID}
# The reload options
-YAWS_RELOAD_OPTS="-h -c ${YAWS_CONF_FILE}"
+YAWS_RELOAD_OPTS="--hup --id ${YAWS_ID}
# The query options
-YAWS_QUERY_OPTS="-S -c ${YAWS_CONF_FILE}"
+YAWS_QUERY_OPTS="--status --id ${YAWS_ID}
# The debug options
-YAWS_DEBUG_OPTS="-i -c ${YAWS_CONF_FILE}"
+YAWS_DEBUG_OPTS="-i --conf ${YAWS_CONF_FILE}"
@@ -14,10 +14,11 @@
yaws=%prefix%/bin/yaws
prog=yaws
+yawsid=myserverid
start() {
echo -n $"Starting $prog: "
- daemon $yaws -D -heart
+ daemon $yaws --id ${myserverid} --daemon --heart
RETVAL=$?
echo
[ $RETVAL = 0 ] && touch /var/lock/subsys/yaws
@@ -26,7 +27,7 @@ start() {
stop() {
echo -n $"Stopping $prog: "
- str=`$yaws -s`
+ str=`$yaws --id ${yawsid} --stop`
if [ "$str" = "stopping" ]; then
echo_success
RETVAL=0
@@ -41,7 +42,7 @@ stop() {
reload() {
echo -n $"Reloading $prog: "
- r=`$yaws -h`
+ r=`$yaws --id ${yawsid} --hup`
RETVAL=$?
echo $r
}
View
@@ -2,6 +2,7 @@
YAWS_BIN=%prefix%bin/yaws
+YAWS_ID=myserverid
test -x $YAWS_BIN || exit 5
@@ -45,7 +46,7 @@ case "$1" in
# NOTE: startproc returns 0, even if service is
# already running to match LSB spec.
- startproc $YAWS_BIN -D -heart
+ startproc $YAWS_BIN --daemon --heart --id ${YAWS_ID}
# Remember status and be verbose
rc_status -v
@@ -55,7 +56,7 @@ case "$1" in
## Stop daemon with killproc(8) and if this fails
## set echo the echo return value.
- startproc $YAWS_BIN -s
+ startproc $YAWS_BIN --stop --id ${YAWS_ID}
# Remember status and be verbose
rc_status -v
@@ -85,7 +86,7 @@ case "$1" in
echo -n "Force Reload service YAWS"
## if it supports it:
- $0 restart
+ $YAWS_BIN --id ${YAWS_ID} --hup
rc_status -v
;;
@@ -95,7 +96,7 @@ case "$1" in
# If it supports signalling:
- startproc $YAWS_BIN -h
+ startproc $YAWS_BIN --id ${YAWS_ID} --hup
rc_status -v
;;
@@ -111,7 +112,7 @@ case "$1" in
# 3 - service not running
# NOTE: checkproc returns LSB compliant status values.
- checkproc $YAWS_BIN -S
+ checkproc $YAWS_BIN --id ${YAWS_ID} --status
rc_status -v
;;
probe)

0 comments on commit 2e22685

Please sign in to comment.