You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if [[ $(getstate $3)=$var_state||$var_state="show" ]] ;then
28
28
if [[ $(getstate $3)=$var_state ]];then
29
-
echo -e "\t\"change\": \"no change\",\n"
29
+
echo -e "\t\"state\": \"no change\",\n"
30
30
fi
31
31
echo"$(getstate $3)"
32
32
else
33
33
if [ $var_token=$1 ];then
34
34
if [ $var_state="open" ];then
35
35
sed -i s/'"open": false'/'"open": true'/g $3
36
36
sed -i s/CLOSED/OPEN/g $4
37
-
echo -e "\t\"change\": \"open\","
37
+
#nc
38
+
echo -e "\t\"status\": \"open\","
38
39
elif [ $var_state="closed" ];then
39
40
sed -i s/'"open": true'/'"open": false'/g $3
40
41
sed -i s/OPEN/CLOSED/g $4
41
-
echo -e "\t\"change\": \"closed\","
42
+
echo -e "\t\"status\": \"closed\","
42
43
elif [ $var_state="help" ];then
43
44
echo -e "\t\"available_commands\": {\n\t\t\"open\": \"Set status to 'open'\",\n\t\t\"closed\": \"Set status to closed\",\n\t\t\"show\": \"Show current sace status\",\n\t\t\"help\": \"Show this help\"\n\t},"
44
45
else
45
-
echo -e "\t\"change\": \"unchanged because of wrong given state information\",\n\t\"hint\": \"try 'help' as parameter for available options\","
46
+
echo -e "\t\"status\": \"unchanged because of wrong given state information\",\n\t\"hint\": \"try 'help' as parameter for available options\","
46
47
fi
47
48
echo -e "\t\"access\": \"authorized\","
48
49
else
@@ -55,7 +56,7 @@ function changestate {
55
56
}
56
57
57
58
# Die Konfiguration wird aus einer Seperaten nicht mit dem git gesyncten CSV Datei gelesen:
58
-
IFS=':'
59
+
IFS='|'
59
60
declare -a config=( $( cat $(dirname $0)/spaceapi-server/config.csv ) )
0 commit comments