[Main]
Type = classic
Version = 0.0.2
Description = "ssh daemon"
User = ( root )

[Start]
Execute = (
    /usr/lib/execline/bin/foreground { if { test -e /etc/ssh/sshd_not_to_be_run } 66 stop sshd }
    /usr/lib/execline/bin/foreground { bash -c "if id -u sshd >/dev/null 2>&1 ; then exit 0 ; else /sbin/useradd -r sshd -s /bin/nologin >/dev/null 2>&1 ; fi" }
    /usr/lib/execline/bin/foreground { mkdir -p /run/sshd }
    /usr/lib/execline/bin/foreground { chmod 0755 /run/sshd }
    /usr/lib/execline/bin/foreground { /bin/ssh-keygen -A }
    /usr/lib/execline/bin/foreground { touch /var/log/lastlog }
    /usr/lib/execline/bin/foreground { chgrp utmp /var/log/lastlog }
    /usr/lib/execline/bin/foreground { chmod 664 /var/log/lastlog }
     execl-cmdline -s { /usr/sbin/sshd ${Args} }
)

[Environment]
Args=!-D -e ${ArgsConfFile}
ArgsConfFile=!-f /etc/ssh/sshd_config

