mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-15 04:05:15 +03:00
23 lines
537 B
Text
23 lines
537 B
Text
#!/sbin/openrc-run
|
|
|
|
name="ssh-honeypot daemon"
|
|
description="Fake sshd that logs ip addresses, usernames, and passwords."
|
|
command=/usr/bin/ssh-honeypot
|
|
command_args="${SSHHONEYPOT_ARGS}"
|
|
prog_name="ssh-honeypot"
|
|
key_path="/usr/share/${prog_name}/honeypot.rsa"
|
|
pid_file="/var/run/${prog_name}.pid"
|
|
start_stop_daemon_args="-b -m --pidfile ${pidfile} -- "
|
|
|
|
depend() {
|
|
need net
|
|
}
|
|
|
|
start_pre() {
|
|
if ! checkpath -f "${key_path}"; then
|
|
ebegin "Generating key"
|
|
/usr/bin/ssh-keygen -t rsa -f ${key_path} -q -N ""
|
|
eend $?
|
|
fi
|
|
}
|
|
|