Skip to content

Instantly share code, notes, and snippets.

@travier
Created February 8, 2024 17:05
Show Gist options
  • Save travier/b730d9f29240f071fdf263ddcaa68f3a to your computer and use it in GitHub Desktop.
Save travier/b730d9f29240f071fdf263ddcaa68f3a to your computer and use it in GitHub Desktop.
Butane immediate shutdown
variant: fcos
version: 1.5.0
systemd:
units:
- name: shutdown.timer
enabled: true
contents: |
[Unit]
Description=Immediately shutdown after 1m
[Timer]
OnBootSec=2min
[Install]
WantedBy=multi-user.target
- name: shutdown.service
enabled: false
contents: |
[Unit]
Description=Immediately shutdown after 1m
[Service]
ExecStart=systemctl poweroff --no-block
[Install]
WantedBy=multi-user.target
{
"ignition": {
"version": "3.4.0"
},
"systemd": {
"units": [
{
"contents": "[Unit]\nDescription=Immediately shutdown after 1m\n[Timer]\nOnBootSec=2min\n[Install]\nWantedBy=multi-user.target\n",
"enabled": true,
"name": "shutdown.timer"
},
{
"contents": "[Unit]\nDescription=Immediately shutdown after 1m\n[Service]\nExecStart=systemctl poweroff --no-block\n[Install]\nWantedBy=multi-user.target\n",
"enabled": false,
"name": "shutdown.service"
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment