Last active
July 17, 2023 00:51
-
-
Save gdiaz384/343e3704dc1f955e6bd904d384566cb4 to your computer and use it in GitHub Desktop.
crontab -e example
This file contains 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
# SSH daemon | |
@reboot /usr/sbin/sshd -p 22 | |
# HTTP file server | |
@reboot sudo /usr/bin/nodejs /usr/local/bin/http-server /home/pi/Public --no-dotfiles -p 8080 | |
@daily sudo pkill node && sudo /usr/bin/nodejs /usr/local/bin/http-server /home/pi/Public --no-dotfiles -p 8080 | |
# TLS proxy and authentication on port 443 | |
@reboot /etc/init.d/stunnel4 start | |
@daily sudo /home/pi/stunnel/certbot-auto renew --allow-subset-of-names --standalone --rsa-key-size 4096 --preferred-challenges tls-sni-01 --no-self-upgrade --non-interactive --agree-tos --quiet --email [email protected] --pre-hook "sudo service stunnel4 stop" --post-hook "sudo service stunnel4 start" | |
# Alternative authentication on HTTP port 80 | |
@daily /usr/bin/certbot renew --allow-subset-of-names --standalone --rsa-key-size 4096 --preferred-challenges http-01 --no-self-upgrade --non-interactive --quiet --agree-tos --email [email protected] | |
# Start seedbox software | |
@reboot cd /home/pi/ && /home/pi/start-qbittorrent.sh | |
#"/home/pi/start-qbittorrent.sh" contents: | |
##!/bin/sh | |
#cd /home/pi/ | |
#sleep 60 | |
##If qbittorrent is already running, do nothing. Otherwise, start it on Display0. | |
#[ `pgrep qbittorrent` ] && echo runningAlready || DISPLAY=:0 /usr/bin/qbittorrent & | |
# IRC bot | |
@reboot cd /home/pi/iroffer && /home/pi/iroffer/./iroffer -b /home/pi/iroffer/mybot.config | |
# Maintenance | |
@monthly sudo /sbin/shutdown -r now | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment