This repository was archived by the owner on Nov 14, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
[Fix] Run startup script at boot #10
Copy link
Copy link
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or request
Description
sudo crontab -e* * * * * env > /tmp/cronenv- Save crontab
:wq - Wait until file /tmp/cronenv exists
sudo crontab -e- Comment previous line using #:
#* * * * * env > /tmp/cronenv - Add new line
@reboot /Users/<your_username>/Scripts/startup.sh >/tmp/cron_stdout.log 2>/tmp/cron_stderr.log - Save crontab
:wq - Run shell simulating crontab environment:
sudo env - `cat /tmp/cronenv` /bin/sh - Create startup script file
vim /Users/<your_username>/Scripts/startup.sh - Edit your script as you want as save it:
:wq - Give execution permissions to script:
chmod +x /Users/<your_username>/Scripts/startup.sh - Run your script to test if it works:
/Users/<your_username>/Scripts/startup.sh - Reboot and check if it works:
more /tmp/cron_std*.log
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or request