1 |
Canek Peláez Valdés <caneko@×××××.com> writes: |
2 |
|
3 |
> * Really simple service unit files: The service unit files are really |
4 |
> small, really simple, really easy to understand/modify. Compare the 9 |
5 |
> lines of sshd.service: |
6 |
> |
7 |
> $ cat /etc/systemd/system/sshd.service |
8 |
> [Unit] |
9 |
> Description=SSH Secure Shell Service |
10 |
> After=syslog.target |
11 |
> |
12 |
> [Service] |
13 |
> ExecStart=/usr/sbin/sshd -D |
14 |
> |
15 |
> [Install] |
16 |
> WantedBy=multi-user.target |
17 |
> |
18 |
> with the 84 of /etc/init.d/sshd (80 without comments). |
19 |
|
20 |
But the 80 lines of /etc/init.d/sshd do a lot more than just and stop |
21 |
the service. They ensure that there is an sshd configuration file and |
22 |
give a meaningful message (including where to find the sample) if it is |
23 |
not present, and check for the presence of the hostkeys (again which are |
24 |
needed) and create them if they are not present. Your 9 lines of |
25 |
sshd.service do none of this. |