Skip to content

Commit b291368

Browse files
committed
Allow deletion of default config to fail
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.
1 parent 6283816 commit b291368

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docker-contributor/scripts/start.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ sudo a2enmod proxy_fcgi setenvif rewrite
157157
sudo cp "/etc/apache2/conf-available/php$DEFAULTPHPVERSION-fpm.conf" /etc/apache2/conf-available/php-domjudge-fpm.conf
158158
sudo sed -i 's/proxy:unix:.*|/proxy:unix:\/var\/run\/php-fpm-domjudge.sock|/' /etc/apache2/conf-available/php-domjudge-fpm.conf
159159
sudo a2enconf php-domjudge-fpm domjudge
160-
sudo rm /etc/apache2/sites-enabled/000-default.conf
160+
sudo rm -f /etc/apache2/sites-enabled/000-default.conf
161161
# Run DOMjudge in root
162162
sudo sed -i '/^#<VirtualHost \*>/,/^#<\/VirtualHost>/ s/#//' $APACHE2_CONFIG_FILE
163163
sudo sed -i 's/^Alias \/domjudge/#Alias \/domjudge/' $APACHE2_CONFIG_FILE

0 commit comments

Comments
 (0)