From effe441b568a875d23d806f15d22a73e0e3ccc18 Mon Sep 17 00:00:00 2001 From: mollusk Date: Sun, 7 Jul 2019 22:07:32 -0700 Subject: [PATCH] New Script: parlink.sh: autocycle parsec crash Former-commit-id: 41e3e9b64294d062d4b3c59b04f309b11ea5e011 --- parlink.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 parlink.sh diff --git a/parlink.sh b/parlink.sh new file mode 100755 index 0000000..f85d766 --- /dev/null +++ b/parlink.sh @@ -0,0 +1,18 @@ +#!/bin/bash + + +PARSEC_BIN="/usr/bin/parsecd" +PARSEC_ARGS="app_daemon=1" +PARSEC_URL="https://parsecgaming.com" +PARSEC_PROCESS=$(ps -A | grep -c parsecd) + +while [ ${PARSEC_PROCESS} != "1" ];do +if [ ! -f ${PARSEC_BIN} ];then + xdg-open ${PARSEC_URL} +elif [ ${PARSEC_PROCESS} = "1" ];then + ${PARSEC_BIN} ${PARSEC_ARGS} + +else + ${PARSEC_BIN} ${PARSEC_ARGS} +fi +done