Compare commits

...

6 Commits

Author SHA1 Message Date
Paul
711fb6669d
Update build.func moar spacing 2024-11-26 13:43:59 +13:00
Paul
90680d9ff1
Update build.func added spacing 2024-11-26 13:43:36 +13:00
Paul
0aa7eb2e9c
Update build.func check if user wants to proceed 2024-11-26 13:41:34 +13:00
Paul
aa0844cd05
added warnings 2024-11-26 13:35:53 +13:00
Paul
b7278cc227
Update install.func to make update local 2024-11-26 13:29:13 +13:00
Paul
8a6b2962ab
build.func now sources a script locally 2024-11-26 13:25:03 +13:00
2 changed files with 25 additions and 2 deletions

View File

@ -1,3 +1,26 @@
echo ""
echo "🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨"
echo "🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨"
echo "🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨This is a local debug script. It is UNOFFICIAL. 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨"
echo "🚨🚨🚨🚨🚨🚨🚨🚨🚨 It must be fun in the root folder of a checked out repo. 🚨🚨🚨🚨🚨🚨🚨🚨"
echo "🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨The LXC it creates should NOT be used for production. 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨"
echo "🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨"
echo "🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨"
echo ""
if [ ! -d "misc" ] || [ ! -d "ct" ] || [ ! -d "install" ] || [ ! -f "README.md" ]; then
echo "🚨 Error: This script must be run from the root directory of the repository."
echo "🚨 Ensure you're in the directory containing 'misc', 'ct', 'install', and 'README.md'."
echo '🚨 Run the install script like $ bash ct/myapp.sh'
exit 1
fi
echo ""
echo "This script is about to run and will execute."
read -p "Do you understand and want to proceed? (y/n): " CONFIRM
if [[ "$CONFIRM" != "y" && "$CONFIRM" != "Y" ]]; then
echo "Exiting. Script was not executed."
exit 0
fi
variables() {
NSAPP=$(echo ${APP,,} | tr -d ' ') # This function sets the NSAPP variable by converting the value of the APP variable to lowercase and removing any spaces.
var_install="${NSAPP}-install" # sets the var_install variable by appending "-install" to the value of NSAPP.
@ -666,7 +689,7 @@ http://dl-cdn.alpinelinux.org/alpine/latest-stable/community
EOF'
pct exec "$CTID" -- ash -c "apk add bash >/dev/null"
fi
lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/install/$var_install.sh)" || exit
lxc-attach -n "$CTID" -- bash -c "$(cat install/$var_install.sh)" || exit
}

View File

@ -198,6 +198,6 @@ EOF
systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//')
msg_ok "Customized Container"
fi
echo "bash -c \"\$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/${app}.sh)\"" >/usr/bin/update
echo "bash -c \"\$(cat ct/${app}.sh)\"" >/usr/bin/update
chmod +x /usr/bin/update
}