diff --git a/Linux/zabbix/check_service.sh b/Linux/zabbix/check_service.sh index 05545a6..eb54d1d 100755 --- a/Linux/zabbix/check_service.sh +++ b/Linux/zabbix/check_service.sh @@ -1,27 +1,27 @@ #!/bin/bash -# Find service name from argument +# find service name from argument monitorService=$1 -# Check if $monitorService is empty +# check if $monitorService is empty if [ -z "$monitorService" ]; then read -p "Please pass me the service name: " monitorService fi -# Define the check_service function +# define the check_service function function check_service { - # Check if the service is active and report so + # check if the service is active and report so if systemctl is-active --quiet $monitorService; then echo "$monitorService is running" - # If the service is not running, exit with an error. + # if the service is not running, exit with an error. else echo "$monitorService is not running" exit 1 fi } -# Excecute the check_service function +# excecute the check_service function check_service diff --git a/Linux/zabbix/cleanup_disk.sh b/Linux/zabbix/cleanup_disk.sh index fa23e86..1d3ff31 100644 --- a/Linux/zabbix/cleanup_disk.sh +++ b/Linux/zabbix/cleanup_disk.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Prune container images +# prune container images if [ -x "$(command -v docker)" ]; then echo "Pruning using Docker" sudo docker image prune -af @@ -14,7 +14,7 @@ else fi -# Remove all disabled snaps +# remove all disabled snaps if [ -x "$(command -v snap)" ]; then echo "Remove all deactivated snaps" sudo snap list --all | \ @@ -27,7 +27,7 @@ else fi -# Flush and rotate all logs +# flush and rotate all logs if [ -x "$(command -v journalctl)" ]; then echo "Vacuuming logs using journalctl" sudo journalctl \ diff --git a/Linux/zabbix/cleanup_swap.sh b/Linux/zabbix/cleanup_swap.sh index 3dd30e5..49fc981 100644 --- a/Linux/zabbix/cleanup_swap.sh +++ b/Linux/zabbix/cleanup_swap.sh @@ -1,4 +1,4 @@ -# Clear swapusage +# clear swapusage free_memory=`free -m | awk 'NR==2{print $7}'` used_swap=`free -m | awk 'NR==3{print $3}'`