⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.112
Server IP:
65.21.180.239
Server:
Linux gowhm.eplangoweb.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.0.30
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
apport
/
package-hooks
/
View File Name :
source_ubuntu-advantage-tools.py
import os import tempfile from apport.hookutils import attach_file_if_exists from uaclient import defaults from uaclient.actions import collect_logs from uaclient.config import UAConfig def add_info(report, ui=None): report["LaunchpadPrivate"] = "1" report["LaunchpadSubscribe"] = "ua-client" cfg = UAConfig() with tempfile.TemporaryDirectory() as output_dir: collect_logs(cfg, output_dir) auto_include_log_files = { "cloud-id.txt", "cloud-id.txt-error", "ua-status.json", "ua-status.json-error", "livepatch-status.txt", "livepatch-status.txt-error", os.path.basename(cfg.cfg_path), os.path.basename(cfg.log_file), os.path.basename(cfg.timer_log_file), os.path.basename(cfg.daemon_log_file), os.path.basename(cfg.data_path("jobs-status")), os.path.basename(defaults.CONFIG_DEFAULTS["log_file"]), os.path.basename(defaults.CONFIG_DEFAULTS["timer_log_file"]), os.path.basename(defaults.CONFIG_DEFAULTS["daemon_log_file"]), } for f in auto_include_log_files: attach_file_if_exists(report, os.path.join(output_dir, f), key=f)