<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>我本善良 &#187; Nginx监控脚本</title>
	<atom:link href="https://wbsl.org/tag/nginx%e7%9b%91%e6%8e%a7%e8%84%9a%e6%9c%ac/feed" rel="self" type="application/rss+xml" />
	<link>https://wbsl.org</link>
	<description>一个不太正常的正常人</description>
	<lastBuildDate>Fri, 05 Jul 2024 01:35:05 +0000</lastBuildDate>
	<language>zh-CN</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.2</generator>
	<item>
		<title>监控Nginx运行状态脚本</title>
		<link>https://wbsl.org/linux/391.html</link>
		<comments>https://wbsl.org/linux/391.html#comments</comments>
		<pubDate>Fri, 05 Jul 2024 01:30:16 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[Nginx监控脚本]]></category>

		<guid isPermaLink="false">https://wbsl.org/?p=391</guid>
		<description><![CDATA[[crayon-69dabb5b06757835515760/]]]></description>
				<content:encoded><![CDATA[<p>
</p><pre class="crayon-plain-tag">#!/bin/bash

# 检查Nginx是否运行
if pgrep nginx &gt; /dev/null 2&gt;&amp;1; then
    echo "Nginx is running."
    exit 0
else
    echo "Nginx is not running. Starting Nginx..."
    systemctl start nginx

    # 检查Nginx是否启动成功
    if pgrep nginx &gt; /dev/null 2&gt;&amp;1; then
        echo "Nginx started successfully."
        exit 0
    else
        echo "Failed to start Nginx."
        exit 1
    fi
fi</pre><p> </p>
]]></content:encoded>
			<wfw:commentRss>https://wbsl.org/linux/391.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
