[remove] old scripts, not using anymore

This commit is contained in:
2023-10-19 20:14:39 +08:00
parent 5e821cf08c
commit d2fd9a6a25
2 changed files with 1 additions and 1 deletions

25
old/macvlan.sh Normal file
View File

@ -0,0 +1,25 @@
#!/bin/bash
for i in `seq 3`; do
gateway=`ip route | head -n 1 | grep -Eow '([0-9]{1,3}.){3}[0-9]{1,3}'`
[[ $gateway == '' ]] && { sleep 3; continue; }
done
[[ $gateway == '' ]] && exit 9
num1=`echo $gateway | awk -F '.' '{print $1}'`
num2=`echo $gateway | awk -F '.' '{print $2}'`
num3=`echo $gateway | awk -F '.' '{print $3}'`
for num4 in `seq 200 254`; do
IP=$num1'.'$num2'.'$num3'.'$num4
ping -c 2 $IP
[[ $? -ne 0 ]] && break
done
ip link add main2wrt link enp1s0 type macvlan mode bridge
ip addr add $IP dev main2wrt
ip link set main2wrt up
ip route add 192.168.10.123 dev main2wrt
ip link set main2wrt promisc on

9
old/nc_rsync.sh Normal file
View File

@ -0,0 +1,9 @@
#!/bin/bash
src_dir='/opt/apps/syncthing/data/common'
dst_dir='/opt/apps/localcr/K_nextcloud/local/nextcloud/data/nextcloud/files/'
rsync --delete-after -avz $src_dir $dst_dir
docker exec -u www-data nextcloud php /var/www/html/occ files:scan --all