From dadbbb30e5a3b7e181b6aff9f1bf9fae77292695 Mon Sep 17 00:00:00 2001 From: iceBear67 Date: Tue, 17 Sep 2024 15:33:31 +0800 Subject: [PATCH] try to fix ci --- scripts/update.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/update.sh b/scripts/update.sh index 9b15705..1a76437 100755 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -28,10 +28,10 @@ special_curl "$SIGNED_URL&directory=/mods" -X POST -F "files=@$UPLOAD" echo "Uploaded!" BROADCAST="[ SFCRAFT UPDATE ] Server is shutting down in 10s, please be ready." -special_curl "$API_ENDPOINT/api/client/servers/$SERVER_ID/command" -H "Authorization: Bearer $TOKEN" -X POST -d "{\"command\":\"say $BROADCAST\"}" +special_curl "$API_ENDPOINT/api/client/servers/$SERVER_ID/command" -H "Content-Type: application/json" -H "Accept: application/json" -H "Authorization: Bearer $TOKEN" -X POST -d "{\"command\":\"say $BROADCAST\"}" echo "Broadcast is sent!" sleep 10s -special_curl "$API_ENDPOINT/api/client/servers/$SERVER_ID/power" -H "Authorization: Bearer $TOKEN" -X POST -d "{\"signal\":\"restart\"}" +special_curl "$API_ENDPOINT/api/client/servers/$SERVER_ID/power" -H "Content-Type: application/json" -H "Accept: application/json" -H "Authorization: Bearer $TOKEN" -X POST -d "{\"signal\":\"restart\"}" echo "Signal is sent!"