diff options
author | root | 2014-06-30 15:21:04 +0200 |
---|---|---|
committer | root | 2014-06-30 15:21:04 +0200 |
commit | 9aabe45d6e2865dcc95e4a6f5823c9310904b1e9 (patch) | |
tree | 2b53f43e95d3944b73864f4e5995a75ab42a61b0 /satellit_installer/includes/10-uninstall_packages.inc | |
download | setup-scripts-9aabe45d6e2865dcc95e4a6f5823c9310904b1e9.tar.gz setup-scripts-9aabe45d6e2865dcc95e4a6f5823c9310904b1e9.tar.xz setup-scripts-9aabe45d6e2865dcc95e4a6f5823c9310904b1e9.zip |
[SSPS] Satellite server preparation script. Further heavy debugging needed -
this is just the first checkin after tidying to server as a starting point.
Diffstat (limited to 'satellit_installer/includes/10-uninstall_packages.inc')
-rwxr-xr-x | satellit_installer/includes/10-uninstall_packages.inc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/satellit_installer/includes/10-uninstall_packages.inc b/satellit_installer/includes/10-uninstall_packages.inc new file mode 100755 index 0000000..fb7e146 --- /dev/null +++ b/satellit_installer/includes/10-uninstall_packages.inc @@ -0,0 +1,20 @@ +#!/bin/bash + +# This is only meant for development purposes! + +uninstall_packages() { + local NEEDED_PACKAGES="$1" + + echo "Uninstall packages..." + for PACKAGE in $NEEDED_PACKAGES; do + echo "Purging package $PACKAGE..." + apt-get -qq purge "${PACKAGE}" 2>/dev/null 1>&2 + ERR=$? + if [ "$ERR" -ne 0 ]; then + echo "Could not purge package $PACKAGE!" + # Weitere Fehlerbehandlung folgt + fi + done + apt-get -qq autoremove 2>/dev/null 1>&2 +} + |