[Zabbix] Fixed typos
This commit is contained in:
parent
3edb48e453
commit
c05a0d3ac8
@ -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
|
||||
|
@ -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 \
|
||||
|
@ -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}'`
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user