Compare commits

..

5 Commits

Author SHA1 Message Date
wh1te909
e3a66f017e Release 0.13.3 2022-04-25 01:32:11 +00:00
wh1te909
9e544ad471 bump version 2022-04-25 01:31:09 +00:00
sadnub
5f19aa527a fix running policy script checks 2022-04-24 21:02:28 -04:00
sadnub
bfd5bc5c26 remove port changes for persistent mesh configurations 2022-04-24 20:51:18 -04:00
wh1te909
2d0ec3accd back to dev 2022-04-25 00:38:47 +00:00
4 changed files with 9 additions and 11 deletions

View File

@@ -182,7 +182,9 @@ class RunChecks(APIView):
ret = {
"agent": agent.pk,
"check_interval": agent.check_interval,
"checks": CheckRunnerGetSerializer(checks, many=True).data,
"checks": CheckRunnerGetSerializer(
checks, context={"agent": agent}, many=True
).data,
}
return Response(ret)
@@ -216,7 +218,9 @@ class CheckRunner(APIView):
ret = {
"agent": agent.pk,
"check_interval": agent.check_run_interval(),
"checks": CheckRunnerGetSerializer(run_list, many=True).data,
"checks": CheckRunnerGetSerializer(
run_list, context={"agent": agent}, many=True
).data,
}
return Response(ret)

View File

@@ -159,8 +159,9 @@ class CheckRunnerGetSerializer(serializers.ModelSerializer):
if obj.check_type != "script":
return []
agent = self.context["agent"] if "agent" in self.context.keys() else obj.agent
return Script.parse_script_args(
agent=obj.agent, shell=obj.script.shell, args=obj.script_args
agent=agent, shell=obj.script.shell, args=obj.script_args
)
class Meta:

View File

@@ -17,7 +17,7 @@ LINUX_AGENT_SCRIPT = BASE_DIR / "core" / "agent_linux.sh"
AUTH_USER_MODEL = "accounts.User"
# latest release
TRMM_VERSION = "0.13.2"
TRMM_VERSION = "0.13.3"
# bump this version everytime vue code is changed
# to alert user they need to manually refresh their browser

View File

@@ -74,13 +74,6 @@ EOF
)"
echo "${mesh_config}" > /home/node/app/meshcentral-data/config.json
else
# replace persistent mesh configuration with new ports
sed -i 's/"Port": 443/"Port": 4443/' /home/node/app/meshcentral-data/config.json
sed -i 's/"RedirPort": 80/"RedirPort": 8080/' /home/node/app/meshcentral-data/config.json
sed -i "s/\"CertUrl\": \".*\"/\"CertUrl\": \"https:\/\/${NGINX_HOST_IP}:${NGINX_HOST_PORT}\"/" /home/node/app/meshcentral-data/config.json
fi
node node_modules/meshcentral --createaccount ${MESH_USER} --pass ${MESH_PASS} --email example@example.com