You are not logged in.
I have qbittorrent-nox running as a daemon service using systemctl. I access it through the web-ui. I have a post-download script setup that will send me a notification that the download is complete. However, no notification ever comes through. I am running DWM with dunst and have notify-send working on other scripts, just specifically not this one.
Post-download script:
#!/bin/sh
# %N - Torrent Filename $1
# %R - Root filepath $2
# Send notification
notify-send "[NEW]$1"
qbittorrent-nox.service:
[Unit]
Description=qBittorrent Daemon Service
After=network.target
[Service]
User=omer
Group=omer
ExecStart=/usr/bin/qbittorrent-nox
ExecStop=/usr/bin/killall -w qbittorrent-nox
[Install]
WantedBy=multi-user.target
Update: I know the script runs. If I run a different command (i.e. mv), the file is moved successfully. So this is strictly related to notify-send.
Update 2: "systemctl status qbittorrent-nox" shows nothing.
Last edited by omernaveedxyz (2021-02-19 20:24:37)
Offline
You probably have to set the ${DBUS_SESSION_BUS_ADDRESS}, see the Arch Wiki on Cron [0].
Offline
You probably have to set the ${DBUS_SESSION_BUS_ADDRESS}, see the Arch Wiki on Cron [0].
Worked perfectly! Just had to "echo ${DBUS_SESSION_BUS_ADDRESS}" and set that as an environment variable in systemd service.
[Unit]
Description=qBittorrent Daemon Service
After=network.target
[Service]
User=omer
Group=omer
Environment="DBUS_SESSION_BUS_ADDRESS={RESULT OF ECHO DBUS_SESSION_BUS_ADDRESS}"
ExecStart=/usr/bin/qbittorrent-nox
ExecStop=/usr/bin/killall -w qbittorrent-nox
[Install]
WantedBy=multi-user.target
Last edited by omernaveedxyz (2021-02-19 21:38:55)
Offline