mirror of
https://github.com/m8tin/cis.git
synced 2026-11-02 22:17:24 +01:00
Checks improved
This commit is contained in:
1 parent
ee114ee732
commit
00b920763e
30 files changed
+21
-20
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user