#!/bin/bash

cd build/firmware

if [ $1 == "start" ]; then
	if [ ! -d "ospi" ]; then
		git clone https://github.com/dan-in-ca/ospi
	fi
	cd ospi
	nohup python ospi.py >/dev/null 2>&1 &
	echo $! > pid
	sleep 5
else
	kill -9 `cat ospi/pid`
	rm ospi/pid
	sleep 5
fi

#!/bin/bash

cd build/firmware

if [ $1 == "start" ]; then
	if [ ! -d "ospi" ]; then
		git clone https://github.com/dan-in-ca/ospi
	fi
	cd ospi
	#Change port to 8080
	sed -i 's/"htp": 80,/"htp": 8080,/' data/sd.json
	nohup python ospi.py >/dev/null 2>&1 &
	echo $! > pid
	sleep 5
else
	kill -9 `cat ospi/pid`
	rm ospi/pid
	sleep 5
fi

Change port of OSPi back to 8080
Tests: Change port of OSPi back to 8080

Default recently changed:
https://github.com/Dan-in-CA/OSPi/commit/744f5b77b40ae8e4af0260eee6256a3
3cf4b182d
