diff options
| author | Alexander Barton <alex@barton.de> | 2008-08-12 17:30:38 +0200 |
|---|---|---|
| committer | Alexander Barton <alex@barton.de> | 2008-08-12 17:30:38 +0200 |
| commit | 707cc42dec2439da1fdee4ed3eb0e0a44d5ea9fe (patch) | |
| tree | 9dcfde47b5a9832df6353ef4445c436fd5101f02 /contrib/MacOSX/preinstall.sh | |
| parent | 30f1ed211d5014b964f147539970befcd7c9f7d2 (diff) | |
| download | ngircd-707cc42dec2439da1fdee4ed3eb0e0a44d5ea9fe.tar.gz ngircd-707cc42dec2439da1fdee4ed3eb0e0a44d5ea9fe.zip | |
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.
Diffstat (limited to 'contrib/MacOSX/preinstall.sh')
| -rwxr-xr-x | contrib/MacOSX/preinstall.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/contrib/MacOSX/preinstall.sh b/contrib/MacOSX/preinstall.sh new file mode 100755 index 00000000..0e13bacf --- /dev/null +++ b/contrib/MacOSX/preinstall.sh @@ -0,0 +1,25 @@ +#!/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- |