add pve/init.sh

This commit is contained in:
Frank Schulte
2023-08-06 18:39:07 +02:00
commit 5384f1e034

37
pve/init.sh Normal file
View File

@@ -0,0 +1,37 @@
#!/bin/sh
unset -v GITEA_TOKEN
RET=0
set -x
apt update
RET=$(( ${RET} + $? ))
apt install git
RET=$(( ${RET} + $? ))
mkdir -p /root/repo
RET=$(( ${RET} + $? ))
git clone https://git.amintabh.de/fschulte.de/pve.git /root/repo/pve
RET=$(( ${RET} + $? ))
find /root/repo/pve -type d --print 2>/dev/null
RET=$(( ${RET} + $? ))
cd /root/repo/pve
RET=$(( ${RET} + $? ))
git fetch --all
RET=$(( ${RET} + $? ))
git pull
RET=$(( ${RET} + $? ))
echo "# RET=${RET} - bootstrap.sh finished."
exit ${RET}
# === END ===