From 3ad8b29178642b744d57535394dd1ac7fef7030e Mon Sep 17 00:00:00 2001 From: Markus Rosenstihl Date: Sat, 10 Feb 2024 17:25:42 +0100 Subject: [PATCH] added bacula-conf.py configure and restart bacula-fd --- bacula-conf.py | 4 +--- liebchen.yml | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bacula-conf.py b/bacula-conf.py index 5467252..4b2d340 100644 --- a/bacula-conf.py +++ b/bacula-conf.py @@ -7,7 +7,6 @@ import argparse parser = argparse.ArgumentParser(description='Process some integers.') parser.add_argument('-d', '--debug', dest='debug', action='store_true', help='debug: show what would be sent') - args = parser.parse_args() hostname = socket.gethostname() @@ -17,7 +16,6 @@ ip = socket.gethostbyname(hostname) API_ENDPOINT = "http://192.168.0.140:5000/register" - def get_ip(): s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) try: @@ -42,7 +40,7 @@ elif platform.system() == "Linux": else: raise ValueError -if not fqdn.endswith(".liebchen.fkp"): +if not "." in fqdn: fqdn += ".liebchen.fkp" data = { diff --git a/liebchen.yml b/liebchen.yml index 0b95193..2247f53 100644 --- a/liebchen.yml +++ b/liebchen.yml @@ -41,11 +41,13 @@ apt: name: bacula-fd default_release: jammy-proposed + - name: Install script for bacula-fd configuration copy: src: bacula-conf.py dest: /usr/local/bin/bacula-conf.py mode: 0700 + - name: run configuration for bacula-fd command: /usr/local/bin/bacula-conf.py - name: Restart service bacula-fd