HEX
Server: Apache/2.2.34 (Unix) mod_fastcgi/mod_fastcgi-SNAP-0910052141
System: Linux Kou-Etsu-Dou 4.4.59+ #25556 SMP PREEMPT Thu Mar 4 18:03:46 CST 2021 x86_64
User: hosam (1026)
PHP: 7.2.29
Disabled: NONE
Upload Files
File: //proc/self/root/etc.defaults/init/pkg-apache24.conf
cgroup cpuacct "pkgctl-Apache2.4"
cgroup memory "pkgctl-Apache2.4"

description "start apache24 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/apache24/conf/httpd24.conf"

	/usr/bin/mkdir -p /usr/local/etc/apache24/sites-enabled || true
	/usr/bin/chown root:root /usr/local/etc/apache24/sites-enabled || true
	/usr/bin/chmod 755 /usr/local/etc/apache24/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/apache24-access_log p || true
	/usr/bin/chmod 600 /run/apache24-access_log

	/usr/bin/mknod /run/apache24-error_log p || true
	/usr/bin/chmod 600 /run/apache24-error_log

	echo "Start Apache Server ....."
end script


script
	exec /var/packages/Apache2.4/target/usr/local/bin/httpd24
end script


post-stop script
	echo "post-stop"
	/usr/bin/rm -f /run/httpd/httpd24.pid
end script