Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…/yaws@1144 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
  • Loading branch information
Claes Wikstrom committed Sep 7, 2007
1 parent 753bdd2 commit 674c8b3
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 34 deletions.
6 changes: 3 additions & 3 deletions man/yaws.1
Original file line number Diff line number Diff line change
Expand Up @@ -126,18 +126,18 @@ the daemon empty all its internal content caches.
Hence when updating the doc root,
HUPing the daemon is the fastest way to see the content updates.
.TP
\fB\--stop [-I id]\fR
\fB\--stop [--id id]\fR
Stop the daemon (called id)
.TP
\fB\--ls \fR
Lists current ids and status of all yaws servers on localhost. In practice this
amounts to a listdir in $HOME/.yaws/yaws - and check wether the different
systems who has created files there are alive.
.TP
\fB--status [-I id]\fR
\fB--status [--id id]\fR
Query a running yaws daemon for its status, and print it.
.TP
\fB--load Modules [-I id]\fR
\fB--load Modules [--id id]\fR
Try to (re)load erlang modules into a running daemon. This is useful
after modifying appmods or modules used by scripts.

Expand Down
16 changes: 10 additions & 6 deletions scripts/Install
Original file line number Diff line number Diff line change
Expand Up @@ -34,30 +34,34 @@ chmod +x ${destdir}/${prefix}/bin/yaws
install -d ${destdir}/${prefix}/lib/yaws/examples/ebin
install -d ${destdir}/${prefix}/lib/yaws/examples/include

## seems gentoo don't like to be installed in /usr/local/etc
## since /sbin/runscript still reads /etc/conf.d
if [ -f /etc/gentoo-release ]; then
install -d ${destdir}/${etcdir}/init.d/
install -d ${destdir}/${etcdir}/conf.d/
install -d ${destdir}/${vardir}/run/yaws
chmod a+rwx ${destdir}/${vardir}/run/yaws
cp gentoo/init.d.yaws ${destdir}/${etcdir}/init.d/yaws
sed -e "s;%prefix%;$p;g" \
-e "s;%etcdir%;$e;g" > ${destdir}/${etcdir}/init.d/yaws
chmod +x ${destdir}/${etcdir}/init.d/yaws
sed -e "s;%prefix%;$p;g" gentoo/conf.d.yaws | \
sed -e "s;%etcdir%;$e;g" > ${destdir}/${etcdir}/conf.d/yaws
elif [ -f /etc/redhat-release ]; then
install -d ${destdir}/${etcdir}/init.d
sed -e "s;%prefix%;$p;g" redhat/yaws.init.d > ${destdir}/${etcdir}/init.d/yaws
sed -e "s;%prefix%;$p;g" \
-e "s;%etcdir%;$e;g" > ${destdir}/${etcdir}/init.d/yaws
chmod +x ${destdir}/${etcdir}/init.d/yaws
install -d ${destdir}/${vardir}/run/yaws
chmod a+rwx ${destdir}/${vardir}/run/yaws
elif [ -f /etc/suseservers ]; then
install -d ${destdir}/${etcdir}/init.d
sed -e "s;%prefix%;$p;g" suse/yaws.init.d > ${destdir}/${etcdir}/init.d/yaws
sed -e "s;%prefix%;$p;g" \
-e "s;%etcdir%;$e;g" > ${destdir}/${etcdir}/init.d/yaws
chmod +x ${destdir}/${etcdir}/init.d/yaws
install -d ${destdir}/${vardir}/run/yaws
chmod a+rwx ${destdir}/${vardir}/run/yaws
elif [ -f /etc/debian_version ]; then
install -d ${destdir}/${etcdir}/init.d
sed -e "s;%prefix%;$p;g" debian/yaws.init.d > ${destdir}/${etcdir}/init.d/yaws
sed -e "s;%prefix%;$p;g" \
-e "s;%etcdir%;$e;g" > ${destdir}/${etcdir}/init.d/yaws
chmod +x ${destdir}/${etcdir}/init.d/yaws
install -d ${destdir}/${vardir}/run/yaws
chmod a+rwx ${destdir}/${vardir}/run/yaws
Expand Down
3 changes: 2 additions & 1 deletion scripts/debian/yaws.init.d
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@
yaws=%prefix%/bin/yaws
prog=yaws
yawsid=myserverid
conf="--conf %etcdir%/yaws.conf"

