FreeBSD parts of scripts/setup.
There is also scripts/teardown to undo scripts/setup, but that is
intended for debugging scripts/setup, not for production use, so we
don't advertize it anywhere.
lib/version-string
lib/version.h
scripts/setup
+examples/disorder.rc
+scripts/teardown
particular, since my FreeBSD VM lacks sound support, only network play
has been tested. Please report successes and failures!
-Use gmake to build DisOrder, not BSD make.
+Use gmake to build DisOrder, not BSD make:
+ ./configure
+ gmake
+ sudo gmake install
-
-Things you will need to do:
-
-* Create the jukebox user and group
-
- sudo pw groupadd -n jukebox
- sudo pw useradd -n jukebox
- sudo pw groupmod jukebox -m jukebox
-
-* Arrange for the server to start at boot time
-
-* Start the server
+Then to set up:
+ sudo scripts/setup
#
# This file is part of DisOrder.
-# Copyright (C) 2004, 2005 Richard Kettlewell
+# Copyright (C) 2004, 2005, 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
# USA
#
-noinst_SCRIPTS=disorder.init
+noinst_SCRIPTS=disorder.init disorder.rc
noinst_DATA=config.sample
-SEDFILES=disorder.init config.sample
+SEDFILES=disorder.init config.sample disorder.rc
include ${top_srcdir}/scripts/sedfiles.make
-EXTRA_DIST=disorder.init.in config.sample.in disorder-log
+EXTRA_DIST=disorder.init.in config.sample.in disorder-log disorder.rc.in
CLEANFILES=$(SEDFILES)
--- /dev/null
+#! /bin/sh
+#
+# This file is part of DisOrder.
+# Copyright (C) 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
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA
+
+# PROVIDE: disorder
+# REQUIRE: DAEMON
+
+. /etc/rc.subr
+
+name=disorder
+pidfile=/var/run/disorderd.pid
+procname=disorderd
+command=sbindir/disorderd
+command_args="--pidfile $pidfile"
+
+load_rc_config $name
+run_rc_command "$1"
+
#
dist_pkgdata_DATA=completion.bash
-noinst_SCRIPTS=setup
+noinst_SCRIPTS=setup teardown
-SEDFILES=setup
+SEDFILES=setup teardown
include ${top_srcdir}/scripts/sedfiles.make
EXTRA_DIST=htmlman sedfiles.make text2c oggrename make-unidata \
- format-gcov-report make-version-string setup.in
+ format-gcov-report make-version-string setup.in teardown.in
CLEANFILES=$(SEDFILES)
launchctl start uk.org.greenend.rjk.disorder
echo "Installing CGI"
install -m 555 server/disorder.cgi /Library/WebServer/CGI-Executables/disorder
- echo "Setting up link to CGI;'s dependencies"
+ echo "Setting up link to CGI's dependencies"
rm -f /Library/WebServer/Documents/disorder
ln -s pkgdatadir/static /Library/WebServer/Documents/disorder
echo
echo "You must sudo disorder setup-guest [--no-online-registration] next."
;;
+FreeBSD )
+ echo "Installing startup script into /etc/rc.d"
+ install -m 555 examples/disorder.rc /etc/rc.d/disorder
+ echo "Starting DisOrder server"
+ /etc/rc.d/disorder start
+ echo "Identifying web server"
+ set /usr/local/www/*
+ case $# in
+ 0 )
+ echo
+ echo "Could not find a web server"
+ exit 1
+ ;;
+ 1 )
+ ;;
+ * )
+ echo
+ echo "Yikes! There seems to be more than one web server here."
+ echo "Guessing that you want $1."
+ echo
+ ;;
+ esac
+ web=$1
+ echo "Found $web"
+ echo "Installing CGI"
+ install -m 555 server/disorder.cgi $web/cgi-bin/disorder
+ echo "Setting up link to CGI's dependencies"
+ rm -f $web/data/disorder
+ ln -s pkgdatadir/static $web/data/disorder
+ echo
+ echo "You must sudo disorder setup-guest [--no-online-registration] next."
+ ;;
* )
echo "Sorry, I don't know how to install the server on this platform."
echo "You will have to do that by hand."
--- /dev/null
+#! /bin/bash
+#
+# This file is part of DisOrder
+# Copyright (C) 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
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA
+#
+set -e
+
+case $(uname -s) in
+FreeBSD )
+ APACHE=apache22
+ echo "* killing disorderd processes"
+ killall disorderd || true
+ echo "* removing files"
+ rm -f /usr/local/www/$APACHE/cgi-bin/disorder
+ rm -f /usr/local/www/$APACHE/data/disorder
+ rm -f /etc/rc.d/disorder
+ rm -rf pkgstatedir
+ rm -rf pkgconfdir
+ echo "* removing user and group"
+ pw groupdel jukebox || true
+ pw userdel jukebox || true
+ ;;
+* )
+ echo Unknown operating system >&2
+ exit 1
+esac