Add systemd unit file for mcstrans daemon

This commit is contained in:
Laurent Bigonville 2013-11-06 13:23:59 +01:00 committed by Stephen Smalley
parent 534f5a74bb
commit 28d63799d0
2 changed files with 12 additions and 0 deletions

View file

@ -17,6 +17,7 @@ endif
PREFIX ?= $(DESTDIR)/usr
SBINDIR ?= $(DESTDIR)/sbin
INITDIR ?= $(DESTDIR)/etc/rc.d/init.d
SYSTEMDDIR ?= $(DESTDIR)/usr/lib/systemd
PROG_SRC=mcstrans.c mcscolor.c mcstransd.c mls_level.c
PROG_OBJS= $(patsubst %.c,%.o,$(PROG_SRC))
@ -38,6 +39,8 @@ install: all
install -m 755 $(PROG) $(SBINDIR)
test -d $(INITDIR) || install -m 755 -d $(INITDIR)
install -m 755 $(INITSCRIPT).init $(INITDIR)/$(INITSCRIPT)
test -d $(SYSTEMDDIR)/system || install -m 755 -d $(SYSTEMDDIR)/system
install -m 644 mcstrans.service $(SYSTEMDDIR)/system/
clean:
-rm -f $(OBJS) $(LOBJS) $(TARGET) $(PROG) $(PROG_OBJS) *~ \#*

View file

@ -0,0 +1,9 @@
[Unit]
Description=Translates SELinux MCS/MLS labels to human readable form
ConditionSecurity=selinux
[Service]
ExecStart=/sbin/mcstransd -f
[Install]
WantedBy=multi-user.target