From 9ae9de7ac52ffc9fbfd6163e85dbf3b0447a4807 Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Sun, 1 Jun 2008 08:08:27 +0200 Subject: [PATCH] Create esniper user if esniper was installed Add esniper to soduers at install and remove at uninstall --- src/paks/esniper/install.sh | 5 +++++ src/paks/esniper/uninstall.sh | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/paks/esniper/install.sh b/src/paks/esniper/install.sh index 872a64ab76..6bf297d8d0 100644 --- a/src/paks/esniper/install.sh +++ b/src/paks/esniper/install.sh @@ -23,6 +23,11 @@ # . /opt/pakfire/lib/functions.sh extract_files +useradd -s /bin/false esniper +grep -v "esniper" /etc/sudoers > /tmp/sudoers +echo "# esniper user" >> /tmp/sudoers +echo "nobody ALL=(esniper) NOPASSWD: /usr/bin/sudo, /bin/sh, /bin/kill" >> /tmp/sudoers +mv /tmp/sudoers /etc/sudoers chmod 777 /srv/web/esniper chown nobody.nobody /srv/web/esniper /etc/init.d/apache reload diff --git a/src/paks/esniper/uninstall.sh b/src/paks/esniper/uninstall.sh index e5b5d7fe4e..e47a303fec 100644 --- a/src/paks/esniper/uninstall.sh +++ b/src/paks/esniper/uninstall.sh @@ -23,3 +23,5 @@ # . /opt/pakfire/lib/functions.sh remove_files +grep -v "esniper" /etc/sudoers > /tmp/sudoers +mv /tmp/sudoers /etc/sudoers -- 2.39.5