mirror of
https://github.com/m8tin/cis.git
synced 2025-12-06 15:58:26 +01:00
17 lines
505 B
Bash
Executable File
17 lines
505 B
Bash
Executable File
#!/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
|