Daniel Gibbs 4 лет назад
Родитель
Сommit
1ca8764ac6
3 измененных файлов с 4 добавлено и 2 удалено
  1. 2 0
      lgsm/functions/alert.sh
  2. 1 1
      lgsm/functions/alert_discord.sh
  3. 1 1
      lgsm/functions/alert_rocketchat.sh

+ 2 - 0
lgsm/functions/alert.sh

@@ -180,6 +180,8 @@ if [ "${postalert}" != "on" ]; then
 	alertmoreinfourl="not enabled"
 fi
 
+alertdate="$(date)"
+
 # Images
 mapimagestatus="$(curl -o /dev/null -s -w "%{http_code}\n" https://raw.githubusercontent.com/${githubuser}/game-server-map-images/main/${shortname}/${alertmap}.jpg)"
 if [ -n "${gdmap}" ]&&[ "${mapimagestatus}" == "200" ]; then

+ 1 - 1
lgsm/functions/alert_discord.sh

@@ -54,7 +54,7 @@ json=$(cat <<EOF
 				"inline": true
 				},
 				"name": "Server time",
-				"value": "$(date)",
+				"value": "${alertdate}",
 				"inline": true
 				},
 				{

+ 1 - 1
lgsm/functions/alert_rocketchat.sh

@@ -27,7 +27,7 @@ json=$(cat <<EOF
 				{
 					"short": true,
 					"title": "Server Time",
-					"value": "$(date)"
+					"value": "${alertdate}"
 				},
 				{
 					"short": true,