Skip to content

Commit e40e59e

Browse files
committed
Check that restorecon is available before applying labels
1 parent 880e158 commit e40e59e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/postinstall.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ if command -v checkmodule &> /dev/null && command -v semodule_package &> /dev/nu
1111
fi
1212

1313
# Allow writing to /etc/redis/sentinel/ for redis-sentinel
14-
if command -v semanage &> /dev/null; then
14+
if command -v semanage &> /dev/null && command -v restorecon &> /dev/null; then
1515
semanage fcontext -a -t redis_conf_t '/etc/redis/sentinel'
1616
semanage fcontext -a -t redis_conf_t '/etc/redis/sentinel/sentinel.conf'
1717
restorecon '/etc/redis/sentinel' '/etc/redis/sentinel/sentinel.conf'

0 commit comments

Comments
 (0)