From 79111919547e48fec91deeb7637b7006dcad22ea Mon Sep 17 00:00:00 2001 From: wolfy Date: Wed, 13 Apr 2022 13:29:23 -0500 Subject: [PATCH] updated install script --- scripts/installers/ubuntu-20.04-install.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/installers/ubuntu-20.04-install.sh b/scripts/installers/ubuntu-20.04-install.sh index 99eb51ddf..825b1b18a 100755 --- a/scripts/installers/ubuntu-20.04-install.sh +++ b/scripts/installers/ubuntu-20.04-install.sh @@ -29,7 +29,7 @@ function install_os_tools() { function add_arm_user() { echo -e "${RED}Adding arm user${NC}" # create arm group if it doesn't already exist - if ! [ $(getent group arm) ]; then + if ! [[ "$(getent group arm)" ]]; then sudo groupadd arm else echo -e "${RED}arm group already exists, skipping...${NC}" @@ -103,12 +103,12 @@ function clone_arm() { fi git clone --recurse-submodules https://github.com/shitwolfymakes/automatic-ripping-machine.git arm - + cd arm git submodule update --init --recursive git submodule update --recursive --remote cd .. - + sudo chown -R arm:arm /opt/arm sudo find /opt/arm/scripts/ -type f -iname "*.sh" -exec chmod +x {} \; } @@ -175,8 +175,8 @@ function setup_autoplay() { else echo -e "\n${dev} /mnt${dev} udf,iso9660 users,noauto,exec,utf8 0 0 \n" | sudo tee -a /etc/fstab fi - sudo mkdir -p /mnt$dev - sudo chown arm:arm /mnt$dev + sudo mkdir -p "/mnt$dev" + sudo chown arm:arm "/mnt$dev" done } @@ -206,12 +206,12 @@ function install_armui_service() { function launch_setup() { echo -e "${RED}Launching ArmUI first-time setup${NC}" - site_addr=`sudo netstat -tlpn | awk '{ print $4 }' | grep .*:8080` - if [ -z $site_addr ]; then + site_addr=$(sudo netstat -tlpn | awk '{ print $4 }' | grep ".*:8080") + if [[ -z "$site_addr" ]]; then echo -e "${RED}ERROR: ArmUI site is not running. Run \"sudo systemctl status armui\" to find out why${NC}" else echo -e "${RED}ArmUI site is running on http://$site_addr. Launching setup...${NC}" - sudo -u arm nohup xdg-open http://$site_addr/setup > /dev/null 2>&1 & + sudo -u arm nohup xdg-open "http://$site_addr/setup" > /dev/null 2>&1 & fi }