diff --git a/src/config.example b/src/config.example index f340e27..751b08a 100644 --- a/src/config.example +++ b/src/config.example @@ -1,3 +1,16 @@ +###################################################################### +## SET THE FOLLOWING TO "TRUE" WHEN YOU HAVE CONFIGURED THIS FILE #### +###################################################################### +CONFIGURED="FALSE" + +if [ "${CONFIGURED}" != "TRUE" ]; then + echo "Config file has not been set up." + exit 1 +fi + +# Beginning of configuration: +############################# + #BORG="/usr/bin/borg" SYSTEM_NAME="name-of-computer" diff --git a/src/install b/src/install old mode 100644 new mode 100755 index bd79067..4c0ebe5 --- a/src/install +++ b/src/install @@ -4,10 +4,21 @@ cp -i ./borgwrapper /usr/local/bin/borgwrapper chown root. /usr/local/bin/borgwrapper chmod 750 /usr/local/bin/borgwrapper -if [! -d /etc/borgwrapper/ ]; then - mkdir /etc/borgwrapper/config +if [ ! -d /etc/borgwrapper/ ]; then + mkdir /etc/borgwrapper fi -cp -i config /etc/borgwrapper/config +if [ ! -e ./config ]; then + echo "Please rename \"config.example\" to \"config\"" + echo "And make sure to update with your settings before running \"install\" again!" + exit 1 +fi + +cp -i ./config /etc/borgwrapper/config chown root. /etc/borgwrapper/config chmod 600 /etc/borgwrapper/config + +echo +echo "Please edit \"/etc/borgwrapper/config\" to make changes to configuration." +echo "Read \"README.md\" for more information." +echo