test -x $yaws || exit 1


case "$1" in
start)
echo -n "Starting $prog: "
$yaws --id ${yawsid} --daemon --heart
$yaws --id ${yawsid} --daemon --heart ${conf}
echo "."
;;
stop)
Expand Down
29 changes: 12 additions & 17 deletions scripts/gentoo/init.d.yaws
Original file line number Diff line number Diff line change
Expand Up @@ -9,45 +9,40 @@
# use: rc-update add yaws default
#

yaws=%prefix%/bin/yaws
idopts="--id myserverid"
conf="--conf %etcdir%/yaws.conf"

opts="start stop reload restart query debug"
opts="start stop reload restart query"

depend() {
need net
}


start() {
ebegin "Starting ${YAWS_APP} "
${YAWS_EXEC} ${YAWS_START_OPTS}
ebegin "Starting yaws "
${yaws} --daemon --heart ${idopts} ${conf}
eend $?
}


stop() {
ebegin "Stopping ${YAWS_APP} "
${YAWS_EXEC} ${YAWS_STOP_OPTS}
ebegin "Stopping yaws "
${yaws} --stop ${idopts}
eend $?
}


reload() {
ebegin "Reloading ${YAWS_APP} "
${YAWS_EXEC} ${YAWS_RELOAD_OPTS}
ebegin "Reloading yaws "
${yaws} --hup ${idopts}
eend $?
}

query() {
ebegin "Querying ${YAWS_APP} "
${YAWS_EXEC} ${YAWS_QUERY_OPTS}
ebegin "Querying yaws "
${yaws} --status ${idopts}
eend $?
}

debug() {
ebegin "Debug ${YAWS_APP} "
${YAWS_EXEC} ${YAWS_DEBUG_OPTS}
eend $?
}



3 changes: 2 additions & 1 deletion scripts/redhat/yaws.init.d
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@
yaws=%prefix%/bin/yaws
prog=yaws
yawsid=myserverid
conf="--conf %etcdir%/yaws.conf"

start() {
echo -n $"Starting $prog: "
daemon $yaws --id ${myserverid} --daemon --heart
daemon $yaws --id ${myserverid} --daemon --heart ${conf}
RETVAL=$?
echo
[ $RETVAL = 0 ] && touch /var/lock/subsys/yaws
Expand Down
3 changes: 2 additions & 1 deletion scripts/suse/yaws.init.d
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

YAWS_BIN=%prefix%bin/yaws
YAWS_ID=myserverid
conf="--conf %etcdir%/yaws.conf"

test -x $YAWS_BIN || exit 5

Expand Down Expand Up @@ -46,7 +47,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}
startproc $YAWS_BIN --daemon --heart --id ${YAWS_ID} ${conf}

# Remember status and be verbose
rc_status -v
Expand Down
12 changes: 8 additions & 4 deletions www/contribs.yaws
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ out(A) ->

<li><h4>Yaws webmail </h4>

<p>An excellent little stateless webmail server. No db, no nothing is needed except the address
of a popserver and the address of an smtp server. Part of the Yaws source code distro. Extremely
easy to configure and run.
<p>An excellent little stateless webmail server.
No db, no nothing is needed except the address
of a popserver and the address of an smtp server. Part of the Yaws source
code distro. Extremely easy to configure and run.
</p>
</li>

Expand All @@ -62,7 +63,10 @@ out(A) ->
</p>
</li>


<li><h4>Noneg</h4>
<p><a href="http://www.noneg.se">Noneg.se</a> a picture agency - all yaws and mnesia.
</p>
</li>

</ul>

Expand Down
2 changes: 1 addition & 1 deletion www/news
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Thu Sep 6 19:40:28 CEST 2007 version 1.70
Regular bugfix an small feature release.
Regular bugfix and small feature release.
Revproxy bug found by igor goryachev.
Started to use the nes ssl:transport_accept() function, when accept fails, I now fail yaws entirely and it needs to be restarted by its supervisor or heart. If we have filedescriptor leaks, even outside of yaws, there is no good thing to do when accept fails. (klacke)
A body message patch from Brian Templeton which cleaned up code and improved RFC 2616 compliance
Expand Down

0 comments on commit 674c8b3

Please sign in to comment.