Skip to content

Commit 5020bbb

Browse files
committed
Castopod: point media.baseURL at the site root
Castopod appends its media folder to media.baseURL, so the /media/ suffix produced /media/media/ URLs. Upstream's example uses the plain origin. New installs write the root, and the update strips the suffix from existing .env files.
1 parent 452eb9e commit 5020bbb

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

‎ct/castopod.sh‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ function update_script() {
3636
exit
3737
fi
3838

39+
# Castopod appends the media folder itself, so the old default produced /media/media/
40+
sed -i 's|^\(media\.baseURL="[^"]*\)/media/"$|\1/"|' /opt/castopod/.env
41+
3942
if GITLAB_URL="https://code.castopod.org" check_for_gl_release "castopod" "adaures/castopod"; then
4043
msg_info "Stopping Service"
4144
systemctl stop caddy

‎install/castopod-install.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ CASTOPOD_SALT="$(openssl rand -hex 32)"
4949

5050
cat <<EOF >/opt/castopod/.env
5151
app.baseURL="http://${LOCAL_IP}/"
52-
media.baseURL="http://${LOCAL_IP}/media/"
52+
media.baseURL="http://${LOCAL_IP}/"
5353
app.forceGlobalSecureRequests=false
5454
admin.gateway="cp-admin"
5555
auth.gateway="cp-auth"

0 commit comments

Comments
 (0)