Skip to content

Commit

Permalink
fix: do not fail is not enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
gsanchietti committed Jan 22, 2025
1 parent d857017 commit 99446ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions imageroot/actions/get-facts/50facts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import subprocess

info = {
"retention_days": int(os.getenv('LOKI_RETENTION_PERIOD')),
"cloud_log_manager": subprocess.check_output(['systemctl', '--user', 'is-enabled', 'cloud-log-manager-forwarder']).strip(),
"syslog": subprocess.check_output(['systemctl', '--user', 'is-enabled', 'syslog-forwarder']).strip(),
"cloud_log_manager": subprocess.run(['systemctl', '--user', 'is-enabled', 'cloud-log-manager-forwarder'], check=False, capture_output=True).returncode == 0,
"syslog": subprocess.run(['systemctl', '--user', 'is-enabled', 'syslog-forwarder'], check=False, capture_output=True).returncode == 0,
}
json.dump(info, sys.stdout)

0 comments on commit 99446ec

Please sign in to comment.