package/sysklogd: add systemd services
Sysklogd had only SYSV init scripts. Add systemd service files to start klogd and syslogd. Signed-off-by: Petr Kulhavy <brain@jikos.cz> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
This commit is contained in:
parent
0f8163a5ca
commit
7420614937
11
package/sysklogd/klogd.service
Normal file
11
package/sysklogd/klogd.service
Normal file
@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Kernel Log Daemon
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/sbin/klogd -n
|
||||
StandardOutput=null
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
WantedBy=syslogd.service
|
@ -32,4 +32,16 @@ define SYSKLOGD_INSTALL_INIT_SYSV
|
||||
$(TARGET_DIR)/etc/init.d/S01logging
|
||||
endef
|
||||
|
||||
define SYSKLOGD_INSTALL_INIT_SYSTEMD
|
||||
$(INSTALL) -D -m 644 $(SYSKLOGD_PKGDIR)/syslogd.service \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/syslogd.service
|
||||
$(INSTALL) -D -m 644 $(SYSKLOGD_PKGDIR)/klogd.service \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/klogd.service
|
||||
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
|
||||
ln -sf ../../../../usr/lib/systemd/system/syslogd.service \
|
||||
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/syslogd.service
|
||||
ln -sf ../../../usr/lib/systemd/system/syslogd.service \
|
||||
$(TARGET_DIR)/etc/systemd/system/syslog.service
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
|
13
package/sysklogd/syslogd.service
Normal file
13
package/sysklogd/syslogd.service
Normal file
@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=System Logging Service
|
||||
Requires=syslog.socket
|
||||
Wants=klogd.service
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/sbin/syslogd -m 0 -n
|
||||
StandardOutput=null
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Alias=syslog.service
|
Loading…
Reference in New Issue
Block a user