91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

Nagios和ndo2db系統腳本---for gentoo

發布時間:2020-06-05 18:23:01 來源:網絡 閱讀:936 作者:chengchow 欄目:移動開發

Gentoo下Nagios系統啟動腳本

#!/sbin/runscript
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
depend() {
need net
}
if [ -f /etc/rc.d/init.d/functions ]; then
. /etc/rc.d/init.d/functions
elif [ -f /etc/init.d/functions ]; then
. /etc/init.d/functions
fi
checkconfig() {
nagios_bin_file=/var/www/localhost/htdocs/nagios/bin/nagios
nagios_cfg_file=/var/www/localhost/htdocs/nagios/etc/nagios.cfg
if [ ! -f "$nagios_bin_file" ]; then
echo "$nagios_bin_file is not exist."
exit 1
fi
if [ ! -f "$nagios_cfg_file" ]; then
echo "$nagios_cfg_file is not exist."
exit 1
fi
$nagios_bin_file -v $nagios_cfg_file > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo "please check your nagios configuration file."
exit 1
fi
}
start() {
nagios_script_file=/var/www/localhost/htdocs/nagios/sbin/nagios
checkconfig
ebegin "starting nagios"
start-stop-daemon --start --exec $nagios_script_file
eend $?
}
stop() {
nagios_pid_file=/var/www/localhost/htdocs/nagios/var/nagios.lock
ebegin "Stopping nagios"
start-stop-daemon --stop --retry 30 --pidfile $nagios_pid_file
eend $?
}
status() {
nagios_run_path=/var/www/localhost/htdocs/nagios/var
if [ ! -f $nagios_run_path/nagios.lock ]; then
echo "nagios is not running."
else
nagios_pid_NO=`head -n 1 $nagios_run_path/nagios.lock`
echo "nagios( pid:$nagios_pid_NO ) is running."
fi
}

Gentoo下ndo2db系統啟動腳本

#!/sbin/runscript
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
depend() {
need net
}
if [ -f /etc/rc.d/init.d/functions ]; then
. /etc/rc.d/init.d/functions
elif [ -f /etc/init.d/functions ]; then
. /etc/init.d/functions
fi
checkconfig() {
ndo2db_bin_file=/var/www/localhost/htdocs/nagios/bin/ndo2db-3x
ndo2db_cfg_file=/var/www/localhost/htdocs/nagios/etc/ndo2db.cfg
if [ ! -f "$ndo2db_bin_file" ]; then
echo "$ndo2db_bin_file is not exist."
exit 1
fi
if [ ! -f "$ndo2db_cfg_file" ]; then
echo "$ndo2db_cfg_file is not exist."
exit 1
fi
}
start() {
ndo2db_script_file=/var/www/localhost/htdocs/nagios/sbin/ndo2db
checkconfig
ebegin "starting ndo2db"
start-stop-daemon --start --exec $ndo2db_script_file
eend $?
}
stop() {
ndo2db_pid_file=/var/www/localhost/htdocs/nagios/var/ndo2db.lock
ebegin "Stopping ndo2db"
start-stop-daemon --stop --retry 30 --pidfile $ndo2db_pid_file
eend $?
}
status() {
ndo2db_run_path=/var/www/localhost/htdocs/nagios/var
if [ ! -f $ndo2db_run_path/ndo2db.lock ]; then
echo "ndo2db service is not running."
else
ndo2db_pid_NO=`head -n 1 $ndo2db_run_path/ndo2db.lock`
echo "ndo2db( pid:$ndo2db_pid_NO ) is running."
fi
}

 

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

华池县| 万源市| 莱西市| 许昌市| 南江县| 古浪县| 涡阳县| 巴塘县| 双辽市| 岳阳市| 吴忠市| 榆树市| 通辽市| 镶黄旗| 化德县| 二连浩特市| 和平区| 门头沟区| 乃东县| 石嘴山市| 阳泉市| 霍林郭勒市| 桦川县| 运城市| 岑溪市| 安庆市| 乌兰县| 安丘市| 商丘市| 勐海县| 新巴尔虎右旗| 华池县| 龙岩市| 尼勒克县| 广灵县| 扶沟县| 株洲县| 措勤县| 贵州省| 秦安县| 小金县|