#!/bin/bash
sleep 2
a=$(pidof rigctld)
	if [ "$a" != "" ]; then
		date >> /tmp/start.log
		echo "Already running." >> /tmp/start.log
	else
		date >> /tmp/start.log
		gpio -g mode 17 out
		gpio export 17 out
		/usr/local/bin/rigctld -P GPIO -p 17 &
		echo "Started." >> /tmp/start.log
	fi
echo "---------------------------" >> /tmp/start.log