[Zabbix] Fixed typos

This commit is contained in:
Simon Cornet 2023-08-22 15:56:34 +02:00
parent 3edb48e453
commit c05a0d3ac8
3 changed files with 10 additions and 10 deletions

View File

@ -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

View File

@ -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 \

View File

@ -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}'`