File: //etc.defaults/init/pkg-apache22.conf
cgroup cpuacct "pkgctl-Apache2.2"
cgroup memory "pkgctl-Apache2.2"
description "start apache22 daemon"
author "Development Infrastructure Team"
console log
reload signal SIGUSR1
expect fork
respawn
respawn limit 5 10
pre-start script
echo "pre-start"
HttpdConf="/usr/local/etc/apache22/conf/httpd22.conf"
/usr/bin/mkdir -p /usr/local/etc/apache22/sites-enabled || true
/usr/bin/chown root:root /usr/local/etc/apache22/sites-enabled || true
/usr/bin/chmod 755 /usr/local/etc/apache22/sites-enabled || true
/usr/bin/mkdir -p /var/log/httpd /run/httpd || true
/usr/bin/rm -f /run/httpd/user-cgisock.* || true
if [ ! -s ${HttpdConf} ]; then
logger -p err -t $0 "${HttpdConf} is empty."
fi
/usr/bin/mknod /run/apache22-access_log p || true
/usr/bin/chmod 600 /run/apache22-access_log
/usr/bin/mknod /run/apache22-error_log p || true
/usr/bin/chmod 600 /run/apache22-error_log
echo "Start Apache Server ....."
end script
script
exec /var/packages/Apache2.2/target/usr/local/bin/httpd22
end script
post-stop script
echo "post-stop"
end script