#!/bin/bash

# sqp_JogglerInstallers.sh v1.02 (12th April 2012) by Andy Davison
#  Executed by JogglerSSH.

PLATFORM=`cat /tmp/sqp_platform`
[ "$PLATFORM" = "native" ] || export PATH=$PATH:`dirname $0`

# This one deals with SSH

if [ "$1" == "ssh" ]; then

	if [ "$2" == "install" ]; then
	
		sudo apt-get -y update > ~/.squeezeplay/additional.log
		sudo apt-get -y install ssh openssh-server >> ~/.squeezeplay/additional.log
		sudo apt-get -y clean
		sleep 2
		sudo reboot		
		exit 0
	
	fi

	if [ "$2" == "uninstall" ]; then
	
		sudo apt-get -y update > ~/.squeezeplay/additional.log
		sudo apt-get -y purge ssh openssh-server >> ~/.squeezeplay/additional.log
		sudo apt-get -y clean
		sleep 2
		sudo reboot		
		exit 0
	
	fi

fi


# This one deals with Logitech Media Server. Or it will. Maybe. One day.

if [ "$1" == "lms" ]; then

	if [ "$2" == "install" ]; then

		echo "Installing Logitech Media Server"
		
	fi
	
	if [ "$2" == "uninstall" ]; then

		echo "Removing Logitech Media Server"
		
	fi
	
fi