All pastes #339311 Raw Edit

Untitled

public text v1 · immutable
·published 2007-02-04 00:20 UTC
rendered paste body
#!/bin/sh

RUNNING=0;

for x in `ps -C mythfrontend | grep -v PID` end; do
    test $x != 'mythfrontend' && continue
    RUNNING=1;
done

if [ $RUNNING = 1 ]; then
    `mythtvosd --bcastaddr="127.0.0.1" \
                 --template='alert' \
                 --alert_text="MythFrontend is already running" > /dev/null 2>&1 &`
else
    /usr/bin/mythfrontend -v important -l /home/mythtv/mythfrontend.log 2>&1
fi