apache2: create log/run directory via pkg_postinst

The commit e789c3837c tries to create
log/run directory in initscript/systemd unit file. This is not a correct
method. We should create them in pkg_postinst.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Yi Zhao
2020-05-22 10:54:49 +08:00
committed by Khem Raj
parent 64469492b0
commit 6f4d0dbfbc
5 changed files with 23 additions and 9 deletions
@@ -5,10 +5,6 @@ After=network.target remote-fs.target nss-lookup.target
[Service]
Type=simple
Environment=LANG=C
ExecStartPre=mkdir -p /var/log/apache2
ExecStartPre=mkdir -p /var/run/apache2
ExecStartPre=chmod -R 0755 /var/log/apache2
ExecStartPre=chmod -R 0755 /var/run/apache2
ExecStart=@SBINDIR@/httpd -DFOREGROUND -D SSL -D PHP5 -k start
ExecStop=@BASE_BINDIR@/kill -WINCH ${MAINPID}
KillSignal=SIGCONT