diff options
author | Luke Smith <luke@lukesmith.xyz> | 2018-03-17 22:00:44 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-17 22:00:44 -0700 |
commit | 920ee096266343e65de7e4d45aae68f6f352421e (patch) | |
tree | ab782fb0dd4f62862829480d4b20f5ef8601582f /mutt-wizard.sh | |
parent | 7dcf2cca46a5b5702a2975e0fe1491acd33632e8 (diff) | |
parent | 044ae667f696441eb636e192ed165c62b2abe2ed (diff) |
Merge pull request #42 from meain/patch-2
Use `$HOME` instead of `/home/$(whoami)`
Diffstat (limited to 'mutt-wizard.sh')
-rwxr-xr-x | mutt-wizard.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mutt-wizard.sh b/mutt-wizard.sh index 076261a..295470c 100755 --- a/mutt-wizard.sh +++ b/mutt-wizard.sh @@ -19,7 +19,7 @@ chooseSync() { (crontab -l && testSync) || dialog --msgbox "No cronjob manager d testSync() { (crontab -l | grep .config/mutt/etc/mailsync && removeSync) || addSync ;} addSync() { min=$(dialog --inputbox "How many minutes should be between mail syncs?" 8 60 3>&1 1>&2 2>&3 3>&-) - (crontab -l; echo "*/$min * * * * /home/$(whoami)/.config/mutt/etc/mailsync.sh") | crontab - && + (crontab -l; echo "*/$min * * * * $HOME/.config/mutt/etc/mailsync.sh") | crontab - && dialog --msgbox "Cronjob successfully added. Remember you may need to restart or tell systemd/etc. to start your cron manager for this to take effect." 7 60 ;} removeSync() { ((crontab -l | sed -e '/.config\/mutt\/etc\/mailsync/d') | crontab - >/dev/null) && dialog --msgbox "Cronjob successfully removed. To reactivate, select this option again." 6 60 ;} |