Mercurial > trustbridge
comparison ui/trustbridge-tray-starter.sh @ 738:ea8d13590cbd
Added trustbridge-tray-starter script for use with cron job.
TODO: trustbridge must safe $DISPLAY in $CFGDIR/trustbridge-tray-starter.cfg
author | Sascha Wilde <wilde@intevation.de> |
---|---|
date | Fri, 04 Jul 2014 12:32:51 +0200 |
parents | |
children | 654a8ca9d5b4 |
comparison
equal
deleted
inserted
replaced
737:a26aada5900f | 738:ea8d13590cbd |
---|---|
1 #!/bin/bash | |
2 | |
3 PREFIX="" | |
4 CFGDIR="" | |
5 TBCMD="trustbridge --tray" | |
6 XSET=/usr/bin/xset | |
7 CONFIG="$CFGDIR/trustbridge-tray-starter.cfg" | |
8 | |
9 if [ -r "$CONFIG" ] ; then | |
10 DISPLAY=`sed -n "/DISPLAY/s/[^=]*=\(.*\)/\1/p" "$CONFIG"` | |
11 export DISPLAY | |
12 | |
13 # only run when X is accessible | |
14 if "$XSET" -q >/dev/null 2>&1 ; then | |
15 "$PREFIX/bin/"$TBCMD | |
16 fi | |
17 fi |