Created
October 1, 2022 12:14
-
-
Save 0187773933/252d94a87dfaca453448c3aa82ad5eff to your computer and use it in GitHub Desktop.
Crontab Runas User
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 22 * * * /usr/local/bin/restartMotionServerWithDelay.sh | |
01 10 * * * systemctl stop motion-script.service | |
# @reboot /usr/local/bin/restartMotionServerWithDelay.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
/bin/bash -l -c 'su pi -c "/home/pi/.nvm/versions/node/v8.9.4/bin/pm2 restart all"' | |
sleep 10 | |
sudo systemctl restart motion-script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment