diff --git a/systemd/plenumbot.service b/systemd/plenumbot.service new file mode 100644 index 0000000..d1129c5 --- /dev/null +++ b/systemd/plenumbot.service @@ -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 + diff --git a/systemd/plenumbot.timer b/systemd/plenumbot.timer new file mode 100644 index 0000000..363be0f --- /dev/null +++ b/systemd/plenumbot.timer @@ -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 \ No newline at end of file diff --git a/tools/install_dependencies_ubuntu.sh b/tools/install_dependencies_ubuntu.sh new file mode 100644 index 0000000..f2c65e5 --- /dev/null +++ b/tools/install_dependencies_ubuntu.sh @@ -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