add prosody script (#7)

See Disroot/Disroot-Project#95

Co-authored-by: muppeth <muppeth@disroot.org>
Reviewed-on: #7
Co-authored-by: meaz <meaz@disroot.org>
Co-committed-by: meaz <meaz@disroot.org>
This commit is contained in:
meaz 2023-10-02 14:09:18 +00:00 committed by meaz
parent 66943a7d70
commit 81ce066e00
3 changed files with 18 additions and 2 deletions

View File

@ -1,5 +1,5 @@
#!/bin/
#This script checks the amount of calcs and amount of connected people
#This script checks the amount of bin and amount of connected people
source /var/local/container-scripts/zabbix-scripts.cfg
#statistics

13
prosody-check.sh Normal file
View File

@ -0,0 +1,13 @@
#!/bin/bash
#This script checks the number and total of uploaded files on prosody
source /var/local/container-scripts/zabbix-scripts.cfg
#Number
PROSODY_TOTAL=$(sudo -u ${PROSODY_USER} ls -lh ${PROSODY_PATH} | wc -l)
#Total
PROSODY_SIZE=$(sudo -u ${PROSODY_USER} du -bs ${PROSODY_PATH} | cut -f1)
#save onto a file
echo "prosody_total ${PROSODY_TOTAL}" > /tmp/prosody_stats
echo "prosody_size ${PROSODY_SIZE}" >> /tmp/prosody_stats

View File

@ -37,4 +37,7 @@ GITDB_HOST="localhost"
GITDB_PORT="5432"
GITDB_NAME="gitea"
GITDB_USER="gitea"
GITDB_PASSWD="changeme"
GITDB_PASSWD="changeme"
# Prosody
PROSODY_USER="prosody"
PROSODY_PATH="/var/lib/prosody/xmppfiles%2edisroot%2eorg/http_file_share/"