Bachir Soussi Chiadmi 5 years ago
parent
commit
82d2186327
2 changed files with 6 additions and 2 deletions
  1. 3 1
      bin/checkroot.sh
  2. 3 1
      bin/urbackup.sh

+ 3 - 1
bin/checkroot.sh

@@ -2,7 +2,9 @@
 
 echo -e "checking root"
 
-if [ "$EUID" -ne 0 ]; then
+if [ "$EUID" = 0 ]; then
   echo -e "Please run as root"
   exit
+else
+  echo -e "root ok"
 fi

+ 3 - 1
bin/urbackup.sh

@@ -33,7 +33,7 @@ fi
 
 # Install the dependencies UrBackup needs
 # apt install build-essential "g++" "libcrypto++-dev" libz-dev -y
-apk add linux-headers "g++" zlib zlib-dev "crypto++@testing" "crypto++-dev@testing"
+apk add linux-headers "g++" zlib zlib-dev "crypto++@testing" "crypto++-dev@testing" make
 
 ln -s /usr/lib/libcryptopp.so /usr/lib/libcryptopp.so.5.6
 
@@ -79,3 +79,5 @@ chmod a+x /etc/init.d/urbackup
 
 rc-update add urbackup
 service urbackup start
+
+cd "$_cwd"