任何人都可以告诉我这个脚本究竟是做什么的?
#! /bin/sh
test –f /usr/bin/sshd || exit 0
case “$1” in
start)
echo –n “Starting sshd: sshd”
/usr/sbin/sshd
echo “.”
;;
stop)
echo –n “Stopping sshd: sshd”
kill `cat /var/run/sshd.pid`
echo “.”
;;
restart)
echo –n “Stopping sshd: sshd”
kill `cat /var/run/sshd.pid`
echo “.”
echo –n “Starting sshd: sshd”
/usr/sbin/sshd
echo “.”
;;
*)
echo “Usage: /etc/init.d/sshd start|stop|restart”
exit 1
;;
esac
Run Code Online (Sandbox Code Playgroud)
我想知道这部分到底是什么:
#! /bin/sh
test –f /usr/bin/sshd || exit 0
case “$1” in
start)
echo –n “Starting sshd: …Run Code Online (Sandbox Code Playgroud) linux ×1