/
githubmirror
/
audit-userspace
Обзор
Документация
Войти
/
githubmirror
/
audit-userspace
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v3.1
init.d/auditd.stop
25 строк
534 B
Steve Grubb
Reduce dependency from initscripts to initscripts-service
23 янв 2022, 22:32
23 янв 2022, 22:32
1b97f7c
Код
Авторство
О чём код?
#!/bin/sh # Helper script to provide legacy auditd service options not # directly supported by systemd # Check that we are root ... so non-root users stop here test $(id -u) = 0 || exit 4 PATH=/sbin:/bin:/usr/bin:/usr/sbin prog="auditd" . /usr/libexec/audit-functions pid= p=$(pidof "$prog") if [ -n "$p" ] ; then pid="$p" fi printf "Stopping logging: " killproc $prog -TERM RETVAL=$? if [ -n "$pid" ] ; then # Wait up to 20 seconds for auditd to shutdown timeout 20 tail --pid="$pid" -f /dev/null fi echo exit $RETVAL