Skip to content

Instantly share code, notes, and snippets.

@0az
Created April 24, 2020 05:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 0az/8e35bc2c43f8ab475292edcf88b2eed1 to your computer and use it in GitHub Desktop.
Save 0az/8e35bc2c43f8ab475292edcf88b2eed1 to your computer and use it in GitHub Desktop.
sudo tee /etc/systemd/system/restart-chromium.service <<EOF
[Unit]
Description=Restart Chrome
[Service]
Type=oneshot
ExecStart=/bin/sh -c 'pkill -f chromium-browser && /usr/bin/chromium-browser > /dev/null'
EOF
sudo tee /etc/systemd/system/restart-chromium.timer <<EOF
[Unit]
Description=Run restart-chrome.service every day at 3 AM
[Timer]
OnCalendar=*-*-* 3:00:00
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment