#!/sbin/runscript
#
# ispCP ω (OMEGA) a Virtual Hosting Control Panel
# Copyright (C) 2006-2010 by isp Control Panel - http://ispcp.net
#
# Version: $Id: ispcp_daemon 2505 2010-01-06 20:30:53Z nuxwin $
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.1 (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
# License for the specific language governing rights and limitations
# under the License.
#
# The Original Code is "ispCP ω (OMEGA) a Virtual Hosting Control Panel".
#
# The Initial Developer of the Original Code is ispCP Team.
# Portions created by Initial Developer are Copyright (C) 2006-2010 by
# isp Control Panel. All Rights Reserved.
#
# The ispCP ω Home Page is:
#
#    http://isp-control.net
#

DAEMON=/var/www/ispcp/daemon/ispcp_daemon
PID=/var/run/${SVCNAME}.pid

opts=""

depend() {
    need net
    after apache mysql
    use logger
}

start() {
    ebegin "Starting $SVCNAME"
	start-stop-daemon --start --exec $DAEMON --make-pidfile --pidfile $PID
	sleep 1
	/bin/pidof ispcp_daemon > $PID
	eend $?
}


stop() {
    ebegin "Stopping $SVCNAME"
    start-stop-daemon --stop --exec $DAEMON --pidfile $PID
    eend $?
}
