Skip to content

Commit

Permalink
Allow deletion of default config to fail
Browse files Browse the repository at this point in the history
If the container is restarted, the configuration file does not exist. Do
not fail the `rm` command if the file could not be removed to ensure
idempotency of the Apache2 configuration part.

Fixes an issue introduced in 6283816.
  • Loading branch information
Kevinjil committed Oct 22, 2024
1 parent 6283816 commit b89bcf6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docker-contributor/scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ sudo a2enmod proxy_fcgi setenvif rewrite
sudo cp "/etc/apache2/conf-available/php$DEFAULTPHPVERSION-fpm.conf" /etc/apache2/conf-available/php-domjudge-fpm.conf
sudo sed -i 's/proxy:unix:.*|/proxy:unix:\/var\/run\/php-fpm-domjudge.sock|/' /etc/apache2/conf-available/php-domjudge-fpm.conf
sudo a2enconf php-domjudge-fpm domjudge
sudo rm /etc/apache2/sites-enabled/000-default.conf
sudo rm -f /etc/apache2/sites-enabled/000-default.conf
# Run DOMjudge in root
sudo sed -i '/^#<VirtualHost \*>/,/^#<\/VirtualHost>/ s/#//' $APACHE2_CONFIG_FILE
sudo sed -i 's/^Alias \/domjudge/#Alias \/domjudge/' $APACHE2_CONFIG_FILE
Expand Down

0 comments on commit b89bcf6

Please sign in to comment.