瀏覽代碼

only sync if user logged in

tags/v3.1
Luke Smith 5 年之前
父節點
當前提交
be2c4c5baa
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 4C50B54A911F6252
共有 1 個檔案被更改,包括 3 行新增0 行删除
  1. +3
    -0
      bin/mailsync

+ 3
- 0
bin/mailsync 查看文件

@@ -1,6 +1,9 @@
#!/usr/bin/env sh
# Sync mail and give notification if there is new mail.

# Run only if user logged in (prevent cron errors)
w | grep "^$USER\W" >/dev/null || exit

# Checks for internet connection and set notification script.
ping -q -c 1 1.1.1.1 > /dev/null || exit
command -v notify-send >/dev/null || echo "Note that \`libnotify\` or \`libnotify-send\` should be installed for pop-up mail notifications with this script."


Loading…
取消
儲存