HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //lib/systemd/system/ubuntu-advantage.service
# This service runs on GCP and Azure to enable auto-attaching to Ubuntu Pro
# services when an Ubuntu Pro license is added to a machine.
# It also serves as the retry service if an auto-attach fails and will
# retry for up to one month after the failed attempt.
# If you are uninterested in Ubuntu Pro services, then you can safely
# stop and disable this service:
# sudo systemctl stop ubuntu-advantage.service
# sudo systemctl disable ubuntu-advantage.service

[Unit]
Description=Ubuntu Pro Background Auto Attach
Documentation=man:ubuntu-advantage https://ubuntu.com/advantage
After=network.target network-online.target systemd-networkd.service ua-auto-attach.service cloud-config.service ubuntu-advantage-cloud-id-shim.service

# Only run if not already attached
ConditionPathExists=!/var/lib/ubuntu-advantage/private/machine-token.json

# This service has two modes:
# 1. Detect possible in-place upgrade to pro - on GCP and Azure
# 2. auto-attach retry mode - only if ua-auto-attach.service fails
# The following conditions correspond to those two modes.
ConditionPathExists=|/run/cloud-init/cloud-id-gce
ConditionPathExists=|/run/cloud-init/cloud-id-azure
ConditionPathExists=|/run/ubuntu-advantage/flags/auto-attach-failed

[Service]
ExecStart=/usr/bin/python3 /usr/lib/ubuntu-advantage/daemon.py
WorkingDirectory=/var/lib/ubuntu-advantage/

[Install]
WantedBy=multi-user.target