Skip to content

Commit

Permalink
Merge pull request #107 from flatcar/tormath1/em
Browse files Browse the repository at this point in the history
systemd: add packet-phone-home.service
  • Loading branch information
tormath1 committed Oct 4, 2023
2 parents 22c07b1 + 5ce3d1c commit c01a337
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
20 changes: 20 additions & 0 deletions systemd/system/packet-phone-home.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[Unit]
ConditionKernelCommandLine=|ignition.platform.id=packet
ConditionKernelCommandLine=|flatcar.oem.id=packet
ConditionKernelCommandLine=|coreos.oem.id=packet

Description=Report Success to Packet
ConditionFirstBoot=true
Wants=coreos-metadata.service
After=coreos-metadata.service

[Service]
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=/run/metadata/flatcar
ExecStart=/usr/bin/curl -fsSL --header "Content-Type: application/json" --request POST "${COREOS_PACKET_PHONE_HOME_URL}"
Restart=on-failure
RestartSec=2

[Install]
WantedBy=multi-user.target
4 changes: 4 additions & 0 deletions systemd/system/sshkeys.service
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ ConditionKernelCommandLine=|ignition.platform.id=gce
ConditionKernelCommandLine=|flatcar.oem.id=gce
ConditionKernelCommandLine=|coreos.oem.id=gce

ConditionKernelCommandLine=|ignition.platform.id=openstack
ConditionKernelCommandLine=|flatcar.oem.id=openstack
ConditionKernelCommandLine=|coreos.oem.id=openstack

[Service]
Type=oneshot
RemainAfterExit=yes
Expand Down

0 comments on commit c01a337

Please sign in to comment.