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:
Storm Dragon
2023-08-19 17:09:54 -04:00
parent 88e4b13a71
commit f114eb4859
5 changed files with 25 additions and 25 deletions

View File

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