mirror of
https://github.com/thead-yocto-mirror/meta-openembedded
synced 2026-09-08 15:15:00 +02:00
reproduce steps:
1. boot up target
2. scp apache2-2.4.41-r0.1.aarch64.rpm on target
3. rpm -i apache2-2.4.41-r0.1.aarch64.rpm
4. systemctl status apache2
Error:
httpd[7767]: (2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2/' for main error log
with the old way, /var/log/apache2/ is created by service
systemd-tmpfiles-setup during boot, so only works when apache2
already installed before boot, in above scenario,
/var/log/apache2/ will not created. fix by creating it in the
service file. similar fix for sysV system
Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit e789c3837c)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
19 lines
488 B
Desktop File
19 lines
488 B
Desktop File
[Unit]
|
|
Description=The Apache HTTP Server
|
|
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
|
|
PrivateTmp=true
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|