mirror of
https://github.com/Threnklyn/BitDay-Linux.git
synced 2026-05-18 20:13:27 +02:00
cron fix
cron got no display environment
This commit is contained in:
+2
-2
@@ -88,7 +88,7 @@ echo
|
||||
read -p "Create a cron job every hour? [y/n] " yn
|
||||
case $yn in
|
||||
[Yy]*)
|
||||
line="0 * * * * ${pwd}/update.sh"
|
||||
line="0 * * * * export DISPLAY=:0; ${pwd}/update.sh"
|
||||
if ! crontab -l | grep -Fxq "$line"; then
|
||||
(crontab -l ; echo "$line") | crontab -
|
||||
else
|
||||
@@ -101,7 +101,7 @@ echo
|
||||
read -p "Create a cron job after each reboot? [y/n] " yn
|
||||
case $yn in
|
||||
[Yy]*)
|
||||
line="@reboot ${pwd}/update.sh"
|
||||
line="@reboot export DISPLAY=:0; ${pwd}/update.sh"
|
||||
if ! crontab -l | grep -Fxq "$line"; then
|
||||
(crontab -l ; echo "$line") | crontab -
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user