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
|
#!/bin/bash
|
||||||
# at the moment only generate dir structure in /build
|
# at the moment only generate dir structure in /build
|
||||||
|
|
||||||
# setup build dir
|
#####################
|
||||||
rootfs=build
|
## setup build dir ##
|
||||||
|
#####################
|
||||||
|
|
||||||
|
rootdir=build
|
||||||
echo "clear build"
|
echo "clear build"
|
||||||
[ -d $rootfs ] && rm -v -R $rootfs
|
[ -d $rootdir ] && rm -v -R $rootdir
|
||||||
mkdir $rootfs
|
mkdir $rootdir
|
||||||
|
|
||||||
|
######################
|
||||||
|
## skripte copieren ##
|
||||||
|
######################
|
||||||
|
|
||||||
echo "copy files"
|
echo "copy files"
|
||||||
## skripte copieren
|
|
||||||
# remaster
|
# remaster
|
||||||
mkdir -p $rootfs/usr/bin/
|
mkdir -p $rootdir/usr/bin/
|
||||||
cp -v src/remaster.sh $rootfs/usr/bin/remaster
|
cp -v src/remaster.sh $rootdir/usr/bin/remaster
|
||||||
chmod +x $rootfs/usr/bin/remaster
|
chmod +x $rootdir/usr/bin/remaster
|
||||||
|
|
||||||
# modules
|
# 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
|
# Pfade anpassen
|
||||||
#sed ...
|
#sed ...
|
||||||
|
|
||||||
|
|
||||||
#mkdeb...
|
#mkdeb...
|
||||||
#not jet
|
#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
|
#!/bin/bash
|
||||||
#@version 1.9.0
|
#@version 1.9.1
|
||||||
#@autor 6543@obermui.de
|
#@autor 6543@obermui.de
|
||||||
#@date 2018-03-26
|
#@date 2018-04-26
|
||||||
#@licence GNUv3
|
#@licence GNUv3
|
||||||
|
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
################## S e t t i n g s ##################################################
|
################## 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
|
#set functions
|
||||||
modus_default="update_pxe"
|
if [ -p "$rootdir/usr/lib/remaster/" ]; then
|
||||||
|
#source "$rootdir/usr/lib/remaster/" ...
|
||||||
#CD/DVD
|
export PATH="$rootdir/usr/lib/remaster/":$PATH
|
||||||
#entweder iso_source oder filesystem_source alls quelle
|
else
|
||||||
# -> bei iso gen erforderlich!
|
echo "ERROR functions not found"
|
||||||
iso_source="/data/remaster/desinfect-2017.iso"
|
exit 1
|
||||||
#destination optinal
|
fi
|
||||||
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"
|
|
||||||
|
|
||||||
|
#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 ########################################################
|
################## 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