ports/main/nnd-s6-services/rc/user.sshd/up

19 lines
308 B
Plaintext

#!/bin/execlineb -P
s6-envdir -i /etc/s6/env/path
importas -i PATH PATH
emptyenv
export PATH $PATH
define SHELL /sbin/nologin
define USER sshd
fdclose 1
fdclose 2
# TODO: Handle user already being present
foreground {
exec adduser -s $SHELL -H -D $USER
} if -nt {
importas status ? test $status -eq 1
}