First tests with audible prompt worked, so changed the subscripts to use the same method. It should now use audible prompt when available and not give an error if it is not available.
This commit is contained in:
@ -48,7 +48,7 @@
|
||||
fi
|
||||
|
||||
# Heredocument left-aligned
|
||||
cat << EOF | sudo tee /etc/cron.d/0chuser &> /dev/null
|
||||
cat << EOF | sudo "${sudoFlags[@]}" tee /etc/cron.d/0chuser &> /dev/null
|
||||
SHELL=/bin/bash
|
||||
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||
@reboot root usermod -a -G $groups -m -d /home/$newUser -l $newUser $oldUser && sed -i -e "s#NODM_USER=.*#NODM_USER='$newUser'#" -e "s#NODM_XSESSION=.*#NODM_XSESSION='/home/$newUser/.xinitrc'#" /etc/nodm.conf; rm -f /etc/cron.d/0chuser;reboot
|
||||
@ -57,5 +57,5 @@ EOF
|
||||
# Heredocument end.
|
||||
|
||||
# Files in cron.d must be 644 to work.
|
||||
sudo chmod 644 /etc/cron.d/0chuser
|
||||
sudo "${sudoFlags[@]}" chmod 644 /etc/cron.d/0chuser
|
||||
|
||||
|
Reference in New Issue
Block a user