#!/bin/sh id=$(date +%s) TTY=$(dbus-send --system --print-reply --type=method_call --dest=org.pyneo.muxer /org/pyneo/Muxer org.freesmartphone.GSM.MUX.AllocChannel string:$id | grep string | cut -d \" -f 2) || (echo "CANNOT GET MODEM"; exit 1) logger -t nosleep "using tty $TTY" chat -f /home/root/nosleep.chat < $TTY > $TTY