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:
parent
88e4b13a71
commit
f114eb4859
@ -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
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
install_package() {
|
||||
# If for some reason we have to change AUR helpers, this function should make it easy to update everything all at once.
|
||||
# make sure system is up to date
|
||||
yay --sudoflags "-A" --sudoloop --noconfirm -Syu
|
||||
yay --sudoflags "-A" --sudoloop --needed --noconfirm -Sy "$@"
|
||||
yay --sudoflags "${sudoFlags[@]}" --sudoloop --noconfirm -Syu
|
||||
yay --sudoflags "${sudoFlags[@]}" --sudoloop --needed --noconfirm -Sy "$@"
|
||||
}
|
||||
|
||||
restart() {
|
||||
if dialog --clear --backtitle "Stormux" --yesno "Would you like to reboot now to apply changes?" 10 80 ; then
|
||||
sudo reboot
|
||||
sudo "${sudoFlags[@]}" reboot
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -11,19 +11,19 @@ install_package cabextract box86 dos2unix p7zip unzip xdotool
|
||||
wineFile="$(mktemp)"
|
||||
curl --output "$wineFile" "$wineURL"
|
||||
# Create wine directory
|
||||
sudo mkdir -p /opt/wine
|
||||
sudo "${sudoFlags[@]}" mkdir -p /opt/wine
|
||||
pushd /opt/wine
|
||||
sudo tar vxf "$wineFile"
|
||||
sudo "${sudoFlags[@]}" tar vxf "$wineFile"
|
||||
popd
|
||||
|
||||
# Create files and links in /usr/local/bin
|
||||
sudo mkdir -p /usr/local/bin
|
||||
echo -e '#!/bin/bash\nsetarch linux32 -L /opt/wine/bin/wine "$@"' | sudo tee /usr/local/bin/wine > /dev/null
|
||||
sudo chmod 755 /usr/local/bin/wine
|
||||
sudo "${sudoFlags[@]}" mkdir -p /usr/local/bin
|
||||
echo -e '#!/bin/bash\nsetarch linux32 -L /opt/wine/bin/wine "$@"' | sudo "${sudoFlags[@]}" tee /usr/local/bin/wine > /dev/null
|
||||
sudo "${sudoFlags[@]}" chmod 755 /usr/local/bin/wine
|
||||
find /opt/wine/bin/ -maxdepth 1 -type f -perm -u+x -exec bash -c '
|
||||
for i ; do
|
||||
sudo ln -s "$i" /usr/local/bin/
|
||||
sudo chmod 755 /usr/local/bin/"${i##*/}"
|
||||
sudo "${sudoFlags[@]}" ln -s "$i" /usr/local/bin/
|
||||
sudo "${sudoFlags[@]}" chmod 755 /usr/local/bin/"${i##*/}"
|
||||
done' _ {} \;
|
||||
|
||||
# Install audiogame-manager
|
||||
@ -32,12 +32,12 @@ if [[ -d ~/audiogame-manager ]]; then
|
||||
else
|
||||
git clone https://git.stormux.org/storm/audiogame-manager ~/audiogame-manager
|
||||
fi
|
||||
cat << EOF | sudo tee /usr/local/bin/audiogame-manager &> /dev/null
|
||||
cat << EOF | sudo "${sudoFlags[@]}" tee /usr/local/bin/audiogame-manager &> /dev/null
|
||||
#!/usr/bin/env bash
|
||||
|
||||
pushd ~/audiogame-manager
|
||||
./audiogame-manager.sh $@
|
||||
exit 0
|
||||
EOF
|
||||
sudo chmod 755 /usr/local/bin/audiogame-manager
|
||||
sudo "${sudoFlags[@]}" chmod 755 /usr/local/bin/audiogame-manager
|
||||
restart
|
||||
|
@ -10,11 +10,11 @@ continue="$(yesno "Do you want to switch the active console screen reader to ${s
|
||||
if [[ "$continue" == "Yes" ]]; then
|
||||
if [[ "$screenreader" == "speakup" ]]; then
|
||||
install_package espeakup
|
||||
sudo systemctl disable --now fenrirscreenreader.service
|
||||
sudo systemctl enable --now espeakup.service
|
||||
sudo "${sudoFlags[@]}" systemctl disable --now fenrirscreenreader.service
|
||||
sudo "${sudoFlags[@]}" systemctl enable --now espeakup.service
|
||||
fi
|
||||
if [[ "$screenreader" == "fenrir" ]]; then
|
||||
sudo systemctl disable --now espeakup.service
|
||||
sudo systemctl enable --now fenrirscreenreader.service
|
||||
sudo "${sudoFlags[@]}" systemctl disable --now espeakup.service
|
||||
sudo "${sudoFlags[@]}" systemctl enable --now fenrirscreenreader.service
|
||||
fi
|
||||
fi
|
||||
|
@ -21,15 +21,15 @@ mapfile -t cities < <(timedatectl --no-pager list-timezones | grep "$region" | c
|
||||
$(for i in ${cities[@]} ; do echo "$i";echo "$i";done) --stdout)
|
||||
|
||||
# Set the timezone
|
||||
sudo timedatectl set-timezone ${region}/${city}
|
||||
sudo "${sudoFlags[@]}" timedatectl set-timezone ${region}/${city}
|
||||
if [[ -f /etc/localtime ]]; then
|
||||
sudo rm /etc/localtime
|
||||
sudo "${sudoFlags[@]}" rm /etc/localtime
|
||||
fi
|
||||
sudo ln -s /usr/share/zoneinfo/${region}/${city} /etc/localtime
|
||||
sudo "${sudoFlags[@]}" ln -s /usr/share/zoneinfo/${region}/${city} /etc/localtime
|
||||
|
||||
# Make sure we are syncing with the internet
|
||||
echo "Setting up ntpd"
|
||||
sudo timedatectl set-ntp false
|
||||
sudo systemctl stop ntpd
|
||||
sudo ntpd -Ggq &> /dev/null
|
||||
sudo systemctl enable ntpd --now
|
||||
sudo "${sudoFlags[@]}" timedatectl set-ntp false
|
||||
sudo "${sudoFlags[@]}" systemctl stop ntpd
|
||||
sudo "${sudoFlags[@]}" ntpd -Ggq &> /dev/null
|
||||
sudo "${sudoFlags[@]}" systemctl enable ntpd --now
|
||||
|
Loading…
Reference in New Issue
Block a user