Checks extended to define own checks for all own hosts or a specific one.

This commit is contained in:
Martin Berghaus
2025-03-12 22:27:13 +01:00
parent 4943625351
commit 3d1ecf6fa8
26 changed files with 56 additions and 59 deletions

View File

@@ -0,0 +1,16 @@
#!/bin/bash
# Fail because of unnecessary custom config
grep "Wants=network-online.target" /lib/systemd/system/nginx.service > /dev/null 2>&1 \
&& [ -f "/etc/systemd/system/nginx.service" ] \
&& exit 1
# Success if system config is ok
grep "Wants=network-online.target" /lib/systemd/system/nginx.service > /dev/null 2>&1 \
&& exit 0
# Success if custom config fixes system config
grep "Wants=network-online.target" /etc/systemd/system/nginx.service > /dev/null 2>&1 \
&& exit 0
exit 1