#!/bin/zsh
############################################################## {{{1 ##########
#   $Author$
#   $Revision$
#   $Date$
#   $HeadURL$
############################################################## }}}1 ##########

setopt X_Trace;

if test "${USER}" = "root"; then
    if test ! -L /Library/LaunchDaemons/org.macports.leafnode.plist; then
	ln -s										    \
	    @PREFIX@/etc/LaunchDaemons/org.macports.leafnode/org.macports.leafnode.plist    \
	    /Library/LaunchDaemons/org.macports.leafnode.plist				    ;
    fi;

    launchctl stop                             org.macports.leafnode
    launchctl unload -w /Library/LaunchDaemons/org.macports.leafnode.plist
    launchctl load   -w /Library/LaunchDaemons/org.macports.leafnode.plist
    launchctl start                            org.macports.leafnode
else
    sudo ${0};
fi;

############################################################ {{{1 ###########
# vim: set nowrap tabstop=8 shiftwidth=4 softtabstop=4 noexpandtab :
# vim: set textwidth=0 filetype=zsh foldmethod=marker nospell :
