new systemd services and install file for ubuntu-server

This commit is contained in:
murmeldin 2025-01-11 01:14:09 +01:00
parent 49ceea6871
commit 6611f239f7
3 changed files with 30 additions and 0 deletions

View file

@ -0,0 +1,9 @@
[Unit]
Description=CCCB Plenum-Bot
After=network-online.target
[Service]
ExecStart=/home/plenum-bot/plenum-bot/target/debug/Plenum-Bot
Type=simple
User=root

10
systemd/plenumbot.timer Normal file
View file

@ -0,0 +1,10 @@
[Unit]
Description=CCCB Plenum-Bot
[Timer]
OnBootSec=5min
# OnUnitActiveSec=5
OnCalendar=*-*-* 06:00:00 Europe/Berlin
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,11 @@
# The plenum bot works when being run on a ubuntu-server
# instance with these commands ran previously.
# For other distros, please adapt these instructions
# so you have the same packages installed as well.
# Optionally, if you don't have rust installed, you should do it here:
# https://www.rust-lang.org/tools/install
sudo apt update
sudo apt install gcc libssl-dev pandoc pkg-config libsqlite3-dev
cargo build --release