Update cron scripts
This commit is contained in:
parent
7f2a5238c6
commit
500d9705bf
@ -1,6 +1,6 @@
|
||||
export AWS_PROFILE=default
|
||||
DOMAIN="pfy.ch"
|
||||
declare -a SUB_DOMAINS=("home" "git" "zip" "ente" "mastodon")
|
||||
declare -a SUB_DOMAINS=("home" "git" "zip" "ente" "mastodon" "chat")
|
||||
|
||||
# Scripts
|
||||
CURRENT_IP=`dig @resolver4.opendns.com myip.opendns.com +short`
|
||||
|
@ -5,12 +5,18 @@ source /Users/noahheague/.config/scripts/util/secret.sh
|
||||
API_KEY=$(getSecret "/server/mac-mini-1/seed-api-key")
|
||||
API_URL=$(getSecret "/server/mac-mini-1/seed-api-url")
|
||||
|
||||
echo $API_URL
|
||||
echo $API_KEY
|
||||
|
||||
SEED_COUNT=$(curl --request GET \
|
||||
--silent \
|
||||
--url "$API_URL" \
|
||||
--header "X-API-Key: $API_KEY" \
|
||||
--header "Cache-Control: no-cache" \
|
||||
| jq ".response.community.seeding")
|
||||
|
||||
echo $SEED_COUNT
|
||||
|
||||
if [ "$SEED_COUNT" = "null" ]; then
|
||||
if [ ! -f /tmp/seed-timestamp.txt ]; then
|
||||
echo $TIME > /tmp/seed-timestamp.txt;
|
||||
@ -19,6 +25,8 @@ if [ "$SEED_COUNT" = "null" ]; then
|
||||
-c "torrent" \
|
||||
-m "Seeding has paused!"
|
||||
|
||||
/usr/local/bin/docker restart $(/usr/local/bin/docker ps | grep deluge | cut -d' ' -f1)
|
||||
|
||||
fi;
|
||||
|
||||
SAVED_TIME=$(cat /tmp/seed-timestamp.txt)
|
||||
|
Loading…
Reference in New Issue
Block a user