#!/bin/sh A=/usr/bin/gpe-appmgr D=/usr/lib/psionlx-software sum_of() { set -- $(md5sum "$1"); echo "$1"; } restart_launcher() { killall gpe-appmgr 2>/dev/null || return 0 sleep 1 XA=; [ -f /home/lx/.Xauthority ] && XA=XAUTHORITY=/home/lx/.Xauthority su - lx -c "DISPLAY=:0 $XA gpe-appmgr -d -r > /dev/null 2>&1 &" sleep 10 } # TASKS > Find new software: Psion's launcher has no command for it. if [ "$(sum_of $A)" = "bc5ce737df02f6856ec1795e75867240" ]; then cp $A $D/gpe-appmgr.psion && cp $D/gpe-appmgr $A.new && chmod 755 $A.new \ && mv $A.new $A && restart_launcher fi # Set Firefox up for PsionNet now, rather than at the next login. [ -d /home/lx ] && su lx -c "HOME=/home/lx /usr/bin/psionnet-connect" > /dev/null 2>&1 & exit 0