# Example: adapt User, WorkingDirectory, EnvironmentFile and ExecStart. # The oswork user and paths must exist before installing the unit. [Unit] Description=OSWork restricted training bot After=network-online.target Wants=network-online.target StartLimitIntervalSec=300 StartLimitBurst=5 [Service] Type=simple User=oswork WorkingDirectory=/home/oswork/projetos/oswork/materiais/bot EnvironmentFile=/home/oswork/projetos/oswork/materiais/bot/.env ExecStart=/usr/bin/python3 /home/oswork/projetos/oswork/materiais/bot/bot.py Restart=on-failure RestartSec=15 NoNewPrivileges=true PrivateTmp=true ProtectSystem=strict ProtectHome=read-only [Install] WantedBy=multi-user.target