#!/bin/bash

# sqp_JogglerInstallers.sh v1.09 (20th June 2012) by Andy Davison
#  Executed by JogglerFeatures applet on sqpOS.

export PATH=$PATH:`dirname $0`
[ ! -e ~/.squeezeplay ] && mkdir ~/.squeezeplay

DEBUG=0

#### SSH

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

	if [ "$2" = "install" ]; then
		
		sudo dpkg -i /opt/squeezeplay/config/sqpos/packages/ssh/* &> ~/.squeezeplay/additional.log
		sleep 2
		[ $DEBUG -ne 1 ] && sudo reboot		
		exit 0
	
	fi

	if [ "$2" = "uninstall" ]; then
	
		sudo dpkg --purge ssh openssh-server &> ~/.squeezeplay/additional.log
		sleep 2
		[ $DEBUG -ne 1 ] && sudo reboot		
		exit 0
	
	fi

fi
