diff --git a/README.md b/README.md index 2f8436a..2026fcc 100644 --- a/README.md +++ b/README.md @@ -14,11 +14,12 @@ This is a simple script for receiving [Gotify](https://github.com/gotify/server) 1. Clone this repo git clone https://github.com/ztpnk/gotify-dunst && cd gotify-dunst -2. Install python requirements +2. Create a python venv `python3 -m venv .env` +3. Install python requirements ./.env/bin/pip install -r requirements.txt -3. Change the domain and token in main.py -4. Test if it runs +4. Change the domain and token in main.py +5. Test if it runs ./.env/bin/python main.py -5. Customize the gotify-dunst.service and copy it to /etc/systemd/system -6. Start and enable the Systemd Unit +6. Customize the gotify-dunst.service and copy it to /etc/systemd/system +7. Start and enable the Systemd Unit sudo systemd start gotify-dunst && sudo systemd enable gotify-dunst diff --git a/main.py b/main.py index b9bd7a9..ae71b0e 100644 --- a/main.py +++ b/main.py @@ -8,7 +8,9 @@ domain = "push.example.com" token = "z2Uny92TZBzsukg" home = os.path.expanduser('~') -path = "{}/.cache/gotify-dust".format(home) +path = "{}/.cache/gotify-dunst".format(home) +if not os.path.isdir(path): + os.mkdir(path) def get_picture(appid): imgPath = "{}/{}.jpg".format(path, appid)