You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
647 B
31 lines
647 B
#!/sbin/openrc-run
|
|
# Copyright 2006-2020 Gentoo Authors
|
|
# 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 "Restorecond: Unable to determine SELinux status"
|
|
return 1
|
|
fi
|
|
}
|
|
|
|
start() {
|
|
if is_selinux_enabled; then
|
|
ebegin "Starting restorecond"
|
|
start-stop-daemon --start --quiet --exec /usr/sbin/restorecond
|
|
eend $?
|
|
fi
|
|
}
|
|
|
|
stop() {
|
|
if is_selinux_enabled; then
|
|
ebegin "Stopping restorecond"
|
|
start-stop-daemon --stop --quiet --pidfile /var/run/restorecond.pid
|
|
eend $?
|
|
fi
|
|
}
|