mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-09-21 09:50:25 +00:00
Refactor client configuration application process
This commit is contained in:
+11
-12
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user