check for updates on fresh agent install

This commit is contained in:
wh1te909 2019-12-01 08:27:41 +00:00
parent 03a35381ff
commit ce79421698
2 changed files with 8 additions and 1 deletions

View File

@ -38,7 +38,9 @@ from checks.models import (
MemoryHistory,
CpuHistory,
)
from winupdate.models import WinUpdate
from agents.tasks import uninstall_agent_task, sync_salt_modules_task
from winupdate.tasks import check_for_updates_task
from agents.serializers import AgentHostnameSerializer
logger.configure(**settings.LOG_CONFIG)
@ -303,6 +305,11 @@ def update(request):
sync_salt_modules_task.delay(agent.pk)
# check for updates if this is fresh agent install
if not WinUpdate.objects.filter(agent=agent).exists():
check_for_updates_task.delay(agent.pk)
return Response("ok")

View File

@ -649,7 +649,7 @@ server {
location / {
root /var/www/rmm/dist;
try_files \$uri \$uri/ /index.html;
add_header Cache-Control "no-store, no-cache, must-revalidate";
add_header Cache-Control "no-store, no-cache, must-revalidate";
add_header Pragma "no-cache";
}
error_log /var/log/nginx/frontend-error.log;