Permalink
Browse files

made the default --id to be deafult

git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@1191 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
  • Loading branch information...
1 parent 85ab179 commit 47b4eec8a7e3fb4bc8e39126daa86746f21bfeaa @klacke committed Dec 29, 2007
@@ -8,13 +8,13 @@
yaws=%prefix%/bin/yaws
lockdir=/var/spool/lock
-yawsid=myserverid
+yawsid_opts=--id myserverid
StartService ()
{
if [ "${YAWS:=-NO-}" = "-YES-" ]; then
ConsoleMessage "Starting yaws http daemon"
- HOME=/tmp $yaws --id ${yawsid} --daemon --heart
+ HOME=/tmp $yaws ${yawsid_opts} --daemon --heart
RETVAL=$?
[ $RETVAL = 0 ]
fi
@@ -23,14 +23,14 @@ StartService ()
StopService ()
{
ConsoleMessage "Stopping yaws http daemon"
- HOME=/tmp $yaws --id ${yawsid} --stop
+ HOME=/tmp $yaws ${yawsid_opts} --stop
}
RestartService ()
{
if [ "${YAWS:=-NO-}" = "-YES-" ]; then
ConsoleMessage "Restarting yaws http daemon"
- HOME=/tmp $yaws --id ${yawsid} --hup
+ HOME=/tmp $yaws ${yawsid_opts} --hup
else
StopService
fi
View
@@ -10,7 +10,10 @@
yaws=%prefix%/bin/yaws
prog=yaws
-yawsid=myserverid
+
+# By default we run with the default id
+# idopts=--id myserverid
+
conf="--conf %etcdir%/yaws.conf"
test -x $yaws || exit 1
@@ -19,28 +22,28 @@ test -x $yaws || exit 1
case "$1" in
start)
echo -n "Starting $prog: "
- $yaws --id ${yawsid} --daemon --heart ${conf}
+ $yaws ${idopts} --daemon --heart ${conf}
echo "."
;;
stop)
echo -n "Stopping $prog: "
- $yaws --id ${yawsid} --stop
+ $yaws ${idopts} --stop
echo "."
;;
reload)
echo -n "Reloading $prog: "
- $yaws --id ${yawsid} --hup
+ $yaws ${idopts} --hup
echo "."
;;
status)
- $yaws --id ${yawsid} --status
+ $yaws ${idopts} --status
echo "."
;;
restart)
echo -n "Stopping $prog: "
- $yaws --id ${yawsid} --stop
+ $yaws ${idopts} --stop
echo -n "Starting $prog: "
- $yaws --id ${yawsid} --daemon --heart
+ $yaws ${idopts} --daemon --heart
echo "."
;;
View
@@ -4,7 +4,8 @@
YAWS_BIN=%prefix%bin/yaws
-YAWS_ID=myserverid
+# By default we run with the default id
+# YAWS_ID=myserverid
CONF=%etcdir%yaws.conf
View
@@ -1,36 +0,0 @@
-#
-# Config file for yaws Gentoo start-script.
-# Should be stored as: /etc/conf.d/yaws
-#
-
-# 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
-
-
-# The Yaws config file
-YAWS_CONF_FILE=%etcdir%/yaws.conf
-
-# The start options
-YAWS_START_OPTS="--daemon --heart --id ${YAWS_ID} --conf ${YAWS_CONF_FILE}"
-
-# The stop options
-YAWS_STOP_OPTS="--stop --id ${YAWS_ID}"
-
-# The reload options
-YAWS_RELOAD_OPTS="--hup --id ${YAWS_ID}"
-
-# The query options
-YAWS_QUERY_OPTS="--status --id ${YAWS_ID}"
-
-# The debug options
-YAWS_DEBUG_OPTS="-i --conf ${YAWS_CONF_FILE}"
-
-
-
@@ -10,7 +10,10 @@
#
yaws=%prefix%/bin/yaws
-idopts="--id myserverid"
+
+# By default we run with the default id
+# idopts="--id myserverid"
+
conf="--conf %etcdir%/yaws.conf"
opts="start stop reload restart query"
@@ -14,12 +14,12 @@
yaws=%prefix%/bin/yaws
prog=yaws
-yawsid=myserverid
+#yawsid_opts=--id =myserverid
conf="--conf %etcdir%/yaws.conf"
start() {
echo -n $"Starting $prog: "
- daemon $yaws --id ${myserverid} --daemon --heart ${conf}
+ daemon $yaws ${yawsid_opts} --daemon --heart ${conf}
RETVAL=$?
echo
[ $RETVAL = 0 ] && touch /var/lock/subsys/yaws
@@ -28,7 +28,7 @@ start() {
stop() {
echo -n $"Stopping $prog: "
- str=`$yaws --id ${yawsid} --stop`
+ str=`$yaws ${yawsid_opts} --stop`
if [ "$str" = "stopping" ]; then
echo_success
RETVAL=0
@@ -43,7 +43,7 @@ stop() {
reload() {
echo -n $"Reloading $prog: "
- r=`$yaws --id ${yawsid} --hup`
+ r=`$yaws ${yawsid_opts} --hup`
RETVAL=$?
echo $r
}
View
@@ -2,7 +2,10 @@
YAWS_BIN=%prefix%bin/yaws
-YAWS_ID=myserverid
+
+## By default we run with the default id
+# YAWS_ID_OPTS=--id myserverid
+
conf="--conf %etcdir%/yaws.conf"
test -x $YAWS_BIN || exit 5
@@ -47,7 +50,7 @@ case "$1" in
# NOTE: startproc returns 0, even if service is
# already running to match LSB spec.
- startproc $YAWS_BIN --daemon --heart --id ${YAWS_ID} ${conf}
+ startproc $YAWS_BIN --daemon --heart ${YAWS_ID_OPTS} ${conf}
# Remember status and be verbose
rc_status -v
@@ -57,7 +60,7 @@ case "$1" in
## Stop daemon with killproc(8) and if this fails
## set echo the echo return value.
- startproc $YAWS_BIN --stop --id ${YAWS_ID}
+ startproc $YAWS_BIN --stop ${YAWS_ID_OPTS}
# Remember status and be verbose
rc_status -v
@@ -87,7 +90,7 @@ case "$1" in
echo -n "Force Reload service YAWS"
## if it supports it:
- $YAWS_BIN --id ${YAWS_ID} --hup
+ $YAWS_BIN ${YAWS_ID_OPTS} --hup
rc_status -v
;;
@@ -97,7 +100,7 @@ case "$1" in
# If it supports signalling:
- startproc $YAWS_BIN --id ${YAWS_ID} --hup
+ startproc $YAWS_BIN ${YAWS_ID_OPTS} --hup
rc_status -v
;;
@@ -113,7 +116,7 @@ case "$1" in
# 3 - service not running
# NOTE: checkproc returns LSB compliant status values.
- checkproc $YAWS_BIN --id ${YAWS_ID} --status
+ checkproc $YAWS_BIN ${YAWS_ID_OPTS} --status
rc_status -v
;;
probe)

0 comments on commit 47b4eec

Please sign in to comment.