Merge pull request #66 from Mattie112/patch-2

Improved sed-comments when ran a second time
This commit is contained in:
Jeroen Geusebroek 2024-03-12 14:12:35 +01:00 committed by GitHub
commit a39ac8757b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -88,6 +88,7 @@ When this all is finished, restart spotweb using `docker-compose restart`. You s
| `SPOTWEB_DB_PASS` | The database server password. |
| `SPOTWEB_CRON_RETRIEVE` | Cron schedule for article retrieval. E.g. `*/15 * * * *` for every fifteen minutes.|
| `SPOTWEB_CRON_CACHE_CHECK` | Cron schedule for article cache sanity check. E.g. `10 */1 * * *` for 10 minutes after every hour. |
| `WEBSERVER_PORT` | Change the webserver port (for when you can't use port mapping with host network for example)|
## License

View File

@ -64,8 +64,8 @@ unset rt
# Change Apache port if needed from the default 80 to `WEBSERVER_PORT` (to run unprivileged or with a host network where no port mapping is available)
if [[ -n "$WEBSERVER_PORT" ]]; then
sed -i 's/Listen 80/Listen '"$WEBSERVER_PORT"'/' /etc/apache2/ports.conf
sed -i 's/VirtualHost \*:80/VirtualHost \*:'"$WEBSERVER_PORT"'/' /etc/apache2/sites-enabled/000-default.conf
sed -i 's/^Listen 80$/Listen '"$WEBSERVER_PORT"'/' /etc/apache2/ports.conf
sed -i 's/VirtualHost \*:80>/VirtualHost \*:'"$WEBSERVER_PORT"'>/' /etc/apache2/sites-enabled/000-default.conf
fi
# Only restart if one of the enmod commands succeeded