This commit is contained in:
lrgex
2023-11-15 15:25:33 +03:00
parent de388e7ae3
commit 880b4ebd09
8 changed files with 89 additions and 42 deletions

View File

@@ -6,22 +6,13 @@ cat << "EOF"
██║ ██╔══██╗██║ ██║██╔══╝ ██╔██╗
███████╗██║ ██║╚██████╔╝███████╗██╔╝ ██╗
╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝
╦╔═┬ ┬┌─┐┌─┐┌─┐┬─┐
╠╩╗│ │├─┘├─┘├┤ ├┬┘
╩ ╩┴─┘┴┴ ┴ └─┘┴└─ v2.3
╦╔═┬ ┬┌─┐┌─┐┌─┐┬─┐ ╔╦╗┌─┐┌─┐┬┌─┌─┐┬─┐
╠╩╗│ │├─┘├─┘├┤ ├┬┘───║║│ ││ ├┴┐├┤ ├┬┘
╩ ╩┴─┘┴┴ ┴ └─┘┴└─ ═╩╝└─┘└─┘┴ ┴└─┘┴└─ v2.5
EOF
##################### Starting code #####################
##################### Backarosa #####################
backarosa=$(grep -c "restore done" /opt/lrgex/flags)
if [ ! $backarosa ]; then
echo "Backuping klipper files..."
cp -r /home/lrgex /tmp/lrgex
fi
##################### End Backarosa #####################
# This script will run on every container start
if ! systemctl is-enabled nginx > /dev/null 2>&1; then
echo "Enabling NGINX..."
@@ -66,13 +57,6 @@ for package in "${packages_array[@]}"; do
fi
done
if [ "${RESTORE}" = "true" ] && [ ! $backarosa ]; then
echo "Restoring klipper files..."
cp -r /tmp/lrgex /home/lrgex
rm -rf /tmp/lrgex
echo "restore done" >> /opt/lrgex/flags
fi
##################### End code #####################