From e8159fc8cb239dc32ad2f4e32c4471f29a5870a4 Mon Sep 17 00:00:00 2001 From: gitea Date: Sun, 2 Jun 2024 08:01:54 +0800 Subject: [PATCH] [modify] change scripts path with mid-fix "/git/", and do a exclude for syncthing due to too big tar ball --- alert/docker_alarm.sh | 2 +- update/backups.sh | 2 +- update/init.sh | 3 +-- update/renew.sh | 6 +++--- update/restart_frpc.sh | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/alert/docker_alarm.sh b/alert/docker_alarm.sh index 436439c..7bf733f 100644 --- a/alert/docker_alarm.sh +++ b/alert/docker_alarm.sh @@ -12,6 +12,6 @@ done < /opt/logs/docker_status.log if [[ -s /tmp/docker_alarm.log ]]; then alarm=`cat /tmp/docker_alarm.log` - python3 /opt/scripts/alert/sendmail.py "Docker Alarms" "$alarm" + python3 /opt/git/scripts/alert/sendmail.py "Docker Alarms" "$alarm" fi diff --git a/update/backups.sh b/update/backups.sh index 1357256..a23f392 100644 --- a/update/backups.sh +++ b/update/backups.sh @@ -26,7 +26,7 @@ cp -rf /lib/firmware/intel/ ibt-0040-1050* /opt/configs/conf/intel/ cd /opt && t=`date +%Y%m%dT%H%M%S` # rsync --delete-after -avz --exclude=apps/localcr/B_koel/local/music apps configs logs scripts websites wd/72-Backups/VPS/ > /opt/logs/rsync/rsync_${t}.log -rsync --delete-after -avz apps configs logs scripts websites wd/72-Backups/VPS/ > /opt/logs/rsync/rsync_${t}.log +rsync --delete-after -avz --exclude=apps/syncthing apps configs logs git websites wd/72-Backups/VPS/ > /opt/logs/rsync/rsync_${t}.log cd /opt/logs/rsync/ let count=`ls | wc -l` if [[ $count -gt 10 ]]; then diff --git a/update/init.sh b/update/init.sh index 6453aef..88f5ab4 100644 --- a/update/init.sh +++ b/update/init.sh @@ -2,7 +2,6 @@ #============================================================================== /usr/bin/qbittorrent-nox --webui-port=10005 -d -# /usr/bin/bash /opt/scripts/update/calibre.sh mv /opt/wd/99-Temp/shutdown /opt/wd/99-Temp/shutdown.old mv /opt/wd/99-Temp/reboot /opt/wd/99-Temp/reboot.old sleep 20 @@ -13,7 +12,7 @@ ifconfig > /opt/wd/99-Temp/ifconfig.txt # ip link set wlx90de80ca01ec promisc on #============================================================================== # sleep 20 -# /usr/bin/bash /opt/scripts/update/macvlan.sh +# /usr/bin/bash /opt/git/scripts/update/macvlan.sh #============================================================================== # /usr/bin/mount -t ext4 -w UUID="b7c2c4b8-bfde-479b-80bb-655432a433b8" /opt/wd diff --git a/update/renew.sh b/update/renew.sh index f037158..7f2f504 100644 --- a/update/renew.sh +++ b/update/renew.sh @@ -1,7 +1,7 @@ #!/bin/bash # get latest hosts for accelerate github visiting -curl https://raw.hellogithub.com/hosts >> /opt/logs/hosts +# curl https://raw.hellogithub.com/hosts >> /opt/logs/hosts # renew images.json file for background picture of homepage cd /opt/websites/homepage/ @@ -9,7 +9,7 @@ node assets/js/bing.js > /dev/null 2>&1 if [[ `date +%d` == '01' ]]; then # random logo for dash - # bash /opt/scripts/update/dash_rand_logo.sh + # bash /opt/git/scripts/update/dash_rand_logo.sh cp /root/.acme/rustle.cc_ecc/fullchain.cer '/opt/apps/syncthing/data/common/A_Program/nginx-1.24.0/certs/' cp /root/.acme/rustle.cc_ecc/rustle.cc.key '/opt/apps/syncthing/data/common/A_Program/nginx-1.24.0/certs/' fi @@ -19,4 +19,4 @@ let numOfAvatar=`ls /opt/websites/homepage/assets/img/logos | wc -l` let randNumber=$RANDOM%$numOfAvatar cp /opt/websites/homepage/assets/img/logos/${randNumber}.jpg /opt/websites/homepage/assets/img/logo.jpg -docker exec -u www-data nextcloud php /var/www/html/occ files:scan --all +# docker exec -u www-data nextcloud php /var/www/html/occ files:scan --all diff --git a/update/restart_frpc.sh b/update/restart_frpc.sh index 73374ac..e5f1c56 100644 --- a/update/restart_frpc.sh +++ b/update/restart_frpc.sh @@ -2,7 +2,7 @@ rss=$(ps aux | grep frpc.toml | grep -v grep | awk '{print $6}') if [[ $rss == '' ]]; then - python3 /opt/scripts/alert/bark/msgsend.py --title "FRPC Warning" --body "Seems like FRPC Service has been down, need to check ASAP." --group 'frp' --icon 8 + python3 /opt/git/scripts/alert/bark/msgsend.py --title "FRPC Warning" --body "Seems like FRPC Service has been down, need to check ASAP." --group 'frp' --icon 8 exit 9 fi