[BACK]Return to preinstall.sh CVS log [TXT][DIR] Up to [local] / ircnowd / contrib / MacOSX

Annotation of ircnowd/contrib/MacOSX/preinstall.sh, Revision 1.1

1.1     ! tomglok     1: #!/bin/sh
        !             2: # ngIRCd Mac OS X preinstall/preupgrade script
        !             3:
        !             4: LDPLIST="/Library/LaunchDaemons/de.barton.ngircd.plist"
        !             5:
        !             6: rm -f /tmp/ngircd_needs_restart || exit 1
        !             7: if [ -r "$LDPLIST" ]; then
        !             8:        echo "LaunchDaemon script found, checking status ..."
        !             9:        launchctl list | fgrep "de.barton.ngIRCd" >/dev/null 2>&1
        !            10:        if [ $? -eq 0 ]; then
        !            11:                # ngIRCd is already running; stop it and touch a
        !            12:                # "stamp file" so that we know that we have to
        !            13:                # restart it after installation/upgrade.
        !            14:                echo "ngIRCd is already running; stop it ..."
        !            15:                launchctl unload "$LDPLIST" || exit 1
        !            16:                echo "Daemon has been stopped."
        !            17:                touch /tmp/ngircd_needs_restart || exit 1
        !            18:        else
        !            19:                echo "ngIRCd is not running."
        !            20:        fi
        !            21: else
        !            22:        echo "LaunchDaemon script not found."
        !            23: fi
        !            24:
        !            25: # -eof-

CVSweb