#!/bin/sh
#
# $FreeBSD$
#

# PROVIDE: ix_sshd_save_keys
# REQUIRE: openssh

#
# Save any generated keys by /usr/local/etc/rc.d/sshd into the config db.
#

. /etc/rc.freenas

save_keys()
{
    LD_LIBRARY_PATH=/usr/local/lib /usr/local/bin/midclt call ssh.save_keys > /dev/null
}

name="ix_sshd_save_keys"
start_cmd='save_keys'
stop_cmd=':'

load_rc_config $name
run_rc_command "$1"
