summarylogtreecommitdiffstats
path: root/ucloner.sh
diff options
context:
space:
mode:
authormaz-12015-10-13 10:02:59 +0000
committermaz-12015-10-13 10:02:59 +0000
commiteabaa1dcfd93f39ab820c312da80d6146ef90798 (patch)
tree479e6f830f6fbb5424769f33b42ed6efb6bed278 /ucloner.sh
parent26549a0393537fcf2021d1c652c268e47c16567a (diff)
downloadaur-eabaa1dcfd93f39ab820c312da80d6146ef90798.tar.gz
update
Diffstat (limited to 'ucloner.sh')
-rw-r--r--ucloner.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/ucloner.sh b/ucloner.sh
index 685d3e6e0ef..cfda628e0cf 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