#!/bin/sh
#===============================================================================
# SSS Firmware
#===============================================================================
# File 			:	services
# Who			:	JWB
# Description		:	Start/Stop All Services
#
# Copyright		:	LG ELECTRONICS INC.
# history 		:	2008.07.21 edited last
#===============================================================================
# Services
#===============================================================================
#	-Samba		: samba
#	-AFP			: atalk
#	-ftp			: proftpd
#	-DDNA		: dyndns
#	-iTune		: daap
#	-Hibernation	: noflushd
#===============================================================================
cd /etc/sss_script/services
. ./service.conf > /dev/null 2>&1

case "$1" in
	start)
		/etc/init.d/servers start

		if [ $hibernation == 'on' ]
			then
			/etc/init.d/noflushd restart
		fi
		if [ $ups == 'on' ]
			then
			/etc/init.d/upsd restart
		fi		
		;;
	stop)
		/etc/init.d/servers stop		

		/etc/init.d/noflushd stop
		
		/etc/init.d/upsd stop
	
		;;
	*)
		echo "Usage: $0 {start|stop}"
		;;
esac
