diff --git a/install.sh b/install.sh index da1be0f..e7ab551 100644 --- a/install.sh +++ b/install.sh @@ -88,6 +88,27 @@ if ! curl -sSL -o /usr/local/bin/tinkerbell https://github.com/tinkerbell/tinker exit 1 else chmod +x /usr/local/bin/tinkerbell + + cat < /etc/systemd/system/tinkerbell.service +[Unit] +Description=Tinkerbell is a bare metal provisioning engine. +After=docker.service + +[Service] +User=root +WorkingDirectory=/etc/tinkerbell +LimitNOFILE=4096 +PIDFile=/var/run/tinkerbell/daemon.pid +ExecStart=/usr/local/bin/tinkerbell +Restart=on-failure +StartLimitInterval=600 + +[Install] +WantedBy=multi-user.target +EOT + +systemctl daemon-reload > /dev/null 2>&1 + fi }