1
0
mirror of https://github.com/osmarks/ngircd.git synced 2024-12-15 03:10:27 +00:00
ngircd/contrib/MacOSX/preinstall.sh
Alexander Barton 707cc42dec New make target: "osxpkg" to create an Mac OS X installer package.
This patch adds a new make target, "osxpkg", to the main Makefile which
gereates a Apple Mac OS X installer package of ngIRCd. The packagemaker(1)
project bundle is stored in contrib/MacOSX/ngIRCd.pmdoc.
2008-08-12 17:30:38 +02:00

26 lines
728 B
Bash
Executable File

#!/bin/sh
# ngIRCd Mac OS X preinstall/preupgrade script
LDPLIST="/Library/LaunchDaemons/de.barton.ngircd.plist"
rm -f /tmp/ngircd_needs_restart || exit 1
if [ -r "$LDPLIST" ]; then
echo "LaunchDaemon script found, checking status ..."
launchctl list | fgrep "de.barton.ngIRCd" >/dev/null 2>&1
if [ $? -eq 0 ]; then
# ngIRCd is already running; stop it and touch a
# "stamp file" so that we know that we have to
# restart it after installation/upgrade.
echo "ngIRCd is already running; stop it ..."
launchctl unload "$LDPLIST" || exit 1
echo "Daemon has been stopped."
touch /tmp/ngircd_needs_restart || exit 1
else
echo "ngIRCd is not running."
fi
else
echo "LaunchDaemon script not found."
fi
# -eof-