瀏覽代碼

Fix Malformed UTF-8 Character in Mailsync fixes #322 (#323)

* line 5 defined the variable DBUS_SESSION_BUS_ADDRESS before exporting it in the next line

* change the pgrep line

* Revert "Update domains.csv (#321)"

This reverts commit a92c01e131.

* Revert "Revert "Update domains.csv (#321)""

This reverts commit af0c0826b9.

* Revert "line 5 defined the variable DBUS_SESSION_BUS_ADDRESS before exporting it in the next line"

This reverts commit ca64a6ae56.

* Revert "Revert "line 5 defined the variable DBUS_SESSION_BUS_ADDRESS before exporting it in the next line""

This reverts commit 4304eb731c.
tags/v3.1
Wayne Reeves 5 年之前
committed by Luke Smith
父節點
當前提交
ff57bd2eb7
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. +3
    -2
      bin/mailsync

+ 3
- 2
bin/mailsync 查看文件

@@ -2,12 +2,13 @@
# Sync mail and give notification if there is new mail.

export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus
export DBUS_SESSION_BUS_ADDRESS
export DISPLAY=:0.0
[ -d "$HOME/.local/share/password-store" ] && export PASSWORD_STORE_DIR="$HOME/.local/share/password-store"

# Run only if user logged in (prevent cron errors)
pgrep -u "$USER" >/dev/null || { echo "$USER not logged in; sync will not run."; exit ;}
pgrep -u "${USER:=$LOGNAME}" >/dev/null || { echo "$USER not logged in; sync will not run."; exit ;}
# Run only if not already running in other instance
pgrep -x mbsync >/dev/null && { echo "mbsync is already running." ; exit ;}



Loading…
取消
儲存