Skip to content
Snippets Groups Projects
Commit 1387000c authored by Tomáš Plesník's avatar Tomáš Plesník
Browse files

bugfix: smazani vsech binarek z nastaveneho adresare pro symlinky; podminky...

bugfix: smazani vsech binarek z nastaveneho adresare pro symlinky; podminky pro spusteni funkce deleteSymlinks presunuty do tela funkce; pridan vypis Summary
parent 6a0d4365
No related branches found
No related tags found
No related merge requests found
......@@ -142,12 +142,17 @@ uninstallWardenServer()
deleteSymlinks()
{
echo -n "Deleting symlinks from $symbin ... "
for file in "$symbin/"*
do
rm -f "${symbin}/${file##*/}" 2> /dev/null
done
echo "OK"
echo -n "Checking symbolic links directory $symbin ... "
if [[ -d $symbin && -w $symbin ]]; then
echo "OK"
for file in "$bin/"*
do
echo "- removing symlink: ${symbin}/${file##*/} -> $file"
rm -f "${symbin}/${file##*/}" 2> /dev/null
done
else
echo "FAILED!"
fi
}
......@@ -181,7 +186,7 @@ backup="/tmp/warden-backup"
echo "Uninstallation of Warden server package ..."
echo
echo "------------------------- Uninstallation process --------------------------------"
echo "------------------------- Uninstallation process ------------------------"
# check Warden server directory if exists
wardenDirChck
......@@ -196,7 +201,10 @@ createBackup
uninstallWardenServer || exit 1
# delete symlinks from $symbin (if -s option is set)
[[ ! -z "$symbin" ]] && [[ -d "$symbin" ]] && [[ -w "$symbin" ]] && deleteSymlinks
[[ ! -z "$symbin" ]] && deleteSymlinks
echo
echo "------------------------- Summary ---------------------------------------"
echo
echo "Please follow post-uninstallation steps in ${uninstall}."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment