test remove script

This commit is contained in:
Michel Roegl-Brunner 2025-05-15 15:42:38 +02:00
parent 63b4e0a627
commit 20c27aa959
2 changed files with 10 additions and 1 deletions

View File

@ -1428,6 +1428,15 @@ EOF
systemctl start ping-instances.service
fi
read -p "Remove this script? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
pct stop "$CTID"
pct remove "$CTID"
msg_ok "Removed this script"
else
msg_warn "Did not remove this script"
fi
post_update_to_api "done" "none"
}

View File

@ -443,7 +443,7 @@ install_composer() {
# Download and install latest composer
curl -fsSL https://getcomposer.org/installer -o /tmp/composer-setup.php
script -q -c "php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer" >/dev/null
php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer
if [[ $? -ne 0 ]]; then
msg_error "Failed to install Composer"