#!/bin/sh

# Read the settings
source /app/bin/netsettings.sh

if [ "$SSH_ENABLED" != "" ]; then
    exec 1>/dev/ttyAMA0
    exec 2>/dev/ttyAMA0
    
    # Start DHCP if it not already started
    if [ ! -f /var/run/sshd.pid ]; then
    	echo S20sshd: Bringing up sshd
        /usr/sbin/sshd
    else
    	echo S20sshd: sshd already up
    fi
fi
