From 0ed87e11eef1f9e3f1c534c3b2c811819dc40491 Mon Sep 17 00:00:00 2001 From: Bachir Soussi Chiadmi Date: Sat, 28 Apr 2018 23:19:51 +0200 Subject: [PATCH] urbackup client install functional --- assets/urbackup.service | 2 +- bin/urbackup.sh | 20 +++++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/assets/urbackup.service b/assets/urbackup.service index fb7dc12..4b0de01 100644 --- a/assets/urbackup.service +++ b/assets/urbackup.service @@ -5,7 +5,7 @@ ConditionPathExists=/usr/local/sbin/urbackupclientbackend [Service] Type=forking ExecStart=/usr/local/sbin/urbackupclientbackend -d -PIDFile = /var/run/urbackup_clt.pid +PIDFile = /var/run/urbackup_srv.pid TimeoutSec=0 [Install] diff --git a/bin/urbackup.sh b/bin/urbackup.sh index d4e465e..322003d 100644 --- a/bin/urbackup.sh +++ b/bin/urbackup.sh @@ -26,6 +26,8 @@ if [ ! -d "$_assets" ]; then fi fi + + # install urbackup client # https://www.urbackup.org/client_debian_ubuntu_install.html # https://blog.stephane-huc.net/systeme/debian/urbackup_client_gui @@ -47,7 +49,23 @@ make -j4 make install # Make sure that the UrBackup client backend runs correctly -urbackupclientbackend -v info +# urbackupclientbackend -v info + +# configure +echo -n "Please provide the urbackup-server's ip : " +read _ip +echo -n "Please provide the internet_authkey of server : " +read _authkey + +echo "internet_server=$_ip +internet_server_port=55415 +internet_authkey=$_authkey +internet_mode_enabled=true" > /usr/local/var/urbackup/data/settings.cfg + +# firewall +ufw allow from "$_ip" to any port 35621 +ufw allow from "$_ip" to any port 35622 +ufw allow from "$_ip" to any port 35623 # install and enable systemd service cp "$_assets"/urbackup.service /etc/ststemd/system/