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() ...@@ -142,12 +142,17 @@ uninstallWardenServer()
deleteSymlinks() deleteSymlinks()
{ {
echo -n "Deleting symlinks from $symbin ... " echo -n "Checking symbolic links directory $symbin ... "
for file in "$symbin/"* if [[ -d $symbin && -w $symbin ]]; then
do echo "OK"
rm -f "${symbin}/${file##*/}" 2> /dev/null for file in "$bin/"*
done do
echo "OK" 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" ...@@ -181,7 +186,7 @@ backup="/tmp/warden-backup"
echo "Uninstallation of Warden server package ..." echo "Uninstallation of Warden server package ..."
echo echo
echo "------------------------- Uninstallation process --------------------------------" echo "------------------------- Uninstallation process ------------------------"
# check Warden server directory if exists # check Warden server directory if exists
wardenDirChck wardenDirChck
...@@ -196,7 +201,10 @@ createBackup ...@@ -196,7 +201,10 @@ createBackup
uninstallWardenServer || exit 1 uninstallWardenServer || exit 1
# delete symlinks from $symbin (if -s option is set) # delete symlinks from $symbin (if -s option is set)
[[ ! -z "$symbin" ]] && [[ -d "$symbin" ]] && [[ -w "$symbin" ]] && deleteSymlinks [[ ! -z "$symbin" ]] && deleteSymlinks
echo
echo "------------------------- Summary ---------------------------------------"
echo echo
echo "Please follow post-uninstallation steps in ${uninstall}." 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