Skip to content

Instantly share code, notes, and snippets.

@argahsuknesib
Created June 21, 2022 22:43
Show Gist options
  • Save argahsuknesib/cdbe3b3811a5e42f55b8e4be108af635 to your computer and use it in GitHub Desktop.
Save argahsuknesib/cdbe3b3811a5e42f55b8e4be108af635 to your computer and use it in GitHub Desktop.
A service to restart the react website when it stops.
[Unit]
Description=Disability Wikibase Demo Website.
After=network.target
StartLimitIntervalSec=0[Service]
Type=simple
Restart=always // check the exit status if it is 0 or not, and use on-failure if restart code is not 0
RestartSec=1
User=root
ExecStart=npm start
[Install]
WantedBy=multi-user.target
// start with systemctl start un-demo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment