@@ -278,6 +278,11 @@ inplace-postinstall-permissions:
278
278
setfacl -R -m u:$(DOMJUDGE_USER ) :rwx $(CURDIR ) /webapp/var
279
279
setfacl -R -m d:m::rwx $(CURDIR ) /webapp/var
280
280
setfacl -R -m m::rwx $(CURDIR ) /webapp/var
281
+ if command -v sestatus > /dev/null 2>&1 ; then \
282
+ chcon -R -t httpd_sys_content_t $(CURDIR ) /webapp; \
283
+ chcon -R -t httpd_log_t $(CURDIR ) /webapp/var/log; \
284
+ chcon -R -t httpd_sys_rw_content_t $(CURDIR ) /webapp/var/cache; \
285
+ fi
281
286
282
287
inplace-postinstall-apache : inplace-postinstall-permissions
283
288
@if [ ! -d " /etc/apache2/conf-enabled" ]; then echo " Couldn't find directory /etc/apache2/conf-enabled. Is apache installed?" ; false ; fi
@@ -287,14 +292,15 @@ inplace-postinstall-apache: inplace-postinstall-permissions
287
292
systemctl restart apache2
288
293
289
294
inplace-postinstall-nginx : inplace-postinstall-permissions
290
- @if command -v sestatus > /dev/null 2>&1 ; then \
291
- chcon -R -t httpd_config_t $(CURDIR ) ; \
292
- fi
293
295
@if [ ! -d " /etc/nginx/" ]; then echo " Couldn't find directory /etc/nginx/. Is nginx installed?" ; false ; fi
294
296
@if [ -d " /etc/nginx/sites-enabled/" ]; then \
295
297
ln -sf $(CURDIR ) /etc/nginx-conf /etc/nginx/sites-enabled/domjudge.conf; \
296
298
else \
297
299
ln -sf $(CURDIR ) /etc/nginx-conf /etc/nginx/conf.d/domjudge.conf; \
300
+ if command -v sestatus > /dev/null 2>&1 ; then \
301
+ chcon -t httpd_config_t $(CURDIR ) /etc/nginx-conf ; \
302
+ chcon -t httpd_config_t $(CURDIR ) /etc/nginx-conf-inner ; \
303
+ fi ; \
298
304
fi
299
305
systemctl restart nginx
300
306
@if [ ! -d " $( debpool) " ] && [ ! -d " $( fedpool) " ]; then \
@@ -306,8 +312,14 @@ inplace-postinstall-nginx: inplace-postinstall-permissions
306
312
fi
307
313
@if [ -d " $( fedpool) " ]; then \
308
314
ln -sf $(CURDIR ) /etc/domjudge-fpm.conf $(fedpool ) /domjudge-fpm.conf; \
315
+ if command -v sestatus > /dev/null 2>&1 ; then \
316
+ chcon -R -t httpd_config_t $(CURDIR ) /etc/domjudge-fpm.conf; \
317
+ fi ; \
309
318
systemctl restart php-fpm; \
310
319
fi
320
+ # @if command -v sestatus >/dev/null 2>&1; then \
321
+ # chcon -R -t httpd_config_t $(CURDIR); \
322
+ # fi
311
323
312
324
# Removes created symlinks; generated logs, submissions, etc. remain in output subdir.
313
325
inplace-uninstall-l :
0 commit comments