Adding already installed instance verification

This commit is contained in:
Félix Aime 2021-01-20 17:59:50 +01:00
parent dd5e5fedea
commit 9895981ece

View File

@ -353,6 +353,13 @@ reboot_box() {
if [[ $EUID -ne 0 ]]; then if [[ $EUID -ne 0 ]]; then
echo "This must be run as root. Type in 'sudo bash $0' to run." echo "This must be run as root. Type in 'sudo bash $0' to run."
exit 1 exit 1
elif [[ -f /usr/share/tinycheck/config.yaml ]]; then
echo "You have a TinyCheck instance already installed on this box."
echo " - If you want to update the instance, please execute:"
echo " sudo bash /usr/share/tinycheck/update.sh"
echo " - If you want to uninstall the instance, please execute:"
echo " sudo bash /usr/share/tinycheck/uninstall.sh"
exit 1
else else
welcome_screen welcome_screen
check_operating_system check_operating_system