Skip to content

Instantly share code, notes, and snippets.

@squaresmile
Last active October 3, 2021 15:34
Show Gist options
  • Select an option

  • Save squaresmile/7395dec4cbcaec55b939464f9e2d8df2 to your computer and use it in GitHub Desktop.

Select an option

Save squaresmile/7395dec4cbcaec55b939464f9e2d8df2 to your computer and use it in GitHub Desktop.
Script and systemd service to record twitch stream automatically
[Unit]
Description=Save Twitch stream
After=network.target
[Service]
WorkingDirectory=/home/squaresmile/twitch_streams
ExecStart=/bin/bash /home/squaresmile/twitch_streams/save_stream.sh
User=cereal
[Install]
WantedBy=multi-user.target
[Unit]
Description=Check and save stream
[Timer]
OnCalendar=*-*-* *:00/15:00
RandomizedDelaySec=60
AccuracySec=1us
[Install]
WantedBy=timers.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment