From b8368a51b6303f9ae3013b1bc21067ae32682609 Mon Sep 17 00:00:00 2001 From: TomasM Date: Tue, 14 Nov 2017 05:23:21 -0500 Subject: [PATCH] reconfigure openssh server before first run --- .../rootcopy/lib/systemd/system/xorg.service | 2 +- .../rootcopy/lib/systemd/system/ssh.service | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 Slax/debian/rootcopy/lib/systemd/system/ssh.service diff --git a/Slax/debian/modules/02-xorg/rootcopy/lib/systemd/system/xorg.service b/Slax/debian/modules/02-xorg/rootcopy/lib/systemd/system/xorg.service index a53f0af..2051645 100644 --- a/Slax/debian/modules/02-xorg/rootcopy/lib/systemd/system/xorg.service +++ b/Slax/debian/modules/02-xorg/rootcopy/lib/systemd/system/xorg.service @@ -3,4 +3,4 @@ Description=X-Window After=systemd-user-sessions.service [Service] -ExecStart=/bin/su --login -c /usr/bin/startx +ExecStart=/bin/su --login -c exec /usr/bin/startx diff --git a/Slax/debian/rootcopy/lib/systemd/system/ssh.service b/Slax/debian/rootcopy/lib/systemd/system/ssh.service new file mode 100644 index 0000000..36d48c7 --- /dev/null +++ b/Slax/debian/rootcopy/lib/systemd/system/ssh.service @@ -0,0 +1,18 @@ +[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/dpkg-reconfigure openssh-server +ExecStart=/usr/sbin/sshd -D $SSHD_OPTS +ExecReload=/bin/kill -HUP $MAINPID +KillMode=process +Restart=on-failure +RestartPreventExitStatus=255 +Type=notify + +[Install] +WantedBy=multi-user.target +Alias=sshd.service