Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nuri-it/systemd-service
Create a systemd service to run a command at startup
https://github.com/nuri-it/systemd-service
Last synced: 10 days ago
JSON representation
Create a systemd service to run a command at startup
- Host: GitHub
- URL: https://github.com/nuri-it/systemd-service
- Owner: nuri-it
- License: gpl-3.0
- Created: 2022-03-24T08:42:25.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-25T13:33:21.000Z (almost 3 years ago)
- Last Synced: 2024-11-10T12:37:49.709Z (2 months ago)
- Language: Shell
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# systemd-service
Create a systemd service to run a command at startup### Create service
First you need to create a file in the systemd folder
```
sudo nano /etc/systemd/system/goodcommand.service
```
Now paste the following into it:
```
[Unit]Description=a good description
[Service]ExecStart=/path/to/command/or/script
[Install]
WantedBy=multi-user.target
```
Reload Systemd
```
sudo systemctl daemon-reload
```
Now enable the service
```
sudo systemctl enable goodcommand.service
```
Congrats!#gg