Permalink
Browse files

git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk…

…/yaws@1144 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
  • Loading branch information...
1 parent 753bdd2 commit 674c8b3a97f825ac31a635bcaab540e10a06e7fe @klacke committed Sep 7, 2007
Showing with 40 additions and 34 deletions.
  1. +3 −3 man/yaws.1
  2. +10 −6 scripts/Install
  3. +2 −1 scripts/debian/yaws.init.d
  4. +12 −17 scripts/gentoo/init.d.yaws
  5. +2 −1 scripts/redhat/yaws.init.d
  6. +2 −1 scripts/suse/yaws.init.d
  7. +8 −4 www/contribs.yaws
  8. +1 −1 www/news
View
@@ -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.
View
@@ -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
@@ -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)
View
@@ -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 $?
-}
-
-
-
@@ -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
View
@@ -3,6 +3,7 @@
YAWS_BIN=%prefix%bin/yaws
YAWS_ID=myserverid
+conf="--conf %etcdir%/yaws.conf"
test -x $YAWS_BIN || exit 5
@@ -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
View
@@ -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>
@@ -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>
View
@@ -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

0 comments on commit 674c8b3

Please sign in to comment.