Skip to content

Commit

Permalink
install patches for macosX by Eric Baur
Browse files Browse the repository at this point in the history
git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@991 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
  • Loading branch information
Claes Wikstrom committed Jul 3, 2006
1 parent 85d46bf commit 9eaf9c4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
9 changes: 7 additions & 2 deletions scripts/Install
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions scripts/darwin/Yaws.StartupItem
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,16 @@ 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
}

StopService ()
{
ConsoleMessage "Stopping yaws http daemon"
HOME=/tmp $yaws --id ${yawsid} --stop
rm -f ${lockdir}/yaws -/var/run/yaws.pid
}

RestartService ()
Expand Down

0 comments on commit 9eaf9c4

Please sign in to comment.