I'm doing a basic sshd init script for my old sun box, but im having
problem with
kill: 5247: no such process
kill: 5245: no such process
Terminated
errors. Processes are killed but I dont wanna see this annoying
messages.
pls. see script:
#!/bin/sh
pid=`/usr/bin/ps -e | /usr/bin/grep sshd | /usr/bin/sed -e 's/^ *//' -e 's/ .*//'`
case $1 in
'start')
/usr/local/sbin/sshd
;;
'stop')
if [ "${pid}" != "" ]
then
/usr/bin/kill ${pid}
fi
;;
*)
echo "usage: /etc/init.d/sshd {start|stop}"
;;
esac
----
tried changing the stop case to:
'stop')
echo "Stopping the secure shell daemon "
pkill -TERM sshd
---
hoping this would also prevent disconnecting me in my ssh session while still log on
my server when doing stop. But to no avail.
Any suggestions?
--
Philippine Linux Users' Group (PLUG) Mailing List
[EMAIL PROTECTED] (#PLUG @ irc.free.net.ph)
Official Website: http://plug.linux.org.ph
Searchable Archives: http://marc.free.net.ph
.
To leave, go to http://lists.q-linux.com/mailman/listinfo/plug
.
Are you a Linux newbie? To join the newbie list, go to
http://lists.q-linux.com/mailman/listinfo/ph-linux-newbie