From 201bbd7ed5ef1624887f0ae91949946c7221fa2e Mon Sep 17 00:00:00 2001 From: Keroosha Date: Thu, 13 Apr 2023 21:40:51 +0300 Subject: [PATCH] unit file --- .infrastructure/silencer-bot.service | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .infrastructure/silencer-bot.service diff --git a/.infrastructure/silencer-bot.service b/.infrastructure/silencer-bot.service new file mode 100644 index 0000000..76416bf --- /dev/null +++ b/.infrastructure/silencer-bot.service @@ -0,0 +1,22 @@ +[Unit] +# A short human readable title of the unit +Description= Keroosha.SilencerBot Prod +# A list of units whose activations will occur before this unit starts. +After=network.target + +[Service] +# Configures the process start-up type for this service unit, one of: +# simple - The process defined in ExecStart= will stay in the foreground while the unit is activated. +# forking - The process defined in ExecStart= will fork a background process and exit right away. +# oneshot - The process will exit right away, use with RemainAfterExit= to ensure the serice is marked as active. +# Consult the documentantion for types (https://www.freedesktop.org/software/systemd/man/systemd.service.html#Type=) other options. +Type=simple +# Command with arguments to invoke when the unit is activated. +ExecStart=/opt/apps/Keroosha.SilncerBot/app/Keroosha.SilencerBot +# Configures under what conditions the unit will be restarted. +Restart=on-failure +CPUQuota=15% + +[Install] +# A list of units who when activated will try and activate this unit +WantedBy=multi-user.target