Created
May 11, 2021 00:31
-
-
Save EmperorPenguin18/4b25dbe772f6d4a4dca09373eeaa330b to your computer and use it in GitHub Desktop.
Adds my ytrefresh script to cron
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
#!/bin/sh | |
if [ "$(id -u)" -ne 0 ]; then | |
echo "This script must be run as root" | |
exit 1 | |
fi | |
USER=$(ls /home) | |
CHANNEL="$(echo $@ | awk -F '/' '{print $NF}')" | |
echo 0 * * * * $USER /home/$USER/.config/scripts/ytrefresh "$CHANNEL" >> /etc/cron.d/youtube | |
systemctl restart cronie |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment