mirror of
https://github.com/inspec/inspec
synced 2024-12-26 21:13:25 +00:00
cbcca9f39e
This modifies the enabled check for the `service` resource to use the service's config file instead of `initctl show-config`. `initctl show-config` does not accurately show the state of a service if that service's config file is modified while the service is running. This fixes #1834. Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
26 lines
616 B
Text
26 lines
616 B
Text
# ssh - OpenBSD Secure Shell server
|
|
#
|
|
# The OpenSSH server provides secure shell access to the system.
|
|
|
|
description "OpenSSH server"
|
|
|
|
start on filesystem
|
|
stop on runlevel [!2345]
|
|
|
|
respawn
|
|
respawn limit 10 5
|
|
umask 022
|
|
# replaces SSHD_OOM_ADJUST in /etc/default/ssh
|
|
oom never
|
|
|
|
pre-start script
|
|
test -x /usr/sbin/sshd || { stop; exit 0; }
|
|
test -e /etc/ssh/sshd_not_to_be_run && { stop; exit 0; }
|
|
test -c /dev/null || { stop; exit 0; }
|
|
|
|
mkdir -p -m0755 /var/run/sshd
|
|
end script
|
|
|
|
# if you used to set SSHD_OPTS in /etc/default/ssh, you can change the
|
|
# 'exec' line here instead
|
|
exec /usr/sbin/sshd -D
|