Skip to content

Commit

Permalink
feat: added fqdn-changed event when setting fqdn
Browse files Browse the repository at this point in the history
  • Loading branch information
Tbaile committed Mar 15, 2024
1 parent 4bdfb99 commit 98fd3cd
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env python3

#
# Copyright (C) 2024 Nethesis S.r.l.
# SPDX-License-Identifier: GPL-3.0-or-later
#

import json
import os
import sys

import agent

request = json.load(sys.stdin)

redis_client = agent.redis_connect(privileged=True)
redis_client.publish(f'{os.getenv("AGENT_ID")}/event/fqdn-changed', json.dumps({
"hostname": request["hostname"],
"domain": request["domain"],
}))

0 comments on commit 98fd3cd

Please sign in to comment.