diff options
Diffstat (limited to 'ucloner.sh')
-rw-r--r-- | ucloner.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ucloner.sh b/ucloner.sh index 685d3e6e0ef7..cfda628e0cf8 100644 --- a/ucloner.sh +++ b/ucloner.sh @@ -1,10 +1,14 @@ #!/bin/sh export LANGUAGE=`echo $LANG | grep -oP [A-Za-z_]+ | head -1` +which sudo 2>&1 > /dev/null && SUPER=sudo +which gksu 2>&1 > /dev/null && SUPER=gksu +which kdesu 2>&1 > /dev/null && SUPER=kdesu + if [ "$( ps -A | grep ucloner_gui)" ] ; then zenity --title="Error" --error --text="Another uclone instance is running!" exit 1 fi cd /opt/ucloner/ -exec python2 ./ucloner_gui.py &> /dev/null
\ No newline at end of file +exec $SUPER python2 ./ucloner_gui.py
\ No newline at end of file |