upload scripts of the libre server
This commit is contained in:
4
scwipts/dumpdata
Normal file
4
scwipts/dumpdata
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
pushd /bck
|
||||||
|
mongodump "mongodb://admin:anakuanaenkiduibriabakki@db.saret.tk:27017/"
|
||||||
|
curl https://ntfy.d.metallum.eu.org/MiniServer -d "run backup of the server and the db."
|
2
scwipts/rebooting
Normal file
2
scwipts/rebooting
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
ntfy pub -t "started up, Libre – Toy server" -m "$(date)" https://ntfy.d.metallum.eu.org/ServerState
|
4
scwipts/ssh.sh
Normal file
4
scwipts/ssh.sh
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
if [[ "$(ps -x |grep saret@ssh |awk '{print $9}')" != *"libre-computer:22:localhost:22"* ]]; then
|
||||||
|
ssh saret@ssh-j.com -N -R libre-computer:22:localhost:22
|
||||||
|
fi
|
5
scwipts/weekly_db_copy
Normal file
5
scwipts/weekly_db_copy
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
scp oracle:~/DB/db.7z /bck/$(date +'%Y-%m-%d').7z
|
||||||
|
curl https://ntfy.d.metallum.eu.org/Saretify -H 'Content-Type: application/json' -d @/dev/stdin<<EOF
|
||||||
|
{"text":"precentage of full drive are: main: $(ssh oracle df -hl |grep -P 'sda1\b' | awk '{print $5}'). Mongodb storage: $(ssh oracle df -hl |grep -P 'sdb\b' | awk '{print $5}')"
|
||||||
|
EOF
|
Reference in New Issue
Block a user