mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-29 06:06:32 +00:00
package/exim: fix log and pid file paths
By default, exim stores its PID file in /var/spool/exim, and its log file in /var/spool/exim/log, but it makes a lot more sense to have the logs in /var/log/exim and the PID file in /var/run/exim. Using binary name subdirectory in both cases allows for the use of systemd's LogsDirectory and RuntimeDirectory statements Signed-off-by: Pascal de Bruijn <p.debruijn@unilogic.nl> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
parent
a9434debcd
commit
754341460b
@ -3,11 +3,19 @@
|
|||||||
# Start/stop exim
|
# Start/stop exim
|
||||||
#
|
#
|
||||||
|
|
||||||
PIDFILE=/var/lock/exim/exim-daemon.pid
|
PIDFILE=/var/run/exim/exim.pid
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
echo "Starting exim..."
|
echo "Starting exim..."
|
||||||
|
if [ ! -d /var/log/exim ]; then
|
||||||
|
mkdir -p /var/log/exim
|
||||||
|
chown exim:mail /var/log/exim
|
||||||
|
fi
|
||||||
|
if [ ! -d /var/run/exim ]; then
|
||||||
|
mkdir -p /var/run/exim
|
||||||
|
chown root:mail /var/run/exim
|
||||||
|
fi
|
||||||
start-stop-daemon -S -x exim -- -bd
|
start-stop-daemon -S -x exim -- -bd
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
|
@ -39,6 +39,8 @@ define EXIM_USE_DEFAULT_CONFIG_FILE
|
|||||||
$(INSTALL) -m 0644 $(@D)/src/EDITME $(@D)/Local/Makefile
|
$(INSTALL) -m 0644 $(@D)/src/EDITME $(@D)/Local/Makefile
|
||||||
$(call exim-config-change,BIN_DIRECTORY,/usr/sbin)
|
$(call exim-config-change,BIN_DIRECTORY,/usr/sbin)
|
||||||
$(call exim-config-change,CONFIGURE_FILE,/etc/exim/configure)
|
$(call exim-config-change,CONFIGURE_FILE,/etc/exim/configure)
|
||||||
|
$(call exim-config-change,LOG_FILE_PATH,/var/log/exim/exim_%slog)
|
||||||
|
$(call exim-config-change,PID_FILE_PATH,/var/run/exim/exim.pid)
|
||||||
$(call exim-config-change,EXIM_USER,ref:exim)
|
$(call exim-config-change,EXIM_USER,ref:exim)
|
||||||
$(call exim-config-change,EXIM_GROUP,mail)
|
$(call exim-config-change,EXIM_GROUP,mail)
|
||||||
$(call exim-config-change,TRANSPORT_LMTP,yes)
|
$(call exim-config-change,TRANSPORT_LMTP,yes)
|
||||||
|
@ -3,6 +3,10 @@ Description=Exim MTA
|
|||||||
After=syslog.target network.target
|
After=syslog.target network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
|
User=exim
|
||||||
|
Group=mail
|
||||||
|
LogsDirectory=exim
|
||||||
|
RuntimeDirectory=exim
|
||||||
ExecStart=/usr/sbin/exim -bdf
|
ExecStart=/usr/sbin/exim -bdf
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user