diff --git a/openssh-config/debian/deb_folder/openssh-config.install b/openssh-config/debian/deb_folder/openssh-config.install index 9eb0972..6513bbf 100644 --- a/openssh-config/debian/deb_folder/openssh-config.install +++ b/openssh-config/debian/deb_folder/openssh-config.install @@ -1,3 +1,3 @@ ssh_config /usr/share/starlingx sshd_config /usr/share/starlingx -sshd.service /usr/share/starlingx +ssh.service /usr/share/starlingx diff --git a/openssh-config/debian/deb_folder/postinst b/openssh-config/debian/deb_folder/postinst index 580a99a..eb248ce 100644 --- a/openssh-config/debian/deb_folder/postinst +++ b/openssh-config/debian/deb_folder/postinst @@ -4,6 +4,6 @@ set -e cp -f /usr/share/starlingx/ssh_config /etc/ssh/ssh_config cp -f /usr/share/starlingx/sshd_config /etc/ssh/sshd_config -cp -f /usr/share/starlingx/sshd.service /lib/systemd/system/sshd.service +cp -f /usr/share/starlingx/ssh.service /lib/systemd/system/ssh.service #DEBHELPER# diff --git a/openssh-config/source-debian/ssh.service b/openssh-config/source-debian/ssh.service new file mode 100644 index 0000000..0174c81 --- /dev/null +++ b/openssh-config/source-debian/ssh.service @@ -0,0 +1,21 @@ +[Unit] +Description=OpenBSD Secure Shell server +After=network.target auditd.service +ConditionPathExists=!/etc/ssh/sshd_not_to_be_run + +[Service] +EnvironmentFile=-/etc/default/ssh +ExecStartPre=/usr/sbin/sshd -t +ExecStart=/usr/sbin/sshd -D $SSHD_OPTS +ExecReload=/usr/sbin/sshd -t +ExecReload=/bin/kill -HUP $MAINPID +KillMode=process +#Restart=on-failure +#RestartPreventExitStatus=255 +Type=notify +RuntimeDirectory=sshd +RuntimeDirectoryMode=0755 + +[Install] +WantedBy=multi-user.target +Alias=sshd.service diff --git a/openssh-config/source-debian/sshd.service b/openssh-config/source-debian/sshd.service deleted file mode 100644 index 3314c94..0000000 --- a/openssh-config/source-debian/sshd.service +++ /dev/null @@ -1,18 +0,0 @@ -[Unit] -Description=OpenSSH server daemon -Documentation=man:sshd(8) man:sshd_config(5) -After=network.target sshd-keygen.service -Wants=sshd-keygen.service - -[Service] -EnvironmentFile=/etc/default/ssh -ExecStart=/etc/init.d/sshd start -ExecStop=/etc/init.d/sshd stop -ExecReload=/bin/kill -HUP $MAINPID -PIDFile=/var/run/sshd.pid -KillMode=none -#Restart=on-failure -#RestartSec=42s - -[Install] -WantedBy=multi-user.target