mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 18:49:21 -07:00
Release 0.9.8-15
This commit is contained in:
parent
cdcda8d1e6
commit
95aab70c3e
10 changed files with 68 additions and 54 deletions
|
@ -1,10 +1,18 @@
|
|||
#!/bin/bash
|
||||
# New sudoers format
|
||||
|
||||
if [ ! -e /etc/sudoers.d/admin ]; then
|
||||
echo "# Created by vesta update-trigger" > /etc/sudoers.d/admin
|
||||
echo "# $(date)" >> /etc/sudoers.d/admin
|
||||
echo "admin ALL=(ALL) ALL" >> /etc/sudoers.d/admin
|
||||
echo "admin ALL=NOPASSWD:/usr/local/vesta/bin/*" >> /etc/sudoers.d/admin
|
||||
if [ ! -e '/etc/sudoers.d/admin' ]; then
|
||||
if [ ! -d '/etc/sudoers.d' ]; then
|
||||
mkidr /etc/sudoers.d
|
||||
chmod 750 /etc/sudoers.d
|
||||
fi
|
||||
echo '# Created by vesta update-trigger' > /etc/sudoers.d/admin
|
||||
echo 'Defaults env_keep="VESTA"' >> /etc/sudoers.d/admin
|
||||
echo 'Defaults:admin !syslog' >> /etc/sudoers.d/admin
|
||||
echo 'Defaults:admin !requiretty' >> /etc/sudoers.d/admin
|
||||
echo '' >> /etc/sudoers.d/admin
|
||||
echo 'admin ALL=(ALL) ALL' >> /etc/sudoers.d/admin
|
||||
echo 'admin ALL=NOPASSWD:/usr/local/vesta/bin/*' >> /etc/sudoers.d/admin
|
||||
chmod 440 /etc/sudoers.d/admin
|
||||
|
||||
if [ -z "$(grep /etc/sudoers.d /etc/sudoers)" ]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue