Browse Source

Added script files

Simon Royer 2 năm trước cách đây
commit
4493248814
2 tập tin đã thay đổi với 8 bổ sung0 xóa
  1. 4 0
      backup.sh
  2. 4 0
      ifconfig.sh

+ 4 - 0
backup.sh

@@ -0,0 +1,4 @@
+#!/bin/bash
+
+test=$(ssh root@172.16.255.1 -C 'cat /root/home.ip')
+rsync -av -e 'ssh -p 27022' /data/nextcloud2/ simon@$test:/backup/

+ 4 - 0
ifconfig.sh

@@ -0,0 +1,4 @@
+#!/bin/bash
+
+curl ifconfig.me > /root/scripts/ip.pub
+scp /root/scripts/ip.pub root@172.16.255.1:/root/home.ip