diff --git a/parlink.sh b/parlink.sh index 9858de9..fe252cb 100755 --- a/parlink.sh +++ b/parlink.sh @@ -47,7 +47,7 @@ PARSEC_BIN="/usr/bin/parsecd" PARSEC_ARGS="app_daemon=1" PARSEC_URL="https://parsecgaming.com" PARSEC_PROCESS=$(ps -A | grep -c parsecd) - +AUTO_RESTART=true ########################################### set_video_driver(){ declare -a driver_name @@ -102,9 +102,11 @@ start_parsec(){ while [[ ${PARSEC_PROCESS} != "1" ]];do if [[ ! -f ${PARSEC_BIN} ]];then xdg-open ${PARSEC_URL} - elif [[ "${1}" = "-b" ]];then + fi + + if [[ "${AUTO_RESTART}" = false ]];then ${PARSEC_BIN} ${PARSEC_ARGS} - break + exit else ${PARSEC_BIN} ${PARSEC_ARGS} @@ -120,9 +122,9 @@ case "${1}" in if [[ ! -z "${2}" ]];then set_video_driver "${2}" - start_parsec "-b" + start_parsec else - start_parsec "-b" + start_parsec fi ;;