Files
nuhodds_fi4/apple_damon.sh
T
2026-07-07 11:43:08 +02:00

63 lines
1.6 KiB
Bash
Executable File

case "$1" in
"1")
# AUTO GRAPPER SOFASCORE (debug)
echo "\n⚽ process function $1 sofa_score_task $2"
echo "\n⚽ close all vpn"
killall ssh
echo "\n⚽ open vpn"
ssh -f -N -L 13306:127.0.0.1:3306 -p 58371 root@162.55.242.190
echo "\n⚽ copy settings"
php artisan nuh --d --f 67 --fun=2 --task=$2
echo "\n⚽ close vpn"
killall ssh
echo "\n⚽ start task"
php artisan nuh --d --f 67 --fun=7 --task=$2
echo "\n⚽ get tournaments for the day"
php artisan nuh --d --f 67 --fun=5 --task=$2
echo "\n⚽ grapper events for the day"
php artisan nuh --d --f 67 --fun=6 --task=$2
echo "\n⚽ create zip archive"
php artisan nuh --d --f 67 --fun=3 --task=$2
echo "\n⚽ mail archive"
php artisan nuh --d --f 67 --fun=4 --task=$2
echo "\n⚽ end task"
php artisan nuh --d --f 67 --fun=8 --task=$2
echo "\n😎 done :)"
;;
"2")
# AUTO GRAPPER SOFASCORE (production no debug and 10s breaks)
killall ssh
ssh -f -N -L 13306:127.0.0.1:3306 -p 58371 root@162.55.242.190
php artisan nuh --f 67 --fun=2 --task=$2
killall ssh
php artisan nuh --f 67 --fun=7 --task=$2
php artisan nuh --f 67 --fun=5 --task=$2
php artisan nuh --f 67 --fun=6 --task=$2
php artisan nuh --f 67 --fun=3 --task=$2
php artisan nuh --f 67 --fun=4 --task=$2
php artisan nuh --f 67 --fun=8 --task=$2
;;
*)
echo ""
echo "--------------------------"
echo "apple damon grapper sofascore"
echo "--------------------------"
echo "1 => debug max 5sec intervals"
echo "2 => prod max 10sec intervals"
echo "--------------------------"
echo ""
;;
esac