Codebase list kali-defaults / a5d51ba
Use hyphens rather than underscores for service name It's the most common convention, here's how it is on my system: $ find /usr/lib/systemd/system -name '*_*' | wc -l 12 $ find /usr/lib/systemd/system -name '*-*' | wc -l 278 Arnaud Rebillout 2 years ago
2 changed file(s) with 12 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
0 [Unit]
1 Description=Regenerate SSH host keys
2 ConditionPathExists=/usr/sbin/sshd
3 Before=ssh.service
4 ConditionPathExistsGlob=!/etc/ssh/ssh_host_*_key
5
6 [Service]
7 Type=oneshot
8 ExecStart=/usr/bin/ssh-keygen -A
9
10 [Install]
11 RequiredBy=multi-user.target
+0
-12
systemd/system/regenerate_ssh_host_keys.service less more
0 [Unit]
1 Description=Regenerate SSH host keys
2 ConditionPathExists=/usr/sbin/sshd
3 Before=ssh.service
4 ConditionPathExistsGlob=!/etc/ssh/ssh_host_*_key
5
6 [Service]
7 Type=oneshot
8 ExecStart=/usr/bin/ssh-keygen -A
9
10 [Install]
11 RequiredBy=multi-user.target