mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-01 20:42:11 +00:00
update
This commit is contained in:
parent
a75cf7efbe
commit
2e944a9fc1
1 changed files with 1 additions and 26 deletions
27
update.sh
27
update.sh
|
@ -12,32 +12,6 @@ myGREEN="[0;32m"
|
||||||
myWHITE="[0;0m"
|
myWHITE="[0;0m"
|
||||||
myBLUE="[0;34m"
|
myBLUE="[0;34m"
|
||||||
|
|
||||||
|
|
||||||
# Let's check for version
|
|
||||||
function fuCHECK_VERSION {
|
|
||||||
myMINVERSION="18.04.0"
|
|
||||||
myMASTERVERSION="18.04.0"
|
|
||||||
echo
|
|
||||||
echo -n "##### Checking for version tag: "
|
|
||||||
if [ -f "version" ];
|
|
||||||
then
|
|
||||||
myVERSION=$(cat version)
|
|
||||||
echo "[ OK ] - You are running $myVERSION"
|
|
||||||
if [[ "$myVERSION" > "$myMINVERSION" || "$myVERSION" == "$myMINVERSION" ]] && [[ "$myVERSION" < "$myMASTERVERSION" || "$myVERSION" == "$myMASTERVERSION" ]]
|
|
||||||
then
|
|
||||||
echo "##### Valid version found. Update procedure will be initiated."
|
|
||||||
exit
|
|
||||||
else
|
|
||||||
echo "##### Your T-Pot installation cannot be upgraded automatically. Please run a fresh install."
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "[ NOT OK ]"
|
|
||||||
echo "##### 'version' is missing. Please run 'update.sh' from within '/opt/tpot'."
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Got root?
|
# Got root?
|
||||||
myWHOAMI=$(whoami)
|
myWHOAMI=$(whoami)
|
||||||
if [ "$myWHOAMI" != "root" ]
|
if [ "$myWHOAMI" != "root" ]
|
||||||
|
@ -84,6 +58,7 @@ mySITES=$1
|
||||||
done;
|
done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Self Update
|
||||||
function fuSELFUPDATE () {
|
function fuSELFUPDATE () {
|
||||||
echo "### Now checking for newer files in repository ..."
|
echo "### Now checking for newer files in repository ..."
|
||||||
git fetch
|
git fetch
|
||||||
|
|
Loading…
Reference in a new issue