chiark / gitweb /
Move the plist file to examples/ along with the other startup files.
authorRichard Kettlewell <rjk@greenend.org.uk>
Tue, 15 Jan 2008 20:21:52 +0000 (20:21 +0000)
committerRichard Kettlewell <rjk@greenend.org.uk>
Tue, 15 Jan 2008 20:21:52 +0000 (20:21 +0000)
Teach scripts/teardown about Mac.

.bzrignore
examples/Makefile.am
examples/uk.org.greenend.rjk.disorder.plist.in [moved from server/uk.org.greenend.rjk.disorder.plist.in with 100% similarity]
scripts/setup.in
scripts/teardown.in
server/Makefile.am

index 9fda4fa..ffea199 100644 (file)
@@ -93,8 +93,7 @@ TAGS
 ktrace.out
 tests/Makefile
 tests/testroot
-disorder.plist
-server/uk.org.greenend.rjk.disorder.plist
+examples/uk.org.greenend.rjk.disorder.plist
 doc/guts
 clients/disorder-playrtp
 doc/disorder-playrtp.1.html
index 6265895..c33b554 100644 (file)
 #
 
 noinst_SCRIPTS=disorder.init disorder.rc
-noinst_DATA=config.sample
+noinst_DATA=config.sample uk.org.greenend.rjk.disorder.plist
 
-SEDFILES=disorder.init config.sample disorder.rc
+SEDFILES=disorder.init config.sample disorder.rc \
+       uk.org.greenend.rjk.disorder.plist
 
 include ${top_srcdir}/scripts/sedfiles.make
 
-EXTRA_DIST=disorder.init.in config.sample.in disorder-log disorder.rc.in
+EXTRA_DIST=disorder.init.in config.sample.in disorder-log disorder.rc.in \
+       uk.org.greenend.rjk.disorder.plist.in
 
 CLEANFILES=$(SEDFILES)
index 991b060..d3d6a48 100755 (executable)
@@ -233,7 +233,7 @@ chmod 2755 pkgstatedir
 case $os in
 Mac )
   echo "Installing the plist into /Library/LaunchDaemons"
-  cp server/uk.org.greenend.rjk.disorder.plist /Library/LaunchDaemons/.
+  cp examples/uk.org.greenend.rjk.disorder.plist /Library/LaunchDaemons/.
   echo "Reloading launchd"
   launchctl load /Library/LaunchDaemons
   echo "Starting DisOrder server"
index b9361b9..dbf593c 100755 (executable)
@@ -35,6 +35,17 @@ FreeBSD )
   pw groupdel jukebox || true
   pw userdel jukebox || true
   ;;
+Darwin )
+  echo "* stopping server"
+  launchctl stop uk.org.greenend.rjk.disorder || true
+  launchctl unload /Library/LaunchDaemons/uk.org.greenend.rjk.disorder.plist || true
+  echo "* removing files"
+  rm -f /Library/WebServer/CGI-Executables/disorder
+  rm -f /Library/WebServer/Documents/disorder
+  rm -f /Library/LaunchDaemons/uk.org.greenend.rjk.disorder.plist
+  rm -rf pkgstatedir
+  rm -rf pkgconfdir
+  ;;  
 * )
   echo Unknown operating system >&2
   exit 1
index eca95c4..bc58b84 100644 (file)
@@ -1,6 +1,6 @@
 #
 # This file is part of DisOrder.
-# Copyright (C) 2004, 2005, 2006, 2007 Richard Kettlewell
+# Copyright (C) 2004-2008 Richard Kettlewell
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,7 +22,6 @@ sbin_PROGRAMS=disorderd disorder-deadlock disorder-rescan disorder-dump \
              disorder-speaker disorder-decode disorder-normalize \
              disorder-stats disorder-dbupgrade
 noinst_PROGRAMS=disorder.cgi trackname
-noinst_DATA=uk.org.greenend.rjk.disorder.plist
 
 AM_CPPFLAGS=-I${top_srcdir}/lib -I../lib
 
@@ -148,20 +147,4 @@ check-decode: disorder-decode disorder-normalize
 
 cgi.o: ../lib/definitions.h
 
-# for Mac OS X >=10.4
-SEDFILES=uk.org.greenend.rjk.disorder.plist
-include ${top_srcdir}/scripts/sedfiles.make
-EXTRA_DIST=uk.org.greenend.rjk.disorder.plist.in README.dbversions
-LAUNCHD=/Library/LaunchDaemons
-
-#install-data-hook:
-#      @if [ -d ${LAUNCHD} ]; then \
-#        echo $(INSTALL) -m 644 uk.org.greenend.rjk.disorder.plist ${LAUNCHD};\
-#        $(INSTALL) -m 644 uk.org.greenend.rjk.disorder.plist ${LAUNCHD};\
-#        if [ "$$(NOLAUNCH)" != "" ]; then \
-#          echo launchctl unload ${LAUNCHD} \|\| true;\
-#          launchctl unload ${LAUNCHD} || true;\
-#          echo launchctl load ${LAUNCHD} \|\| true;\
-#          launchctl load ${LAUNCHD} || true;\
-#         fi;\
-#      fi
+EXTRA_DIST=README.dbversions