#SSH
1. ssh boothtml@185.207.106.68 -p 2222
1.1 wf234fhkj#P
2. su
2.1 grewglwehljkh435lkhjk354gj3456kjhg
3. cd /var/www/html/live1/
#backup (aktuelle datenbank+pip req.+alle daten in /var/www/html)
1. sudo /home/boothtml/mycoachfinder/backups/daily_backup.sh
2. sftp://hosting129525@boothtml.de/mychoachfinder_backup/ [Netcup Webserver] kopiren **Fileziiller** - B1 -> B2
3. auf MyCoachFinder Löschen
Täglich 2 Uhr Nachts
0 2 * * * sudo /home/boothtml/mycoachfinder/backups/daily_backup.sh
öffent editor: crontab -e
Allew Anzeigen lassen: crontab -l
#LOG
1. tail -f nohup.out
max_worker_pref: (2*CPU)+1
#relaod app
killall gunicorn
#hard altnativ without check name
sudo pkill -f gunicorn
nohup gunicorn -w 4 'app:app' > nohup.out 2>&1 &
#relaod nginx
sudo nginx -t
sudo systemctl restart nginx
tail -f /var/log/nginx/error.log
#port fail
sudo pkill -f nginx & wait $!
#debug
gunicorn -w 4 'app:app'
#------------------------------------------------------
crontab -l
pgrep -af python3
ps
ps aux | grep gunicorn
#------------------------------------------------------
#debug sinpets
ps aux | grep uvicorn
kill -9 121195
netstat -tuln
#show
sudo lsof -i :8002
#------------------------------------------------------
fastapi.my-coach-finder.de
cd /var/www/html/fastapi
#testing intern
curl fastapi.localhost:8002
#debug
uvicorn app:app --reload --port 8002
#start
nohup uvicorn app:app --port 8002 > nohup.out 2>&1 &
#kill
kill $(sudo lsof -t -i :8002)
#-------------------------------------------
#DB
phpmyadmin pw anwendung: ffweh234k#
phpmyadmin pw root: ffweh234k#
#restart mariadb / phpmyadmin
systemctl stop mariadb
systemctl start mariadb
bootroot -> 92384710kflwb3423
npm install pm2 -g
cd /var/www/html/web_check/uptime-kuma
#start
pm2 start server/server.js --name uptime-kuma
#status
pm2 status
#reset
pm2 restart uptime-kuma
#stop
pm2 stop uptime-kuma
#start
pm2 start uptime-kuma
#Telgramm Logs
import requests
tel_msg = "Hallo"
response = requests.get('https://api.telegram.org/bot6575656872:AAEUnrY_3A5X5l0eKVS610U3QHo4n03WCEM/sendMessage?chat_id=1023177651&text='+str(tel_msg))
print(response.text)
if response.status_code == 200:
print('Success!')
elif response.status_code == 404:
print('Not Found.')