Files
debian-cis/bin
damcav35 a9d2e76cdb Damcava35/update lib (#277)
* update lib/utils.sh

- add 'is_pkg_a_dependency', to ensure a package is not needed by some others before removing it
-> will be used in debian 12 CIS by at least the 2.1.5 recommendation

- update 'is_service_enabled' to use 'systemd' instead of 'rc.d', as we are now only supporting debian LTS using systemd
- add 'is_using_sbin_init' to ensure we can use systemctl, in case of running on non detected container
- add 'manage_service' to enable / disable service using systemctl

* chore: update script related to systemctl / service

- configure_systemd-timesync.sh:        use "is_service_enabled" instead of calling systemctl
- disable_automounting.sh:              use "manage_service" instead of "update-rc.d"
- enable_auditd.sh:                     use "manage_service" instead of "update-rc.d"
- enable_cron.sh:                       use "manage_service" instead of "update-rc.d"
- enable_syslog-ng.sh:                  use "manage_service" instead of "update-rc.d"

---------

Co-authored-by: Damien Cavagnini <damien.cavagnini@corp.ovh.com>
2025-08-06 11:13:49 +02:00
..
2025-08-06 11:13:49 +02:00
2016-04-01 07:50:08 +02:00