#!/bin/sh
# PlayOn!X: custom start-up script
# Author: mikka [mika.hellmann@gmail.com]

# FIRMWARE TOOLS
#
# Tuning system
#/sbin/sysctl -p

# Safe font system
if [ ! -e /usr/local/bin/Resource/ARIALUNI.TTF ];
then 
  mount -o remount,rw /
  cp /usr/local/bin/Resource/ARIALUNI_ORIG.TTF /usr/local/bin/Resource/ARIALUNI.TTF
fi

# Enable only if you are using USB soundcard
#/usr/bin/sound-enable

# If you don't have default PlayOn!HD partitions, you probably want to start auto-mounting script
#/usr/local/etc/mountS

# Waiting for HDD mount (needed for almost everything listed below)
n=1
while [ -z "`mount | grep ext`" ] ; do
  sleep 3
  [ $n - gt 30 ] && break
  let n+=1
done

# Starting cron daemon
#crond

# Starting NTP daemon
#start ntpd

# Starting ISS
#start iss

# Starting SAMBA
#start samba 
  
# Starting spindown daemon
#start spindownd

# Activating swap
#start swap

  
# OPTWARE TOOLS
#
# Starting FTP server
#start vsftpd 

# Starting PHP webserver
#start lighttpd

# Starting SSH server (you must run once 'dropbear-config' before using it)
#start dropbear

# Starting UDP to TCP daemon
#start udpxy

# Starting BitTorrent client
#start transmission 

# Starting UPnP media server (you should select only one)
#start ushare
#start mediatomb 
