__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
import logging
import os
from subprocess import TimeoutExpired
from uaclient import exceptions, system, util
from uaclient.config import UAConfig
from uaclient.defaults import DEFAULT_DATA_DIR
LOG = logging.getLogger(util.replace_top_level_logger_name(__name__))
AUTO_ATTACH_STATUS_MOTD_FILE = os.path.join(
DEFAULT_DATA_DIR, "messages", "motd-auto-attach-status"
)
def start():
try:
system.subp(
["systemctl", "start", "ubuntu-advantage.service"], timeout=2.0
)
except (exceptions.ProcessExecutionError, TimeoutExpired) as e:
LOG.warning(e, exc_info=e)
def stop():
try:
system.subp(
["systemctl", "stop", "ubuntu-advantage.service"], timeout=2.0
)
except (exceptions.ProcessExecutionError, TimeoutExpired) as e:
LOG.warning(e, exc_info=e)
def cleanup(cfg: UAConfig):
from uaclient.daemon import retry_auto_attach
retry_auto_attach.cleanup(cfg)
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| __pycache__ | Folder | 0755 |
|
|
| __init__.py | File | 955 B | 0644 |
|
| poll_for_pro_license.py | File | 3.74 KB | 0644 |
|
| retry_auto_attach.py | File | 6.33 KB | 0644 |
|