From 7ef6745ec54fee42e1056aa7ade06feba3222820 Mon Sep 17 00:00:00 2001 From: Bryan Date: Wed, 4 Nov 2020 23:40:36 -0600 Subject: [PATCH] uptate install script to display progress --- install | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/install b/install index e12a319..154fe93 100755 --- a/install +++ b/install @@ -1,11 +1,13 @@ #! /bin/bash # Copy borgwrapper to bin directory +echo "Installing borgwrapper in: /usr/local/bin/" cp -i ./src/borgwrapper /usr/local/bin/borgwrapper chown root. /usr/local/bin/borgwrapper chmod 750 /usr/local/bin/borgwrapper # Make borgwrapper config directory and move config file +echo "Making directory: /etc/borgwrapper" if [ ! -d /etc/borgwrapper/ ]; then mkdir /etc/borgwrapper fi @@ -16,13 +18,17 @@ if [ ! -e ./config ]; then exit 1 fi +echo "Copying config to: /etc/borgwrapper/config" cp -i ./config /etc/borgwrapper/config chown root. /etc/borgwrapper/config chmod 600 /etc/borgwrapper/config # Setup systemd +echo "Setting up systemd" +echo "Copying systemd timer and service unit files to: /etc/systemd/system/" cp ./systemd/*.{timer,service} /etc/systemd/system/ - + +echo "Enabling and starting backup and verify systemd timer units" for config_file in /etc/borgwrapper/* do config_file=$(basename ${config_file}) @@ -34,10 +40,13 @@ do done # Setup logrotate +echo "Setting up logrotate for borgwrapper log files" +echo "Creating directory: /var/log/borgwrapper/" if [ ! -d /var/log/borgwrapper ]; then mkdir /var/log/borgwrapper fi +echo "Creating logrotate file: /etc/logrotate.d/borgwrapper" ( cat <