getdevicedata.in

来自「Network Administration Visualized 网络管理可」· IN 代码 · 共 72 行

IN
72
字号
#!/usr/bin/env bash###################### $Id: getDeviceData.in 2013 2003-11-14 13:05:11Z mortenv $# This file is part of the NAV project.# This script controls start/stop/status of the NAV getDeviceData Daemon.## Copyright (c) 2002 by NTNU, ITEA nettgruppen# Authors: Kristian Eide <kreide@online.no>#          Morten Vold <morten.vold@itea.ntnu.no>#####################prefix=@prefix@exec_prefix=@exec_prefix@sysconfdir=@sysconfdir@initdir=@initdir@bindir=@bindir@localstatedir=@localstatedir@user=@nav_user@# Source function library.. ${initdir}/functions[ -x ${bindir}/getDeviceData.sh ] || exit 1# See how we were called.case "$1" in	start)		# Start daemons.		echo -n "Starting getDeviceData: "		# Only su to navcron if we aren't navcron already (to		# avoid password prompts)		if [ `whoami` == "${user}" ]; then		    SU=""		else		    SU="su - ${user} -c "		fi		daemon "${SU}${bindir}/getDeviceData.sh"		rc=$?		echo		exit $rc		;;	stop)		# Stop daemons.		echo -n "Shutting down getDeviceData: "		if killproc getDeviceData; then		# Make sure the pidfile is gone when stopping normal		    rm -f ${localstatedir}/run/getDeviceData.pid		    echo		    exit 0		else		    echo		    exit 1		fi        	;;	restart)		$0 stop		$0 start		;;	status)	        status getDeviceData		exit $?		;;	*)		echo "Usage: $0 {start|stop|restart|status}"		exit 1esacexit 0# === End of File ===

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?