From 5298452fa773da0657a1d23dfda9e02857f420b6 Mon Sep 17 00:00:00 2001 From: Jimmy Zelinskie Date: Fri, 17 Jun 2016 16:03:40 -0400 Subject: [PATCH] builder cloudconfig: shutdown server after 3 hours (#1554) --- buildman/templates/cloudconfig.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/buildman/templates/cloudconfig.yaml b/buildman/templates/cloudconfig.yaml index 18c0732ef..bee09a67a 100644 --- a/buildman/templates/cloudconfig.yaml +++ b/buildman/templates/cloudconfig.yaml @@ -77,3 +77,12 @@ coreos: Where=/var/lib/docker Type=btrfs Options=loop,discard + - name: machine-lifetime.service + command: start + enable: yes + content: | + [Unit] + Description=Machine Lifetime Service + [Service] + Type=oneshot + ExecStart=/bin/sh -xc "/bin/sleep 10800; /usr/bin/systemctl --no-block poweroff"