Commit 16f8be0b authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

crond should be started by systemd

parent 2fff3775
all: all: crond-service
tar xf cronie-1.7.2.tar.gz tar xf cronie-1.7.2.tar.gz
cd cronie-cronie-1.7.2 && ./autogen.sh cd cronie-cronie-1.7.2 && ./autogen.sh
cd cronie-cronie-1.7.2 && ./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc cd cronie-cronie-1.7.2 && ./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc
...@@ -7,4 +7,30 @@ all: ...@@ -7,4 +7,30 @@ all:
chmod u+s /usr/bin/crontab chmod u+s /usr/bin/crontab
touch /etc/cron.deny touch /etc/cron.deny
install -v -m755 -d /var/spool/cron install -v -m755 -d /var/spool/cron
@echo "$$CROND_SERVICE" > /lib/systemd/system/crond.service
systemctl enable crond.service
rm -rf cronie-cronie-1.7.2 rm -rf cronie-cronie-1.7.2
crond-service:
define CROND_SERVICE
[Unit]
Description=Command Scheduler
Documentation=man:crond(8)
After=syslog.target nss-user-lookup.target network.target
[Service]
EnvironmentFile=-/etc/sysconfig/crond
ExecStart=/usr/sbin/crond -n $CRONDARGS
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
ProtectSystem=full
ProtectHome=yes
PrivateTmp=yes
NoNewPrivileges=yes
[Install]
WantedBy=multi-user.target
endef
export CROND_SERVICE
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment