File: //etc/init/ssh-sftp.conf
description "SFTP runs on port 22"
author "Network Infrastructure Team"
start on starting sshd
stop on stopping sshd
console log
pre-start script
date
echo "Start SFTP..."
. /usr/syno/etc.defaults/rc.ssh.subr || true
${SSHDUtils} --register ${ReferKeySFTP} ${ReferProcSFTP} || true
/sbin/start sshd || true
if [ ! -f $SFTPPidFile ]; then
cp -f $SSHPidFile $SFTPPidFile
fi
end script
post-start script
/usr/syno/etc/rc.sysv/avahi.sh sftp-conf
end script
post-stop script
date
echo "Stop SFTP..."
. /usr/syno/etc.defaults/rc.ssh.subr || true
${SSHDUtils} --unregister ${ReferKeySFTP} || true
if [ -f $SFTPPidFile ]; then
rm -f $SFTPPidFile
fi
/usr/syno/etc/rc.sysv/avahi.sh avahi-delete-conf || true
end script
# vim:ft=upstart