remove --shell option from sudo, not needed

This commit is contained in:
Matthew Saunders Brown 2022-04-20 12:08:00 -07:00
parent c61f7c70f7
commit c2fe329b5e
3 changed files with 7 additions and 2 deletions

View File

@ -2,7 +2,7 @@
# must be root # must be root
if [ "$USER" != "root" ]; then if [ "$USER" != "root" ]; then
exec sudo -u root --shell /bin/bash $0 $@ exec sudo -u root $0 $@
fi fi
help() help()

View File

@ -2,7 +2,7 @@
# must be root # must be root
if [ "$USER" != "root" ]; then if [ "$USER" != "root" ]; then
exec sudo -u root --shell /bin/bash $0 $@ exec sudo -u root $0 $@
fi fi
help() help()

View File

@ -13,6 +13,11 @@
# or specificy the path to the script with the --post-hook cerbot command option # or specificy the path to the script with the --post-hook cerbot command option
# to have it automatically run when attempting to obtain/renew certificates. # to have it automatically run when attempting to obtain/renew certificates.
# must be root
if [ "$USER" != "root" ]; then
exec sudo -u root $0 $@
fi
# make dir if it doesn't already exist # make dir if it doesn't already exist
if [[ ! -e /etc/ssl/letsencrypt/ ]]; then if [[ ! -e /etc/ssl/letsencrypt/ ]]; then
install --owner=root --group=ssl-cert --mode=750 --directory /etc/ssl/letsencrypt install --owner=root --group=ssl-cert --mode=750 --directory /etc/ssl/letsencrypt