Create esniper user if esniper was installed

Add esniper to soduers at install and remove at uninstall
This commit is contained in:
Arne Fitzenreiter
2008-06-01 08:08:27 +02:00
parent cee25dda28
commit 9ae9de7ac5
2 changed files with 7 additions and 0 deletions

View File

@@ -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

View File

@@ -23,3 +23,5 @@
#
. /opt/pakfire/lib/functions.sh
remove_files
grep -v "esniper" /etc/sudoers > /tmp/sudoers
mv /tmp/sudoers /etc/sudoers