#!/bin/bash declare no_group="Please run the next command in your terminal to give user "\ "${USER} permissions to update Albion game data:\n"\ "\nsudo usermod -a -G albion ${USER}" declare no_sudo="Don't run this game as root(sudo)!! it could be a security risk!" if [[ "$USER" == "root" ]]; then echo -e "${no_sudo}" exit 1 fi if which newgrp; then : else echo "A core package \"util-linux\" is required" exit 2 fi if (( $( id -nG "$USER" | grep -c '\balbion\b' ) )) # Does the user have the permissions to run as group albion? then newgrp albion <<< /opt/albion-online-launcher-bin/Albion-Online else if zenity \ --info \ --text="$no_group"; then : else ## Zenity is not installed echo -e "${no_group}" fi exit 4 fi