diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-apps/mcstrans/files |
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-apps/mcstrans/files')
-rwxr-xr-x | sys-apps/mcstrans/files/mcstransd.init | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/sys-apps/mcstrans/files/mcstransd.init b/sys-apps/mcstrans/files/mcstransd.init new file mode 100755 index 000000000000..7c90e771b383 --- /dev/null +++ b/sys-apps/mcstrans/files/mcstransd.init @@ -0,0 +1,31 @@ +#!/sbin/openrc-run +# Copyright 2006-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +is_selinux_enabled() { + local SE_ENABL="/usr/sbin/selinuxenabled" + + if [ -x "$SE_ENABL" ]; then + $SE_ENABL && return 0 || return 1 + else + ewarn "mcstransd: Unable to determine SELinux status" + return 1 + fi +} + +start() { + if is_selinux_enabled; then + ebegin "Starting mcstransd" + checkpath -q -d -m 0755 /run/setrans + start-stop-daemon --start --quiet --exec /sbin/mcstransd + eend $? + fi +} + +stop() { + if is_selinux_enabled; then + ebegin "Stopping mcstransd" + start-stop-daemon --stop --quiet --name mcstransd + eend $? + fi +} |