2006-12-18 16:48:29 +01:00
|
|
|
{openssh, glibc, pwdutils}:
|
2006-11-23 18:43:28 +01:00
|
|
|
|
|
|
|
{
|
|
|
|
name = "sshd";
|
|
|
|
|
|
|
|
job = "
|
|
|
|
description \"SSH server\"
|
|
|
|
|
|
|
|
start on network-interfaces/started
|
|
|
|
stop on network-interfaces/stop
|
|
|
|
|
|
|
|
start script
|
|
|
|
mkdir -m 0555 -p /var/empty
|
|
|
|
|
|
|
|
mkdir -m 0755 -p /etc/ssh
|
|
|
|
|
|
|
|
if ! test -f /etc/ssh/ssh_host_dsa_key; then
|
|
|
|
${openssh}/bin/ssh-keygen -t dsa -b 1024 -f /etc/ssh/ssh_host_dsa_key -N ''
|
|
|
|
fi
|
|
|
|
|
2006-12-18 16:52:43 +01:00
|
|
|
if ! ${glibc}/bin/getent passwd sshd > /dev/null; then
|
2006-12-18 16:48:29 +01:00
|
|
|
${pwdutils}/sbin/useradd -g nogroup -d /var/empty -s /noshell \\
|
|
|
|
-c 'SSH privilege separation user' sshd
|
2006-11-23 18:43:28 +01:00
|
|
|
fi
|
|
|
|
end script
|
|
|
|
|
2006-12-12 16:32:28 +01:00
|
|
|
respawn ${openssh}/sbin/sshd -D -h /etc/ssh/ssh_host_dsa_key -f ${./sshd_config}
|
2006-11-23 18:43:28 +01:00
|
|
|
";
|
|
|
|
|
|
|
|
}
|