Skip to content

Commit 31354bb

Browse files
committed
docs: reorganize systemd service file documentation
1 parent 8e184db commit 31354bb

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

systemd.md

+8-9
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@
99
- Reload Configuration on SIGHUP
1010
- See logs
1111

12-
# systemd Service File
1312

14-
## Modify the service file
13+
# Modify the service file
1514

1615
```
1716
[Service]
@@ -28,7 +27,7 @@ TimeoutSec=10
2827
Change the `user` and `group` to your own user.
2928
Make sure `WorkingDirectory` and `ExecStart` points to existing own paths.
3029

31-
## Copy the Service File to the Systemd Directory
30+
# Copy the Service File to the Systemd Directory
3231

3332
You need to copy your .service file to the `/etc/systemd/system`
3433
directory. This is where systemd looks for service files. You'll need superuser
@@ -38,14 +37,14 @@ privileges to do this.
3837
sudo cp ical-git.service /etc/systemd/system/
3938
```
4039

41-
## Reload Systemd Daemon:
40+
# Reload Systemd Daemon:
4241

4342
After adding or modifying any service file, you need to reload the systemd daemon so it can recognize the new or changed service file.
4443
```console
4544
sudo systemctl daemon-reload
4645
```
4746

48-
## Enable the Service
47+
# Enable the Service
4948

5049
If you want your service to start automatically on boot, you should enable it.
5150
This step is optional but recommended for most services that you want to run
@@ -55,7 +54,7 @@ continuously.
5554
sudo systemctl enable ical-git.service
5655
```
5756

58-
## Start the Service
57+
# Start the Service
5958

6059
Now, you can start your service. If you've enabled it, this step is technically
6160
optional since it will start on the next boot, but you'll likely want to start
@@ -65,21 +64,21 @@ it immediately for testing purposes.
6564
sudo systemctl start ical-git.service
6665
```
6766

68-
## Check the Service Status
67+
# Check the Service Status
6968
To verify that your service is running as expected, you can check its status.
7069

7170
```console
7271
sudo systemctl status ical-git.service
7372
```
7473

75-
## Reload Configuration on SIGHUP
74+
# Reload Configuration on SIGHUP
7675
`ical-git` can reload its configuration file when it receives the SIGHUP signal. To reload the configuration without restarting the service, use the following command:
7776

7877
```console
7978
sudo systemctl reload ical-git.service
8079
```
8180

82-
## See logs
81+
# See logs
8382

8483
```console
8584
sudo journalctl -u ical-git.service

0 commit comments

Comments
 (0)