added scripts from local machines

This commit is contained in:
2023-08-11 13:11:42 -05:00
parent fa765dc012
commit 9eeee520ed
10 changed files with 64 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
#!/bin/bash
rsync -azvP -e "ssh -i ~/.ssh/proxyserver" --progress \
/home/akanealw/docker/appdata/remotely* root@192.168.1.4:/home/akanealw/docker/appdata/

View File

@@ -0,0 +1,10 @@
#!/bin/bash
docker restart gluetun && echo gluetun restarted
sleep 25
docker restart qbittorrent && echo qbittorrent restarted
sleep 15
docker restart sabnzbd && echo sabnzbd restarted
sleep 15
docker restart jdownloader && echo jdownloader restarted
sleep 15

View File

@@ -0,0 +1,4 @@
#!/bin/bashrsync-docker-remotely-to-proxyserver.sh
rsync -azvP -e "ssh -i ~/.ssh/dockerserver" --progress \
root@192.168.1.35:/opt/docker/appdata /home/akanealw/docker

View File

@@ -0,0 +1,10 @@
#!/bin/bash
rsync -azvP -e "ssh -i ~/.ssh/dockerserver" --progress \
--include=/ \
--include=/home/ \
--include=/home/akanealw \
--include=/home/akanealw/docker \
--include=/home/akanealw/docker/appdata/*** \
--exclude=* \
/ root@192.168.1.30:/

View File

@@ -0,0 +1 @@
wakeonlan 68:1c:a2:13:05:f5

View File

@@ -0,0 +1 @@
wakeonlan d8:9e:f3:47:34:0b

View File

@@ -0,0 +1,3 @@
#!/bin/bash
cp /home/akanealw/docker/appdata/nginxwebdav/data/bookmarks.html /home/akanealw/backups/bookmarksbackups/bookmarks-$(/bin/date +%Y-%m-%d-%I-%M-%S-%p).html

View File

@@ -0,0 +1,4 @@
#!/bin/bash
docker run --rm --volumes-from=vaultwarden -e UID=1000 -e PID=1000 -e BACKUP_DIR=/data/backups -e TIMESTAMP=true -v /home/akanealw/backups/vaultwardenbackups:/data/backups bruceforce/vaultwarden-backup manual
chown -R akanealw:akanealw /home/akanealw/backups

View File

@@ -0,0 +1,6 @@
#!/bin/bash
find "/home/akanealw/backups/bookmarksbackups" -name "*.html" -type f -mtime +25 -delete
find "/home/akanealw/backups/vaultwardenbackups" -name "*.xz" -type f -mtime +25 -delete
rsync -rvz /home/akanealw/backups/bookmarksbackups/ akanealw@truenas:/mnt/data/backups/bookmarksbackups/
rsync -rvz /home/akanealw/backups/vaultwardenbackups/ akanealw@truenas:/mnt/data/backups/vaultwardenbackups/

View File

@@ -0,0 +1,21 @@
#!/bin/bash
PING=/bin/ping
## DEBIAN
SERVICE=/usr/sbin/service
tries=0
while [[ $tries -lt 3 ]]
do
if $PING -c 1 10.0.10.1
then
echo "wg works" && curl -fsS -m 10 --retry 5 -o /dev/null http://192.168.1.4:8000/ping/12b1795f-a72a-479b-845b-f2576e8a546d
exit 0
fi
echo "wg fail"
tries=$((tries+1))
done
echo "wg failed 3 times - restarting tunnel" && curl -fsS -m 10 --retry 5 -o /dev/null http://192.168.1.4:8000/ping/12b1795f-a72a-479b-845b-f2576e8a546d/fail
## DEBIAN
$SERVICE wg-quick@wg1 restart