瀏覽代碼

Added script files

Simon Royer 2 年之前
當前提交
4493248814
共有 2 個文件被更改,包括 8 次插入0 次删除
  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