#!/sbin/runscript # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ depend() { need net } run_dir="/var/run" pidfile="$run_dir/urddsh.pid" code_dir="/var/www/localhost/htdocs/urd" program="$code_dir/urdd.sh" check_config() { : } start() { check_config ebegin "Starting URD" start-stop-daemon --start --background --make-pidfile --pidfile ${pidfile} \ --exec ${program} -d ${code_dir} -u apache -g apache eend $? } stop() { ebegin "Stopping URD" start-stop-daemon --stop --exec /usr/bin/php /var/www/localhost/htdocs/urd/urdd/urdd.php eend $? } restart() { stop start }