|
Apache/2.2.15 (CentOS) Linux obd60-6c49958d75-2q7cw 5.4.0-174-generic #193-Ubuntu SMP Thu Mar 7 14:29:28 UTC 2024 x86_64 uid=48(apache) gid=48(apache) groups=48(apache) server ip : 104.21.65.202 | your ip : 10.244.126.0 safemode OFF > / etc / rc.d / init.d / |
| Filename | /etc/rc.d/init.d/restorecond |
| Size | 1.78 kb |
| Permission | rwxr-xr-x |
| Owner | apache |
| Create time | 26-May-2024 11:05 |
| Last modified | 18-Nov-2016 21:00 |
| Last accessed | 18-Nov-2016 21:00 |
| Actions | edit | rename | delete | download (gzip) |
| View | text | code | image |
#!/bin/sh
#
# restorecond: Daemon used to maintain path file context
#
# chkconfig: - 12 87
# description: restorecond uses inotify to look for creation of new files \
# listed in the /etc/selinux/restorecond.conf file, and restores the \
# correct security context.
#
# processname: /usr/sbin/restorecond
# config: /etc/selinux/restorecond.conf
# pidfile: /var/run/restorecond.pid
#
# Return values according to LSB for all commands but status:
# 0 - success
# 1 - generic or unspecified error
# 2 - invalid or excess argument(s)
# 3 - unimplemented feature (e.g. "reload")
# 4 - insufficient privilege
# 5 - program is not installed
# 6 - program is not configured
# 7 - program is not running
PATH=/sbin:/bin:/usr/bin:/usr/sbin
# Source function library.
. /etc/rc.d/init.d/functions
[ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled || exit 7
# Check that we are root ... so non-root users stop here
test $EUID = 0 || exit 4
test -x /usr/sbin/restorecond || exit 5
test -f /etc/selinux/restorecond.conf || exit 6
RETVAL=0
start()
{
echo -n $"Starting restorecond: "
unset HOME MAIL USER USERNAME
daemon /usr/sbin/restorecond
RETVAL=$?
touch /var/lock/subsys/restorecond
echo
return $RETVAL
}
stop()
{
echo -n $"Shutting down restorecond: "
killproc restorecond
RETVAL=$?
rm -f /var/lock/subsys/restorecond
echo
return $RETVAL
}
restart()
{
stop
start
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status restorecond
RETVAL=$?
;;
force-reload|restart|reload)
restart
;;
condrestart)
[ -e /var/lock/subsys/restorecond ] && restart || :
;;
*)
echo $"Usage: $0 {start|stop|restart|reload|force-reload|status|condrestart}"
RETVAL=3
esac
exit $RETVAL
#
# restorecond: Daemon used to maintain path file context
#
# chkconfig: - 12 87
# description: restorecond uses inotify to look for creation of new files \
# listed in the /etc/selinux/restorecond.conf file, and restores the \
# correct security context.
#
# processname: /usr/sbin/restorecond
# config: /etc/selinux/restorecond.conf
# pidfile: /var/run/restorecond.pid
#
# Return values according to LSB for all commands but status:
# 0 - success
# 1 - generic or unspecified error
# 2 - invalid or excess argument(s)
# 3 - unimplemented feature (e.g. "reload")
# 4 - insufficient privilege
# 5 - program is not installed
# 6 - program is not configured
# 7 - program is not running
PATH=/sbin:/bin:/usr/bin:/usr/sbin
# Source function library.
. /etc/rc.d/init.d/functions
[ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled || exit 7
# Check that we are root ... so non-root users stop here
test $EUID = 0 || exit 4
test -x /usr/sbin/restorecond || exit 5
test -f /etc/selinux/restorecond.conf || exit 6
RETVAL=0
start()
{
echo -n $"Starting restorecond: "
unset HOME MAIL USER USERNAME
daemon /usr/sbin/restorecond
RETVAL=$?
touch /var/lock/subsys/restorecond
echo
return $RETVAL
}
stop()
{
echo -n $"Shutting down restorecond: "
killproc restorecond
RETVAL=$?
rm -f /var/lock/subsys/restorecond
echo
return $RETVAL
}
restart()
{
stop
start
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status restorecond
RETVAL=$?
;;
force-reload|restart|reload)
restart
;;
condrestart)
[ -e /var/lock/subsys/restorecond ] && restart || :
;;
*)
echo $"Usage: $0 {start|stop|restart|reload|force-reload|status|condrestart}"
RETVAL=3
esac
exit $RETVAL