Browse Source

cronjob: get id from active user

tags/v3.1
yusufaktepe 5 years ago
parent
commit
3f15a4d4c6
No known key found for this signature in database GPG Key ID: 3D80A65C4449A9EF
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      bin/mw

+ 1
- 1
bin/mw View File

@@ -244,7 +244,7 @@ choosecron() { ! pgrep -x cron\|crond >/dev/null && echo "No cron manager runnin
read -r minnum
printf "\033[0m"
done
(crontab -l; echo "*/$minnum * * * * export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus; export DISPLAY=:0; . \$HOME/.profile; $(type mailsync | cut -d' ' -f3)") | crontab - &&
(crontab -l; echo "*/$minnum * * * * export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus; export DISPLAY=:0; . \$HOME/.profile; $(type mailsync | cut -d' ' -f3)") | crontab - &&
echo "Cronjob added. Mail will sync every $minnum minutes. Be sure you have your cron manager running."
fi ;}



Loading…
Cancel
Save