adienakhmad revised this gist . Go to revision
1 file changed, 1 insertion, 1 deletion
example.service
| @@ -5,7 +5,7 @@ After=network.target network-online.target | |||
| 5 | 5 | Requires=network-online.target | |
| 6 | 6 | ||
| 7 | 7 | [Service] | |
| 8 | - | ExecStart=/usr/bin/yourdaemon | |
| 8 | + | ExecStart=/usr/local/bin/yourdaemon | |
| 9 | 9 | Type=oneshot | |
| 10 | 10 | Restart=on-failure | |
| 11 | 11 | ||
adienakhmad revised this gist . Go to revision
1 file changed, 3 insertions, 2 deletions
example.service
| @@ -1,10 +1,11 @@ | |||
| 1 | + | # /etc/systemd/system/yourdaemon.service | |
| 1 | 2 | [Unit] | |
| 2 | - | Description=My Daemon Example | |
| 3 | + | Description=Your Daemon Example | |
| 3 | 4 | After=network.target network-online.target | |
| 4 | 5 | Requires=network-online.target | |
| 5 | 6 | ||
| 6 | 7 | [Service] | |
| 7 | - | ExecStart=/usr/bin/mydaemon | |
| 8 | + | ExecStart=/usr/bin/yourdaemon | |
| 8 | 9 | Type=oneshot | |
| 9 | 10 | Restart=on-failure | |
| 10 | 11 | ||
adienakhmad revised this gist . Go to revision
1 file changed, 1 deletion
example.service
| @@ -8,6 +8,5 @@ ExecStart=/usr/bin/mydaemon | |||
| 8 | 8 | Type=oneshot | |
| 9 | 9 | Restart=on-failure | |
| 10 | 10 | ||
| 11 | - | ||
| 12 | 11 | [Install] | |
| 13 | 12 | WantedBy=multi-user.target | |
adienakhmad revised this gist . Go to revision
1 file changed, 3 insertions, 2 deletions
example.service
| @@ -1,9 +1,10 @@ | |||
| 1 | 1 | [Unit] | |
| 2 | 2 | Description=My Daemon Example | |
| 3 | - | After=network.target | |
| 3 | + | After=network.target network-online.target | |
| 4 | + | Requires=network-online.target | |
| 4 | 5 | ||
| 5 | 6 | [Service] | |
| 6 | - | ExecStart=/usr/local/bin/mydaemon | |
| 7 | + | ExecStart=/usr/bin/mydaemon | |
| 7 | 8 | Type=oneshot | |
| 8 | 9 | Restart=on-failure | |
| 9 | 10 | ||
adienakhmad revised this gist . Go to revision
1 file changed, 1 insertion, 1 deletion
example.service
| @@ -1,5 +1,5 @@ | |||
| 1 | 1 | [Unit] | |
| 2 | - | Description=Apache web server | |
| 2 | + | Description=My Daemon Example | |
| 3 | 3 | After=network.target | |
| 4 | 4 | ||
| 5 | 5 | [Service] | |
adienakhmad revised this gist . Go to revision
1 file changed, 12 insertions
example.service(file created)
| @@ -0,0 +1,12 @@ | |||
| 1 | + | [Unit] | |
| 2 | + | Description=Apache web server | |
| 3 | + | After=network.target | |
| 4 | + | ||
| 5 | + | [Service] | |
| 6 | + | ExecStart=/usr/local/bin/mydaemon | |
| 7 | + | Type=oneshot | |
| 8 | + | Restart=on-failure | |
| 9 | + | ||
| 10 | + | ||
| 11 | + | [Install] | |
| 12 | + | WantedBy=multi-user.target | |