From f4e4a591b2a834042e154396657425534e0ef321 Mon Sep 17 00:00:00 2001 From: Alexander Bocken Date: Sun, 3 Jan 2021 11:29:35 +0100 Subject: [PATCH] pass works in cronjob --- .local/bin/tools/ripper | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.local/bin/tools/ripper b/.local/bin/tools/ripper index c2f9a71..a3f47e8 100755 --- a/.local/bin/tools/ripper +++ b/.local/bin/tools/ripper @@ -26,6 +26,11 @@ BLACKLIST="${XDG_VIDEOS_DIR:-$HOME/Videos}/.blacklist" DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus export DBUS_SESSION_BUS_ADDRESS export DISPLAY=:0.0 +XDG_DATA_HOME=/home/alex/.local/share +# Required to have pass work if run as cronjob +export PASSWORD_STORE_GPG_OPTS="--homedir=$XDG_DATA_HOME/gnupg" +export GTK2_RC_FILES="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-2.0/gtkrc-2.0" +[ -d "$HOME/.local/share/password-store" ] && export PASSWORD_STORE_DIR="$HOME/.local/share/password-store" APIKEY="$(pass show Misc/Youtube\ Data\ API\ v3 | head -n1 )" LEGACYMODE=$1 #set to anything nonzero to ignore YT API