server scripts
This commit is contained in:
parent
2303b04e79
commit
b5d51fb79c
7 changed files with 56 additions and 0 deletions
6
scripts/server_bin/db_maint.sh
Executable file
6
scripts/server_bin/db_maint.sh
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
#maintenance
|
||||
echo "--- DATABASE MAINTENANCE ---"
|
||||
cd $HOME/gallery-dl
|
||||
sqlite3 archive.sqlite3 'VACUUM;'
|
||||
echo "--- MAINTENANCE COMPLETE ---"
|
6
scripts/server_bin/rescan_disk.sh
Executable file
6
scripts/server_bin/rescan_disk.sh
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
#systematically rescans all scsi hosts for change in drives
|
||||
[ "$UID" -eq 0 ] || exec sudo bash "$0" "$@"
|
||||
for i in /sys/class/scsi_host/*; do
|
||||
echo "- - -" | sudo tee > $i/scan
|
||||
done
|
11
scripts/server_bin/update_fa.sh
Executable file
11
scripts/server_bin/update_fa.sh
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
N=2
|
||||
cd $HOME/gallery-dl/furaffinity
|
||||
for i in */; do
|
||||
echo ">> $i"
|
||||
(gallery-dl --abort 3 --sleep 0-1 https://www.furaffinity.net/user/$i) &
|
||||
if [[ $(jobs -r -p | wc -l) -ge $N ]]; then
|
||||
wait -n
|
||||
fi
|
||||
done
|
||||
wait
|
8
scripts/server_bin/update_insta.sh
Executable file
8
scripts/server_bin/update_insta.sh
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
cd $HOME/gallery-dl/instagram
|
||||
for i in */; do
|
||||
echo ">> $i"
|
||||
gallery-dl --sleep 2-3 --abort 3 https://www.instagram.com/$i
|
||||
sleep 15
|
||||
done
|
||||
|
8
scripts/server_bin/update_itaku.sh
Executable file
8
scripts/server_bin/update_itaku.sh
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
cd $HOME/gallery-dl/itaku
|
||||
for i in *; do
|
||||
echo ">> $i"
|
||||
gallery-dl --abort 3 --sleep 2 https://itaku.ee/profile/$i/gallery
|
||||
sleep 15
|
||||
done
|
||||
|
15
scripts/server_bin/update_twitter.sh
Executable file
15
scripts/server_bin/update_twitter.sh
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
N=2
|
||||
cd $HOME/gallery-dl/twitter
|
||||
for i in */; do
|
||||
echo ">> $i"
|
||||
(gallery-dl --sleep 0-1 --abort 3 "https://twitter.com/$i" || echo "Problem with $i gallery!" >> ~/twit_error.txt) &
|
||||
if [[ $(jobs -r -p | wc -l) -ge $N ]]; then
|
||||
wait -n
|
||||
fi
|
||||
done
|
||||
echo ">>> Updating Retweets"
|
||||
gallery-dl --abort 3 -o retweets=true "https://twitter.com/stefenauris"
|
||||
gallery-dl --abort 3 -o retweets=true "https://twitter.com/DaybreakHero"
|
||||
#de-dup?
|
||||
wait
|
2
scripts/server_bin/yc_bak.sh
Executable file
2
scripts/server_bin/yc_bak.sh
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
rsync -hav --progress --delete --compress yc:/home/stev/backup /home/stev/storage/yc-backup
|
Loading…
Add table
Add a link
Reference in a new issue