first commit
This commit is contained in:
21
proxyserver/root/check-wireguard.sh
Normal file
21
proxyserver/root/check-wireguard.sh
Normal 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 https://uptimekuma.akanealw.com/api/push/C6kilkNqUv?status=up&msg=OK&ping=
|
||||
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 https://uptimekuma.akanealw.com/api/push/C6kilkNqUv?status=down&msg=OK&ping=
|
||||
|
||||
## DEBIAN
|
||||
$SERVICE wg-quick@wg1 restart && curl -fsS -m 10 --retry 5 -o /dev/null https://uptimekuma.akanealw.com/api/push/C6kilkNqUv?status=up&msg=OK&ping=
|
||||
5
proxyserver/root/clean-plex-photo-cache.sh
Executable file
5
proxyserver/root/clean-plex-photo-cache.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
find "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/PhotoTranscoder" -name "*.jpg" -type f -mtime +5 -delete
|
||||
find "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/PhotoTranscoder" -name "*.ppm" -type f -mtime +5 -delete
|
||||
curl -fsS -m 10 --retry 5 -o /dev/null https://uptimekuma.akanealw.com/api/push/vOOCgMo8GW?status=up&msg=OK&ping=
|
||||
23
proxyserver/root/crontab.bak
Normal file
23
proxyserver/root/crontab.bak
Normal file
@@ -0,0 +1,23 @@
|
||||
# Edit this file to introduce tasks to be run by cron.
|
||||
#
|
||||
# Each task to run has to be defined through a single line
|
||||
# indicating with different fields when the task will be run
|
||||
# and what command to run for the task
|
||||
#
|
||||
# To define the time you can provide concrete values for
|
||||
# minute (m), hour (h), day of month (dom), month (mon),
|
||||
# and day of week (dow) or use '*' in these fields (for 'any').
|
||||
#
|
||||
# Notice that tasks will be started based on the cron's system
|
||||
# daemon's notion of time and timezones.
|
||||
#
|
||||
# Output of the crontab jobs (including errors) is sent through
|
||||
# email to the user the crontab file belongs to (unless redirected).
|
||||
#
|
||||
# For example, you can run a backup of all your user accounts
|
||||
# at 5 a.m every week with:
|
||||
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
|
||||
#
|
||||
# For more information see the manual pages of crontab(5) and cron(8)
|
||||
#
|
||||
# m h dom mon dow command
|
||||
0
proxyserver/root/test.sh
Normal file
0
proxyserver/root/test.sh
Normal file
Reference in New Issue
Block a user