From aad5b725c9f61dec3e1881fede557566db376f0d Mon Sep 17 00:00:00 2001 From: tiyn Date: Thu, 14 Jul 2022 14:56:34 +0200 Subject: [PATCH] systemd: start service at boot added --- wiki/linux/systemd.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 wiki/linux/systemd.md diff --git a/wiki/linux/systemd.md b/wiki/linux/systemd.md new file mode 100644 index 0000000..0d2ee5c --- /dev/null +++ b/wiki/linux/systemd.md @@ -0,0 +1,30 @@ +# SystemD + +SystemD is a software suit for system components for Linux systems. +It is mainly used for service configuration. + +## Run command on boot + +To run a command (in this case `/bin/bash /root/run.sh`) create the following +file at `/etc/systemd/system/` with a name ending on `.service`. +In this case it is called `unturned.service`. + +```txt +[Unit] +Description=Description of the service + +[Install] +WantedBy=multi-user.target + +[Service] +ExecStart=/bin/bash /root/run.sh +Type=simple +``` + +For [Proxmox](./proxmox.md) you can add the following line under the `[Unit]` +section to make sure the service is started after Proxmox has finished +initializing. + +```txt +After=pve-guests.service +```