#!/bin/bash #Check if config is in current directory if [[ ! -f Locations.conf ]];then echo "Location config not found, Please got to the Project directory" exit 10 fi source Locations.conf WorkDir=/opt/TMPLDSIDWD TargetDir="$WWWStore/Tools/CloneZilla" [ -d "$WorkDir" ] || mkdir -p "$WorkDir" mkdir -p $TargetDir #Set architecture CZArch=amd64 # can be amd64 i686-pae or i686 #Get clonezilla Version CZVer=$(wget -q -O- https://clonezilla.org/downloads/download.php?branch=stable |grep "Clonezilla live version:" | sed -e 's/<[^>]*>//g' -e 's/Clonezilla live version: //g') #Download amd64 version wget -O "$WorkDir"/Clonezilla.zip https://sourceforge.net/projects/clonezilla/files/clonezilla_live_stable/$CZVer/clonezilla-live-$CZVer-$CZArch.zip/download unzip -j "$WorkDir"/Clonezilla.zip live/vmlinuz live/initrd.img live/filesystem.squashfs live/Clonezilla-Live-Version -d $TargetDir rm -rf "$WorkDir"