- Snippet Path
systemd service
- Authors
- ← Back to snippet list
- Name
- Aryan Ebrahimpour
- GitHub
- @avestura
- Snippet
Create service file
Path:
/lib/systemd/system/{myservicename}.service
Service content
toml
[Unit]
Description=My Service
[Service]
Type=simple
User=ubuntu
ExecStart=yarn --cwd /home/folder/ start
Restart=on-failure
[Install]
WantedBy=multi-user.target
Restart service
bash
sudo systemctl restart osapiexpose.service