mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-13 12:32:59 +02:00
Create esniper user if esniper was installed
Add esniper to soduers at install and remove at uninstall
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -23,3 +23,5 @@
|
||||
#
|
||||
. /opt/pakfire/lib/functions.sh
|
||||
remove_files
|
||||
grep -v "esniper" /etc/sudoers > /tmp/sudoers
|
||||
mv /tmp/sudoers /etc/sudoers
|
||||
|
||||
Reference in New Issue
Block a user