#
# Bash script an easy setup of NextcloudBackup.sh and NextcloudRestore.sh
#
-# Version 2.0.0
+# Version 2.3.0
#
# Usage:
# - call the setup.sh script
# However, you should always check the backup/restore scripts BEFORE executing these!
#
+# Make sure the script exits when any command fails
+set -Eeuo pipefail
+
#
# Pre defined variables
#
echo "Enter the webserver service name."
echo "Usually: nginx or apache2"
echo ""
-read -p "Enter an new webserver service name or press ENTER if the webserver user is ${webserverServiceName}: " WEBSERVERSERVICENAME
+read -p "Enter an new webserver service name or press ENTER if the webserver service name is ${webserverServiceName}: " WEBSERVERSERVICENAME
[ -z "$WEBSERVERSERVICENAME" ] || webserverServiceName=$WEBSERVERSERVICENAME
clear
if [ $? -ne 0 ]; then
echo "Error calling OCC: Please check if the information provided was correct."
- echo "ABORTING!"
+ echo "ABORTING!"
echo "No file has been altered."
exit 1
fi