Rename option now working.
This commit is contained in:
@ -36,12 +36,12 @@
|
||||
exit 1
|
||||
fi
|
||||
|
||||
local oldUser="$USER"
|
||||
oldUser="$USER"
|
||||
|
||||
local groups="$(groups "$oldUser")"
|
||||
groups="$(groups "$oldUser")"
|
||||
groups="${groups// /,}"
|
||||
|
||||
local newUser="$1"
|
||||
newUser="$1"
|
||||
if ! [[ "$newUser" =~ ^[a-z][-a-z0-9]*$ ]]; then
|
||||
msgbox "Username $newUser failed validation. It cannot contain spaces or some punctuation."
|
||||
exit 1
|
||||
@ -59,8 +59,3 @@ EOF
|
||||
# Files in cron.d must be 644 to work.
|
||||
sudo chmod 644 /etc/cron.d/0chuser
|
||||
|
||||
# Reboot the computer so the script can run
|
||||
local answer="$(yesno "Would you like to reboot now so the username can be changed? If no, you will need to reboot manually for the changes to be applied.")"
|
||||
if [[ "$answer" == "Yes" ]]; then
|
||||
sudo reboot
|
||||
fi
|
||||
|
10
.includes/functions.sh
Executable file
10
.includes/functions.sh
Executable file
@ -0,0 +1,10 @@
|
||||
install_package() {
|
||||
# If for some reason we have to change AUR helpers, this function should make it easy to update everything all at once.
|
||||
yay --needed --noconfirm -S "$@"
|
||||
}
|
||||
|
||||
restart() {
|
||||
if dialog --clear --backtitle "Stormux" --yesno "Would you like to reboot now to apply changes?" 10 80 ; then
|
||||
sudo reboot
|
||||
fi
|
||||
}
|
5
.includes/gaming.sh
Normal file → Executable file
5
.includes/gaming.sh
Normal file → Executable file
@ -1,11 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
install_package() {
|
||||
# If for some reason we have to change AUR helpers, this function should make it easy to update everything all at once.
|
||||
yay --needed --noconfirm -S "$@"
|
||||
}
|
||||
|
||||
# URL from where wine is downloaded, must be i686
|
||||
wineURL="https://32.arlm.tyzoid.com/i686/community/wine-5.14-1.0-i686.pkg.tar.zst"
|
||||
|
||||
|
@ -83,7 +83,7 @@ menulist() {
|
||||
dialog --backtitle "Stormux" \
|
||||
--clear \
|
||||
--no-tags \
|
||||
--menu "Please select an option" 0 0 0 ${menuList[@]} --stdout
|
||||
--menu "Please select an option" 0 0 0 "${menuList[@]}" --stdout
|
||||
return $?
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user