From: <smi...@us...> - 2004-03-01 23:39:33
|
Update of /cvsroot/devil-linux/build/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6332/scripts Added Files: motion Log Message: initial checkin of motion --- NEW FILE: motion --- #!/bin/bash # $Source: /cvsroot/devil-linux/build/scripts/motion,v $ # $Revision: 1.1 $ # $Date: 2004/03/01 23:20:21 $ # # http://www.devil-linux.org # you need the next line, otherwise script won't be executed !!! # DL-build-system v3 ### BEGIN INIT INFO # Provides: motion # Required-Start: $basebuildtools $libs # Required-Stop: # Default-Start: 1 2 # Default-Stop: # Description: Motion Detection Software ### END INIT INFO # get the directoryname of the script MYDIR=${0%/*} # source functions and config source $MYDIR/settings source $MYDIR/functions MYNAME=MOTION case $1 in build ) if [ "$CONFIG_MOTION" = "y" ]; then OPT_FLAGS="" if [ ! "$CONFIG_MYSQL_CLIENT" = "y" ]; then OPT_FLAGS="$OPT_FLAGS --without-mysql" fi if [ ! "$CONFIG_POSTGRESQL_CLIENT" = "y" ]; then OPT_FLAGS="$OPT_FLAGS --without-pgsql" else OPT_FLAGS="$OPT_FLAGS --with-pgsql=/usr/include" fi /bin/sh configure --prefix=$WORKDIR/tmp/usr --bindir=$WORKDIR/tmp/usr/sbin \ --sysconfdir=$WORKDIR/tmp/etc --mandir=$WORKDIR/tmp/usr/share/man $OPT_FLAGS || exit 1 make $PMAKE all || exit 1 strip_debug fi ;; install ) if [ "$CONFIG_MOTION" = "y" ]; then rm -rf $WORKDIR/tmp || exit 1 make install || exit 1 copy_docs $WORKDIR/tmp || exit 1 copy_man $WORKDIR/tmp || exit 1 cp -dp $WORKDIR/tmp/etc/* $ETCDIR/etc || exit 1 copy_files $WORKDIR/tmp/usr/sbin $CDDIR/ || exit 1 cp -dp $MYDIR/scripts/motion $ETCDIR/etc/init.d/ || exit 1 rm -rf $WORKDIR/tmp || exit 1 echo "# Start Motion?" >> $CONFIGFILE echo "START_$MYNAME=no" >> $CONFIGFILE echo >> $CONFIGFILE echo "# which modules should we load before we start motion?" >> $CONFIGFILE echo "MOTION_MODULES=" >> $CONFIGFILE echo >> $CONFIGFILE echo "HELP_$MYNAME=\"Motion Decection Software for v4l devices\"" >> $SOFTWAREHELP fi ;; * ) echo "ERROR ($0)" echo "please add parameter so I know what to do" exit 1 ;; esac |