From 07d904709be4bed09d7b348a98c8c4877ed1648f Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Sun, 20 Sep 2026 15:30:55 +0200 Subject: [PATCH] Refactor client configuration application process --- ct/your-spotify.sh | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/ct/your-spotify.sh b/ct/your-spotify.sh index 822147e36..6ab5cf19c 100644 --- a/ct/your-spotify.sh +++ b/ct/your-spotify.sh @@ -46,19 +46,18 @@ function update_script() { $STD pnpm --filter @your_spotify/client build msg_ok "Built Your Spotify" + msg_info "Applying Client Configuration" + API_ENDPOINT=$(grep '^API_ENDPOINT=' /opt/your-spotify.env | cut -d= -f2-) + cp /opt/your-spotify/apps/client/build/variables-template.js /opt/your-spotify/apps/client/build/variables.js + sed -i "s;__API_ENDPOINT__;${API_ENDPOINT};g" /opt/your-spotify/apps/client/build/variables.js + sed -i "s#connect-src \(.*\);#connect-src 'self' ${API_ENDPOINT}/;#g" /opt/your-spotify/apps/client/build/index.html + msg_ok "Applied Client Configuration" + + msg_info "Restarting Services" + systemctl restart your-spotify your-spotify-web + msg_ok "Restarted Services" + msg_ok "Updated successfully!" fi - - msg_info "Applying Client Configuration" - API_ENDPOINT=$(grep '^API_ENDPOINT=' /opt/your-spotify.env | cut -d= -f2-) - cp /opt/your-spotify/apps/client/build/variables-template.js /opt/your-spotify/apps/client/build/variables.js - sed -i "s;__API_ENDPOINT__;${API_ENDPOINT};g" /opt/your-spotify/apps/client/build/variables.js - sed -i "s#connect-src \(.*\);#connect-src 'self' ${API_ENDPOINT}/;#g" /opt/your-spotify/apps/client/build/index.html - msg_ok "Applied Client Configuration" - - msg_info "Restarting Services" - systemctl restart your-spotify your-spotify-web - msg_ok "Restarted Services" - msg_ok "Updated successfully!" exit }