From 4b7d4f4c044a55f4d63a75eb836288c42e26f1e4 Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Wed, 21 Dec 2016 05:23:20 +0400 Subject: [PATCH] ajouter une option pour installer le service kill-ssh-user-sessions --- .udir | 2 ++ lib/init.d/install-kill-ssh-user-sessions | 2 ++ lib/uinst/rootconf | 8 ++++++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.udir b/.udir index c816bf3..a24fb4c 100644 --- a/.udir +++ b/.udir @@ -16,6 +16,8 @@ rm_utools= kvm_service= # Faut-il installer le service openvz-fix-etchosts? openvz_service= +# Faut-il installer le service kill-ssh-user-sessions? +ksus_service= configure_variables=(dest uninst_utools rm_utools kvm_service openvz_service) configure_dest_for=(bashrc profile lib/uinst/conf lib/uinst/rootconf lib/profile.d/nutools.shared lib/bashrc.d/bash_completion.shared lib/init.d/kvm-stop-all legacy/sysinc/utools legacy/sysinc/system_caps legacy/sysinc/private/init) diff --git a/lib/init.d/install-kill-ssh-user-sessions b/lib/init.d/install-kill-ssh-user-sessions index 47f17f3..f41df24 100755 --- a/lib/init.d/install-kill-ssh-user-sessions +++ b/lib/init.d/install-kill-ssh-user-sessions @@ -3,6 +3,8 @@ source "$(dirname "$0")/../../lib/ulib/ulib" || exit 1 urequire DEFAULTS +[ -d /etc/systemd ] || exit 0 run_as_root "$@" + cp "$scriptdir/kill-ssh-user-sessions.service" /etc/systemd/system systemctl enable kill-ssh-user-sessions.service diff --git a/lib/uinst/rootconf b/lib/uinst/rootconf index 76fd5a1..f58a8aa 100644 --- a/lib/uinst/rootconf +++ b/lib/uinst/rootconf @@ -66,13 +66,17 @@ if [ -n "$rm_utools" ]; then fi [ -n "$kvm_service" ] && -etitle "Installation de /etc/init.d/kvm-stop-all" \ +etitle "Installation du service kvm-stop-all" \ "$scriptdir/../init.d/install-kvm-stop-all" [ -n "$openvz_service" ] && -etitle "Installation de /etc/init.d/openvz-fix-etchosts" \ +etitle "Installation du service openvz-fix-etchosts" \ "$scriptdir/../init.d/install-openvz-fix-etchosts" +[ -n "$ksus_service" ] && +etitle "Installation du service kill-ssh-user-sessions" \ + "$scriptdir/../init.d/install-kill-ssh-user-sessions" + etitle "Installation des répertoires pour uscrontab" if [ -d /var/uscrontab -a ! -d /var/local/uscrontab ]; then eimportant "Migration du répertoire /var/uscrontab vers /var/local/uscrontab"