#!/bin/sh
### BEGIN INIT INFO
# Provides:          php-tmpdirs
# Required-Start:    $local_fs $remote_fs $network $syslog
# Required-Stop:     $local_fs $remote_fs $network $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# X-Interactive:     true
# Short-Description: Create PHP temp dirs
# Description:       Check and create PHP temp dirs before apache starts
### END INIT INFO

DESC="PHP temp dirs"
NAME=php-tmpdirs
GENSCRIPT=/etc/sys-admin/confgen/apache-create-tempdirs.php

. /lib/lsb/init-functions

case "$1" in
  start)
	log_daemon_msg "Checking PHP temp dirs" "$NAME"
	$GENSCRIPT
	log_success_msg
	;;
  stop)
	exit 0
	;;
  restart)
	exit 0
	;;
  *)
	echo "Usage: $NAME {start}" >&2
	exit 3
	;;
esac

exit 0

# vim: syntax=sh ts=4 sw=4 sts=4 sr noet
