Skip to content

Commit

Permalink
Add cron
Browse files Browse the repository at this point in the history
  • Loading branch information
raptor235 committed Aug 1, 2024
1 parent 66567ff commit e812500
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions util/install_fpd_shell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,21 @@ install_fpd_shell() {
set_oh_my_zsh_theme_and_plugins
"
fi

# Add cron job to update FPD Shell daily
crontab -l > mycron
if ! grep -q "~/.fpd-shell/update.sh" mycron; then
echo "0 0 * * * ~/.fpd-shell/update.sh" >> mycron
crontab mycron || echo "Could not update crontab. Please add the following line to your crontab manually:
0 0 * * * ~/.fpd-shell/update.sh"
fi
rm mycron


}


# Add cron job to update FPD Shell daily
(crontab -l ; echo "0 0 * * * ~/.fpd-shell/update.sh") | crontab -

echo "FPD Shell installed and daily update scheduled!"

0 comments on commit e812500

Please sign in to comment.