summaryrefslogtreecommitdiffstats
path: root/bin/hush/update-mail
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2018-11-01 03:30:15 -0400
committerJesse Luehrs <doy@tozt.net>2018-11-01 03:30:15 -0400
commit718d26d32cf008454ad73ebd6922d9a49c58c603 (patch)
tree5c8fd848849db46fd3efc77b4e36266b2ad6bfdf /bin/hush/update-mail
parent17ed76ae77d91787504978cf11280c856ae7d9ca (diff)
downloadconf-718d26d32cf008454ad73ebd6922d9a49c58c603.tar.gz
conf-718d26d32cf008454ad73ebd6922d9a49c58c603.zip
better name
Diffstat (limited to 'bin/hush/update-mail')
-rwxr-xr-xbin/hush/update-mail9
1 files changed, 9 insertions, 0 deletions
diff --git a/bin/hush/update-mail b/bin/hush/update-mail
new file mode 100755
index 0000000..b909d9f
--- /dev/null
+++ b/bin/hush/update-mail
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+stat=$(svstat "$HOME/.services/enabled/offlineimap")
+if echo $stat | grep -q "offlineimap: down"; then
+ echo "no offlineimap process running" >&2
+ exit 1
+fi
+pid=$(echo $stat | sed 's/.*offlineimap: up (pid \([[:digit:]]\+\)).*/\1/')
+kill -USR1 $pid