/etc/init/ssh-chat.conf
update-rc.d ssh-chat enable
service ssh-chat start
description "SSH Chat Server"
author "Nicola Worthington"
start on filesystem or runlevel [2345]
stop on shutdown
script
export HOME="/space/home/nworthington"
echo $$ > /var/run/ssh-chat.pid
exec "$HOME/ssh-chat" --verbose --identity=/etc/ssh/ssh_host_rsa_key --bind=:22 --admin=/etc/ssh/admin_keys --log=/var/log/ssh-chat.log --pprof=223 --motd=/space/home/nworthington/motd.txt
end script
pre-start script
echo "[`date`] SSH Chat Starting" >> /var/log/ssh-chat.log
end script
pre-stop script
rm /var/run/ssh-chat.pid
echo "[`date`] SSH Chat Stopping" >> /var/log/ssh-chat.log
end script