From 911a3e10af6a2c238a5a080271014c591eb80751 Mon Sep 17 00:00:00 2001 From: Matthew Saunders Brown Date: Thu, 20 Oct 2022 11:48:45 -0700 Subject: [PATCH] install systemd configs in /usr/local/lib/systemd/system/ --- install.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 3a5d45f..bda4186 100755 --- a/install.sh +++ b/install.sh @@ -93,12 +93,17 @@ chmod 644 /etc/spamassassin/local.cf chown debian-spamd:mail /etc/spamassassin/sql.cf chmod 640 /etc/spamassassin/sql.cf +# create local systemd dir, used by srsd & vmail-cron +if [[ ! -d /usr/local/lib/systemd/system ]]; then + mkdir -p /usr/local/lib/systemd/system +fi + # srsd # bug fixes for libmail-srs-perl. still needed as of v0.31-6 on Ubuntu 22.04 sed -i 's|/tmp/srsd|/run/srsd/srsd.sock|' /usr/share/perl5/Mail/SRS/Daemon.pm sed -i '/Until we decide that forward/,+3d' /usr/share/perl5/Mail/SRS/Daemon.pm -cp systemd/srsd.service /lib/systemd/system/srsd.service -chmod 644 /lib/systemd/system/srsd.service +cp systemd/srsd.service /usr/local/lib/systemd/system/srsd.service +chmod 644 /usr/local/lib/systemd/system/srsd.service systemctl daemon-reload systemctl enable srsd systemctl start srsd @@ -150,8 +155,8 @@ cp bin/* /usr/local/bin/ # install & enable vmail systemd cron cp sbin/vmail-cron.sh /usr/local/sbin/ chmod 755 /usr/local/sbin/vmail-cron.sh -cp systemd/vmail-cron.* /usr/lib/systemd/system/ -chmod 644 /usr/lib/systemd/system/vmail-cron.* +cp systemd/vmail-cron.* /usr/local/lib/systemd/system/ +chmod 644 /usr/local/lib/systemd/system/vmail-cron.* systemctl enable vmail-cron.timer systemctl start vmail-cron.timer