[systemd-devel] systemctl stuck when run restart
Hongyi Zhao
hongyi.zhao at gmail.com
Sat Oct 5 15:05:58 UTC 2019
Hi,
I installed the latest git version of openssh-portable, and make the
following ssh.service file:
$ cat /lib/systemd/system/ssh.service
[Unit]
Description=OpenBSD Secure Shell server
After=network.target auditd.service
ConditionPathExists=!/usr/local/etc/sshd_not_to_be_run
[Service]
EnvironmentFile=-/usr/local/etc/default/ssh
ExecStartPre=/usr/local/sbin/sshd -t
ExecStart=/usr/local/sbin/sshd -D $SSHD_OPTS
ExecReload=/usr/local/sbin/sshd -t
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
RestartPreventExitStatus=255
Type=notify
[Install]
WantedBy=multi-user.target
Alias=sshd.service
With the above service file, I will stuck on the following command:
$ sudo systemctl stop ssh
$ sudo systemctl start ssh
^C
werner at localhost:~/software/openssh$ sudo systemctl restart ssh
^C
If I don't hit ^C, the command will stuck there for ever.
Any hints?
--
Hongsheng Zhao <hongyi.zhao at gmail.com>
Institute of Semiconductors, Chinese Academy of Sciences
GnuPG DSA: 0xD108493
More information about the systemd-devel
mailing list