Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Here is the script I will enabled in a SystemD Unit for testing purposes
- [centos@localhost ~]$ cat ~/test.sh
- #!/bin/sh
- echo "hello"
- ## Here is the documentation file I will reference in the SystemD Unit
- [centos@localhost ~]$ cat ~/test.txt
- this is a piece of test documentation
- ## Here is the System D Unit file
- [centos@localhost ~]$ cat /etc/systemd/system/test1.service
- [Unit]
- Description=Test
- Documentation=file://localhost/home/centos/test.txt
- [Service]
- ExecStart=/home/centos/test.sh
- [Install]
- WantedBy=multi-user.target
- [centos@localhost ~]$ sudo systemctl daemon-reload
- [centos@localhost ~]$ sudo systemctl restart test1.service
- [centos@localhost ~]$ sudo systemctl status test1.service
- ● test1.service - Test
- Loaded: loaded (/etc/systemd/system/test1.service; enabled; vendor preset: disabled)
- Active: inactive (dead) since Sun 2019-02-17 18:37:13 GMT; 6s ago
- Docs: file://localhost/home/centos/test.txt
- Process: 16036 ExecStart=/home/centos/test.sh (code=exited, status=0/SUCCESS)
- Main PID: 16036 (code=exited, status=0/SUCCESS)
- Feb 17 18:37:13 localhost.localdomain systemd[1]: Started Test.
- Feb 17 18:37:13 localhost.localdomain test.sh[16036]: hello
- ## Here is the problem:
- [centos@localhost ~]$ systemctl help test1.service
- Can't show: file://localhost/home/centos/test.txt
- file://localhost/home/centos/test.txt
- file:///home/centos/test.txt
- file:/home/centos/test.txt
Add Comment
Please, Sign In to add comment