Cheat Sheets

Systemd - No masked services

Description

Ensure there are no masked services

Check Script: systemd-no-masked.sh

#!/bin/bash

output=$(systemctl list-units 2>/dev/null) if [ "$output" != "" ]; then masked=$(/bin/echo "$output" | grep " masked " | cut -d " " -f2) if [ "$masked" != "" ]; then result_warning "There are masked services: " $masked else result_ok fi fi
Comment on Disqus