Update of /cvsroot/devil-linux/build/scripts
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv15706
Added Files:
bareos
Log Message:
added bareos
--- NEW FILE: bareos ---
#!/bin/bash
# $Source: /cvsroot/devil-linux/build/scripts/bareos,v $
# $Revision: 1.1 $ # $Date: 2016/01/01 21:26:27 $
#
# http://www.devil-linux.org
# you need the next line, otherwise script won't be executed !!!
# DL-build-system v3
# get the directoryname of the script
MYDIR=${0%/*}
MYSCRIPT=${0##/*/}
# source functions and config
source $MYDIR/settings
case $1 in
build )
if [ "$CONFIG_BAREOS" = "y" ]; then
./configure --prefix=/usr --disable-nls --with-mysql --sysconfdir=/etc --with-working-dir=/var/bareos/working \
--enable-batch-insert --with-dir-user=bareos --with-dir-group=backup --with-logdir=/var/log/bareos \
--with-sd-user=bareos --with-sd-group=backup --with-lzo=/usr/lib --with-openssl --with-readline \
--with-zlib --with-lzo || exit 1
make $PMAKE || exit 1
fi
;;
install )
if [ "$CONFIG_BAREOS" = "y" ]; then
rm -rf $TMPDIR || exit 1
copy_docs $TMPDIR
userdel bareos
groupdel backup
groupadd -g 111 backup
useradd -u 115 -g backup -G tape -c "Bareos backup system" -s /bin/false bareos || exit 1
make install DESTDIR=$TMPDIR || exit 1
cp -dvpR $TMPDIR/etc $ETCDIR/ || exit 1
rm -rf $TMPDIR/etc || exit 1
rm -rf $TMPDIR/tmp || exit 1
chown -R root.backup $ETCDIR/etc/bareos || exit 1
chmod 770 $ETCDIR/etc/bareos || exit 1
chmod -R o-rwx $ETCDIR/etc/bareos/* || exit 1
chown -R bareos.backup $TMPDIR/var/bareos || exit 1
chmod 555 $TMPDIR/usr/lib/*
cp -dvpR $TMPDIR/* $CDDIR/ || exit 1
rm -rf $TMPDIR || exit 1
cp $MYDIR/scripts/bareos $ETCDIR/etc/init.d || exit 1
echo "# Start the various Bareos daemons?" >> $CONFIGFILE
echo "START_BAREOS_DIR=no" >> $CONFIGFILE
echo "START_BAREOS_SD=no" >> $CONFIGFILE
echo "START_BAREOS_FD=no" >> $CONFIGFILE
echo >> $CONFIGFILE
echo "HELP_BAREOS_SD=\"Backula Backup System Storage Daemon\"" >> $SOFTWAREHELP
echo "HELP_BAREOS_FD=\"Backula Backup System File Daemon\"" >> $SOFTWAREHELP
echo "HELP_BAREOS_DIR=\"Backula Backup System Director\"" >> $SOFTWAREHELP
fi
;;
* )
echo "ERROR ($0)"
echo "please add parameter so I know what to do"
exit 1
;;
esac
|