#!/bin/sh
# Copyright (C) 2004 William Wong
#
# 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
#
#*************************************************************************
# save nukeldap support in compressed archive
# used when developing nukeldap
cd /home/bwong
# setup directories
rm -f -r nukeldap.2.$1
mkdir nukeldap.2.$1
cd nukeldap.2.$1
mkdir -p etc/openldap
mkdir -p var/www/html/modules/Your_Account/admin
mkdir -p var/www/html/db
mkdir -p opt/scripts
mkdir -p usr/share/openldap/schema
# copy files
cp ../saveldap .
cp -R ../nukeldap/* .
cp /etc/sudoers etc
cp /etc/openldap/slapd.conf etc/openldap
cp /var/www/html/db/synch-*.php var/www/html/db
cp /var/www/html/db/db.php  var/www/html/db
cp /var/www/html/modules/Your_Account/index.php var/www/html/modules/Your_Account
cp /var/www/html/modules/Your_Account/admin/index.php var/www/html/modules/Your_Account/admin
cp /opt/scripts/* opt/scripts
cp /usr/share/openldap/schema/nuke.schema usr/share/openldap/schema
# cleanup
rm -f *.*~ *~
cd /home/bwong
# create compressed archive
tar -czv nukeldap.2.$1 >nukeldap.2.$1.tar.gz
# save it on the network
cp nukeldap.2.$1.tar.gz /mnt/S/drivers/wong

