restructure: seperate config
This commit is contained in:
parent
1c4dc6ac56
commit
da68365153
@ -0,0 +1,2 @@
|
||||
2018-04-26 - 1.9.1
|
||||
* seperate script and config
|
34
gendeb.sh
34
gendeb.sh
@ -1,25 +1,39 @@
|
||||
#!/bin/bash
|
||||
# at the moment only generate dir structure in /build
|
||||
|
||||
# setup build dir
|
||||
rootfs=build
|
||||
#####################
|
||||
## setup build dir ##
|
||||
#####################
|
||||
|
||||
rootdir=build
|
||||
echo "clear build"
|
||||
[ -d $rootfs ] && rm -v -R $rootfs
|
||||
mkdir $rootfs
|
||||
[ -d $rootdir ] && rm -v -R $rootdir
|
||||
mkdir $rootdir
|
||||
|
||||
######################
|
||||
## skripte copieren ##
|
||||
######################
|
||||
|
||||
echo "copy files"
|
||||
## skripte copieren
|
||||
|
||||
# remaster
|
||||
mkdir -p $rootfs/usr/bin/
|
||||
cp -v src/remaster.sh $rootfs/usr/bin/remaster
|
||||
chmod +x $rootfs/usr/bin/remaster
|
||||
mkdir -p $rootdir/usr/bin/
|
||||
cp -v src/remaster.sh $rootdir/usr/bin/remaster
|
||||
chmod +x $rootdir/usr/bin/remaster
|
||||
|
||||
# modules
|
||||
mkdir -p $rootfs/usr/lib/remaster/
|
||||
#...
|
||||
mkdir -p $rootdir/usr/lib/remaster/
|
||||
for i in dist functions mods; do
|
||||
cp -v src/$i/* $rootdir/usr/lib/remaster/
|
||||
done
|
||||
|
||||
# setting
|
||||
cp -v src/config.sample.cfg $rootdir/etc/remaster/config.sample.cfg
|
||||
|
||||
|
||||
# Pfade anpassen
|
||||
#sed ...
|
||||
|
||||
|
||||
#mkdeb...
|
||||
#not jet
|
||||
|
39
src/config.sample.cfg
Normal file
39
src/config.sample.cfg
Normal file
@ -0,0 +1,39 @@
|
||||
#cfg
|
||||
|
||||
#########################################################
|
||||
## sample-config rename it to config.cfg after changes ##
|
||||
#########################################################
|
||||
|
||||
## MODUS
|
||||
modus_default="update_pxe"
|
||||
|
||||
#CD/DVD
|
||||
#entweder iso_source oder filesystem_source alls quelle
|
||||
# -> bei iso gen erforderlich!
|
||||
iso_source="/data/remaster/desinfect-2017.iso"
|
||||
#destination optinal
|
||||
iso_destination="/data/remaster/result/custom_desinfect_`date '+%Y-%m-%d'`.iso"
|
||||
iso_lable="DESINFECT_`date '+%Y-%m-%d'`"
|
||||
|
||||
#Filesystem (for pxe)
|
||||
#entweder iso_source oder filesystem_source alls quelle
|
||||
filesystem_source="/data/remaster/result/filesystem.squashfs"
|
||||
|
||||
#Network
|
||||
proxy_host="proxy.local"
|
||||
proxy_port="8080"
|
||||
domain="local"
|
||||
nameserver="10.x.x.2,10.x.x.1"
|
||||
|
||||
#remaster_script
|
||||
distro="desinfect2017"
|
||||
|
||||
#LOG
|
||||
log_file="/data/remaster/logs/`date '+%Y-%m-%d'`.log"
|
||||
log_mail_source="desinfect@email.clocal"
|
||||
log_mail_smtp="smtp.mail.local:25"
|
||||
log_mail_aim="6543@email.clocal"
|
||||
log_mail_subject="Desinfect_Remaster"
|
||||
|
||||
#Sonstiges
|
||||
tools_list="xrdp clamav nano htop nmon iftop tmux dsniff nmap openssh-server tightvncserver rsync e2fsprogs foremost gddrescue recoverjpeg safecopy sleuthkit testdisk arp-scan"
|
0
src/dist/desinfect17
vendored
Normal file
0
src/dist/desinfect17
vendored
Normal file
0
src/dist/ubuntu.16.04
vendored
Normal file
0
src/dist/ubuntu.16.04
vendored
Normal file
0
src/functions/chroot_clean
Normal file
0
src/functions/chroot_clean
Normal file
0
src/mods/xrdp
Normal file
0
src/mods/xrdp
Normal file
0
src/pxe/pxe.cfg
Normal file
0
src/pxe/pxe.cfg
Normal file
@ -1,47 +1,36 @@
|
||||
#!/bin/bash
|
||||
#@version 1.9.0
|
||||
#@version 1.9.1
|
||||
#@autor 6543@obermui.de
|
||||
#@date 2018-03-26
|
||||
#@date 2018-04-26
|
||||
#@licence GNUv3
|
||||
|
||||
#####################################################################################
|
||||
################## S e t t i n g s ##################################################
|
||||
#####################################################################################
|
||||
#get base dir
|
||||
rootdir=`echo $0 | rev | cut -d "/" -f 2- | rev`/../../
|
||||
rootdir=`readlink -e $rootdir`
|
||||
|
||||
## MODUS
|
||||
modus_default="update_pxe"
|
||||
|
||||
#CD/DVD
|
||||
#entweder iso_source oder filesystem_source alls quelle
|
||||
# -> bei iso gen erforderlich!
|
||||
iso_source="/data/remaster/desinfect-2017.iso"
|
||||
#destination optinal
|
||||
iso_destination="/data/remaster/result/custom_desinfect_`date '+%Y-%m-%d'`.iso"
|
||||
iso_lable="DESINFECT_`date '+%Y-%m-%d'`"
|
||||
|
||||
#Filesystem (for pxe)
|
||||
#entweder iso_source oder filesystem_source alls quelle
|
||||
filesystem_source="/data/remaster/result/filesystem.squashfs"
|
||||
|
||||
#Network
|
||||
proxy_host="proxy.local"
|
||||
proxy_port="8080"
|
||||
domain="local"
|
||||
nameserver="10.x.x.2,10.x.x.1"
|
||||
|
||||
#remaster_script
|
||||
distro="desinfect2017"
|
||||
|
||||
#LOG
|
||||
log_file="/data/remaster/logs/`date '+%Y-%m-%d'`.log"
|
||||
log_mail_source="desinfect@email.clocal"
|
||||
log_mail_smtp="smtp.mail.local:25"
|
||||
log_mail_aim="6543@email.clocal"
|
||||
log_mail_subject="Desinfect_Remaster"
|
||||
|
||||
#Sonstiges
|
||||
tools_list="xrdp clamav nano htop nmon iftop tmux dsniff nmap openssh-server tightvncserver rsync e2fsprogs foremost gddrescue recoverjpeg safecopy sleuthkit testdisk arp-scan"
|
||||
#set functions
|
||||
if [ -p "$rootdir/usr/lib/remaster/" ]; then
|
||||
#source "$rootdir/usr/lib/remaster/" ...
|
||||
export PATH="$rootdir/usr/lib/remaster/":$PATH
|
||||
else
|
||||
echo "ERROR functions not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#read main setting
|
||||
if [ -f "$rootdir/etc/remaster/config.cfg"]; then
|
||||
source "$rootdir/etc/remaster/config.cfg"
|
||||
else
|
||||
if [ -f "$rootdir/etc/remaster/config.sample.cfg"]; then
|
||||
source "$rootdir/etc/remaster/config.sample.cfg"
|
||||
else
|
||||
echo "ERROR config not found"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
#####################################################################################
|
||||
################## M o d e s ########################################################
|
||||
|
0
src/web/index.html
Normal file
0
src/web/index.html
Normal file
Loading…
Reference in New Issue
Block a user