bigbluebutton-Github/bbb-libreoffice/uninstall-local.sh

27 lines
706 B
Bash
Raw Normal View History

#!/bin/bash
2020-07-24 13:42:51 +08:00
set -e
if [ "$EUID" -ne 0 ]; then
2020-07-24 13:42:51 +08:00
echo "Please run this script as root ( or with sudo )" ;
exit 1;
fi;
2020-07-03 03:20:36 +08:00
IMAGE_CHECK=`docker image inspect bbb-soffice 2>&1 > /dev/null && echo 1 || echo 0`
if [ "$IMAGE_CHECK" = "1" ]; then
echo "Removing image"
docker image rm bbb-soffice
fi
FOLDER_CHECK=`[ -d /usr/share/bbb-libreoffice-conversion/ ] && echo 1 || echo 0`
if [ "$FOLDER_CHECK" = "1" ]; then
echo "Removing install folder"
rm -rf /usr/share/bbb-libreoffice-conversion/
fi;
FILE_SUDOERS_CHECK=`[ -f /etc/sudoers.d/zzz-bbb-docker-libreoffice ] && echo 1 || echo 0`
if [ "$FILE_SUDOERS_CHECK" = "1" ]; then
echo "Removing Sudoers file"
rm /etc/sudoers.d/zzz-bbb-docker-libreoffice
fi;