Skip to content

Commit

Permalink
updated install script
Browse files Browse the repository at this point in the history
  • Loading branch information
shitwolfymakes committed Apr 13, 2022
1 parent 296c8f1 commit 7911191
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions scripts/installers/ubuntu-20.04-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down Expand Up @@ -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 {} \;
}
Expand Down Expand Up @@ -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
}

Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit 7911191

Please sign in to comment.