#!/bin/sh
echo Check if guitarix is running...
pidof guitarix
if [[ 0 != 0 ]]; then
	echo Starting guitarix...
	guitarix --rpcport=7000 >/dev/null 2>&1 &
else
	echo guitarix is already running, make sure that it is launched with '--rpcport=7000'
fi

websockify --web=/usr/share/guitarix-webui/webui '*':8000 localhost:7000 > /var/log/guitarix-webui.log 2>&1 &
xdg-open http://localhost:8000
