Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The following systemunit is used on s1mittag can be used on  Ubuntu to control t5memory:

Code Block
languagebash
title/etc/systemd/system/t5memory.service
linenumberstrue
[Unit]
Description=T5Memory
After=network-online.target
Wants=network-online.target systemd-networkd-wait-online.service

StartLimitIntervalSec=60
StartLimitBurst=5

[Service]
Restart=on-failure
RestartSec=5s

ExecStart=/home/translate5tmservice/t5memory-0.2.0-Linux/bin/t5memory
WorkingDirectory=/home/translate5tmservice/

User=translate5tmservice

ExecStopPost=/bin/bash /home/translate5tmservice/onRestartService.sh

StandardOutput=file:/home/translate5tmservice/log/stdout.log
StandardError=file:/home/translate5tmservice/log/stderr.log

[Install]
WantedBy=multi-user.target

...

If the service is stopped, the logs are renamed to the current date and an email is send to support@translate5 mail@mail.net (see onRestartService.sh)