From e8c0d70870c7e98b00ffec3a0443c867d4fd27fe Mon Sep 17 00:00:00 2001 From: 0xMRTT <0xMRTT@proton.me> Date: Thu, 8 Jun 2023 19:33:59 +0200 Subject: [PATCH] feat: add setup --- README.md | 6 ++++++ matrixai.service | 7 +++++++ run.sh | 6 ++++++ 3 files changed, 19 insertions(+) create mode 100644 matrixai.service create mode 100755 run.sh diff --git a/README.md b/README.md index e69de29..e99eb14 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,6 @@ +## Setup + +- Install poetry +- Copy `matrixai.service` to `~/.local/share/systemd/user/` +- Customize `run.sh` with your settings +- Fix the path to `run.sh` in the service file \ No newline at end of file diff --git a/matrixai.service b/matrixai.service new file mode 100644 index 0000000..69ec63f --- /dev/null +++ b/matrixai.service @@ -0,0 +1,7 @@ +[Unit] +Description=Matrix AI +After=multi-user.target[Service] +Type=simple +Restart=always +ExecStart=/usr/bin/python3 /home/0xmrtt/matrixai/run.sh +WantedBy=multi-user.target \ No newline at end of file diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..736fbac --- /dev/null +++ b/run.sh @@ -0,0 +1,6 @@ +cd /home/0xmrtt/matrixai +poetry install + +export MATRIX_PASSWORD="a secret password" + +poetry run python matrixai/__init__.py