p910nd.sh
来自「linux下从网卡远程启动」· Shell 代码 · 共 46 行
SH
46 行
#!/bin/sh## p910nd.sh This shell script takes care of starting and stopping# p910nd (port 9100+n printer daemon)# This script only controls the one on port 9101.# You can start others if you wish.## Todo: Make it work for both RH and SuSE style /etc/init.d# Source function library.test -r /etc/init.d/functions && . /etc/init.d/functions# Source networking configuration, and check that networking is up.[ -f /etc/sysconfig/network ] && . /etc/sysconfig/network && [ ${NETWORKING} = "no" ] && exit 0# See how we were called.case "$1" in start) # Start daemons. echo -n "Starting p910nd: " # default port is 1 so it will appear as p9101d on a ps daemon p910nd echo ;; stop) # Stop daemons. echo -n "Shutting down p910nd: " killproc p9101d echo rm -f /var/run/p9101.pid ;; status) status p9101d ;; restart) $0 stop $0 start ;; *) echo "Usage: p910nd {start|stop|restart|status}" exit 1esacexit 0
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?