centralize dbus authority
This commit is contained in:
parent
ffd27dd111
commit
04e2034121
3
emails
3
emails
@ -1,5 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
# We setup xauthority file to display stuff
|
||||
auth="$(xauth extract - "$DISPLAY" | base64)"
|
||||
exec sudo -u emails sh -c "echo -n '$auth' | base64 -d > ~/.Xauthority && . ~/.bashrc && cd ~/attachements && exec neomutt"
|
||||
exec sudo -u emails sh -c ". ~/.bashrc && cd ~/attachements && exec neomutt"
|
||||
|
27
startsync
27
startsync
@ -6,21 +6,28 @@
|
||||
#qbittorrent &>/dev/null &
|
||||
#vdirsyncer sync
|
||||
|
||||
if [ "$(host -t a wg.rezine.org 9.9.9.9 2>/dev/null | grep -o ' has address .*')" != "$(host -t a wg.rezine.org 2>/dev/null | grep -o ' has address .*')" ] ; then
|
||||
echo "-------------------------"
|
||||
echo ""
|
||||
echo "wg.rezine.org seems to have changed, you mail need to update your /etc/dnsmasq.conf"
|
||||
notify-send "Consistency check" "wg.rezine.org seems to have changed, you mail need to update your /etc/dnsmasq.conf"
|
||||
echo ""
|
||||
echo "-------------------------"
|
||||
sleep 3
|
||||
fi
|
||||
#if [ "$(host -t a wg.rezine.org 9.9.9.9 2>/dev/null | grep -o ' has address .*')" != "$(host -t a wg.rezine.org 2>/dev/null | grep -o ' has address .*')" ] ; then
|
||||
# echo "-------------------------"
|
||||
# echo ""
|
||||
# echo "wg.rezine.org seems to have changed, you mail need to update your /etc/dnsmasq.conf"
|
||||
# notify-send "Consistency check" "wg.rezine.org seems to have changed, you mail need to update your /etc/dnsmasq.conf"
|
||||
# echo ""
|
||||
# echo "-------------------------"
|
||||
# sleep 3
|
||||
#fi
|
||||
|
||||
|
||||
auth="$(xauth extract - "$DISPLAY" | base64)"
|
||||
sudo -u emails bash <<EOF
|
||||
echo 'Setup xauthority'
|
||||
echo -n '$auth' | base64 -d > ~/.Xauthority
|
||||
|
||||
. ~/.bashrc
|
||||
|
||||
if [ -n "\$(find ~/.mails/collected_addresses.txt -mtime +24)" ] ; then
|
||||
echo 'Rebuild mail addressbook'
|
||||
echo 'Recollect mail addresses'
|
||||
(notmuch address --output sender '*' ; notmuch address --output recipients '*') | grep -vP "<.*[\x00-\x1F\x7F-\xFF].*>" | grep -vP "[\x00-\x1F\x7F-\xFF]\S*@" | grep -vP "@\S*[\x00-\x1F\x7F-\xFF]" | sort -u > ~/.mails/collected_addresses.txt
|
||||
fi
|
||||
birthday_reminder ~/.contacts/bdays/collection-root/dav/4702d4b7-8edd-7b56-ab9c-c11a64d883a3 >/dev/null
|
||||
syncmails
|
||||
EOF
|
||||
|
Loading…
Reference in New Issue
Block a user