Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

install patches for macosX by Eric Baur

git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@991 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
  • Loading branch information...
commit 9eaf9c4356b15004a941edd4513e8d24a5662d53 1 parent 85d46bf
@klacke authored
Showing with 9 additions and 5 deletions.
  1. +7 −2 scripts/Install
  2. +2 −3 scripts/darwin/Yaws.StartupItem
View
9 scripts/Install
@@ -60,14 +60,19 @@ elif [ -f /etc/debian_version ]; then
install -d ${destdir}/${vardir}/run/yaws
chmod a+rwx ${destdir}/${vardir}/run/yaws
-elif [ "`uname -s`" = "Darwin" && `id -u` = 0 ]; then
+elif [ "`uname -s`" = "Darwin" -a `id -u` = 0 ]; then
startupdir="/Library/StartupItems/Yaws"
- if [ ! -d ${startupdir} && ]; then
+ if [ ! -e ${startupdir} && ]; then
mkdir ${startupdir};
+ elif [ ! -d ${startupdir} ]; then
+ echo "${startupdir} exists but is not a directory, bailing out ..."
+ exit 1
fi
sed -e "s;%prefix%;$p;g" darwin/Yaws.StartupItem > ${startupdir}/Yaws
chmod +x ${startupdir}/Yaws
cp darwin/Yaws.plist ${startupdir}/StartupParameters.plist
+ # MacOS is particular about the ownership of startup items.
+ chown -R root:wheel ${startupdir}
elif [ "`uname -s`" = "FreeBSD" ]; then
sed -e "s;%prefix%;$p;g" -e "s;%etcdir%;$e;g" freebsd/yaws.sh > ${destdir}/${etcdir}/rc.d/yaws.sh
else
View
5 scripts/darwin/Yaws.StartupItem
@@ -14,9 +14,9 @@ StartService ()
{
if [ "${YAWS:=-NO-}" = "-YES-" ]; then
ConsoleMessage "Starting yaws http daemon"
- HOME=/tmp $yaws --i d${yawsid} --daemon --heart
+ HOME=/tmp $yaws --id ${yawsid} --daemon --heart
RETVAL=$?
- [ $RETVAL = 0 ] && touch ${lockdir}/yaws
+ [ $RETVAL = 0 ]
fi
}
@@ -24,7 +24,6 @@ StopService ()
{
ConsoleMessage "Stopping yaws http daemon"
HOME=/tmp $yaws --id ${yawsid} --stop
- rm -f ${lockdir}/yaws -/var/run/yaws.pid
}
RestartService ()
Please sign in to comment.
Something went wrong with that request. Please try again.