{"id":65105,"date":"2026-01-24T14:32:55","date_gmt":"2026-01-24T06:32:55","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/65105.html"},"modified":"2026-01-24T14:32:55","modified_gmt":"2026-01-24T06:32:55","slug":"systemd%e7%9a%84%e4%bd%bf%e7%94%a8%e5%92%8c%e7%bc%96%e5%86%99","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/65105.html","title":{"rendered":"systemd\u7684\u4f7f\u7528\u548c\u7f16\u5199"},"content":{"rendered":"<h4>\u4e00\u3001\u5148\u8dd1\u8d77\u6765<\/h4>\n<li>\u4efb\u610f\u811a\u672c\u505a\u6210\u7cfb\u7edf\u670d\u52a1&#xff08;\u4ee5\u6bcf 60 \u79d2\u6253\u5370\u65e5\u671f\u4e3a\u4f8b&#xff09;<\/li>\n<p><span class=\"token comment\"># 1. \u51c6\u5907\u811a\u672c<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">tee<\/span> \/usr\/local\/bin\/date_demo.sh <span class=\"token operator\">&lt;&lt;<\/span><span class=\"token string\">&#039;EOF&#039;<br \/>\n#!\/bin\/bash<br \/>\nwhile :; do echo &#034;[$(date)] Hello systemd&#034; &gt;&gt;\/var\/log\/date_demo.log; sleep 60; done<br \/>\nEOF<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">chmod<\/span> &#043;x \/usr\/local\/bin\/date_demo.sh<\/p>\n<p><span class=\"token comment\"># 2. \u5199\u6700\u7b80 .service<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">tee<\/span> \/etc\/systemd\/system\/date_demo.service <span class=\"token operator\">&lt;&lt;<\/span><span class=\"token string\">&#039;EOF&#039;<br \/>\n[Unit]<br \/>\nDescription&#061;Date demo service<br \/>\nAfter&#061;network.target<\/p>\n<p>[Service]<br \/>\nType&#061;simple<br \/>\nExecStart&#061;\/usr\/local\/bin\/date_demo.sh<br \/>\nRestart&#061;always<br \/>\nRestartSec&#061;5s<\/p>\n<p>[Install]<br \/>\nWantedBy&#061;multi-user.target<br \/>\nEOF<\/span><\/p>\n<p><span class=\"token comment\"># 3. \u52a0\u8f7d &#043; \u542f\u52a8 &#043; \u5f00\u673a\u81ea\u542f<\/span><br \/>\n<span class=\"token function\">sudo<\/span> systemctl daemon-reload<br \/>\n<span class=\"token function\">sudo<\/span> systemctl <span class=\"token builtin class-name\">enable<\/span> &#8211;now date_demo<br \/>\n<span class=\"token function\">sudo<\/span> systemctl status date_demo<br \/>\n<span class=\"token comment\"># \u770b\u65e5\u5fd7<\/span><br \/>\n<span class=\"token function\">sudo<\/span> journalctl -u date_demo -f<\/p>\n<p>\u81f3\u6b64&#xff0c;\u4f60\u5df2\u7ecf\u638c\u63e1\u4e86\u201c\u811a\u672c\u2192\u670d\u52a1\u2192\u81ea\u542f\u2192\u65e5\u5fd7\u201d\u5b8c\u6574\u95ed\u73af \u3002<\/p>\n<hr \/>\n<h4>\u4e8c\u3001\u7f16\u5199\u5355\u5143\u6587\u4ef6\u5fc5\u77e5\u5fc5\u4f1a<\/h4>\n<li>\u4e09\u5927\u90e8\u5206\u8bb0\u5fc6\u53e3\u8bc0<\/li>\n<ul>\n<li>[Unit]  \u7ba1\u201c\u4f9d\u8d56\u3001\u542f\u52a8\u987a\u5e8f\u201d<\/li>\n<li>[Service] \u7ba1\u201c\u600e\u4e48\u8dd1\u3001\u8dd1\u8c01\u3001\u8dd1\u6302\u4e86\u600e\u4e48\u529e\u201d<\/li>\n<li>[Install] \u7ba1\u201c\u5f00\u673a\u8981\u4e0d\u8981\u5e26\u51fa\u6765\u201d<\/li>\n<\/ul>\n<li>\u6700\u5e38\u7528\u7684 10 \u6761\u5b57\u6bb5&#xff08;\u80cc\u4e0b\u6765\u591f\u7528 90% \u573a\u666f&#xff09;<\/li>\n<table>\n<tr>\u5b57\u6bb5\u4f5c\u7528\u793a\u4f8b<\/tr>\n<tbody>\n<tr>\n<td>Description&#061;<\/td>\n<td>\u4e00\u53e5\u8bdd\u8bf4\u660e<\/td>\n<td>My Web API<\/td>\n<\/tr>\n<tr>\n<td>After&#061; \/ Before&#061;<\/td>\n<td>\u987a\u5e8f<\/td>\n<td>After&#061;network-online.target mysql.service<\/td>\n<\/tr>\n<tr>\n<td>Wants&#061; \/ Requires&#061;<\/td>\n<td>\u5f31\/\u5f3a\u4f9d\u8d56<\/td>\n<td>Wants&#061;redis<\/td>\n<\/tr>\n<tr>\n<td>Type&#061;<\/td>\n<td>\u542f\u52a8\u65b9\u5f0f<\/td>\n<td>simple&#xff08;\u9ed8\u8ba4&#xff09; forking&#xff08;\u65e7\u5b88\u62a4&#xff09; oneshot&#xff08;\u4e00\u6b21\u6027&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>ExecStart&#061;<\/td>\n<td>\u4e3b\u8fdb\u7a0b<\/td>\n<td>\/usr\/local\/bin\/api.sh<\/td>\n<\/tr>\n<tr>\n<td>ExecReload&#061;<\/td>\n<td>\u5e73\u6ed1\u91cd\u8f7d<\/td>\n<td>\/bin\/kill -HUP $MAINPID<\/td>\n<\/tr>\n<tr>\n<td>Restart&#061;<\/td>\n<td>\u81ea\u52a8\u91cd\u542f\u7b56\u7565<\/td>\n<td>always on-failure no<\/td>\n<\/tr>\n<tr>\n<td>RestartSec&#061;<\/td>\n<td>\u91cd\u542f\u95f4\u9694<\/td>\n<td>10s<\/td>\n<\/tr>\n<tr>\n<td>User&#061; \/ Group&#061;<\/td>\n<td>\u964d\u6743\u8fd0\u884c<\/td>\n<td>User&#061;app<\/td>\n<\/tr>\n<tr>\n<td>WantedBy&#061;<\/td>\n<td>\u5f00\u673a\u81ea\u542f\u76ee\u6807<\/td>\n<td>multi-user.target<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<li>\u5b57\u6bb5\u5751\u4f4d\u63d0\u9192<\/li>\n<ul>\n<li>forking \u7c7b\u578b\u5fc5\u987b\u914d PIDFile&#061;&#xff0c;\u5426\u5219 systemd \u627e\u4e0d\u5230\u201c\u4e3b\u8fdb\u7a0b\u201d \u3002<\/li>\n<li>oneshot \u7c7b\u578b\u642d\u914d RemainAfterExit&#061;yes \u624d\u80fd\u5b9e\u73b0\u201c\u4e00\u6b21\u6027\u4f46\u4fdd\u6301 active\u201d\u72b6\u6001 \u3002<\/li>\n<li>\u964d\u6743\u8fd0\u884c\u65f6&#xff0c;\u5de5\u4f5c\u76ee\u5f55 \/ \u7f13\u5b58\u76ee\u5f55\u8981\u63d0\u524d\u8d4b\u6743&#xff0c;\u5426\u5219\u9891\u7e41\u62a5 Permission denied\u3002<\/li>\n<\/ul>\n<hr \/>\n<h4>\u4e09\u3001\u9ad8\u9891\u573a\u666f\u6a21\u677f&#xff08;\u76f4\u63a5\u6539\u8def\u5f84\u5373\u53ef&#xff09;<\/h4>\n<li>\u7eff\u8272\u4e8c\u8fdb\u5236&#xff08;\u5982 frps\u3001nps&#xff09;<\/li>\n<p>[Unit]<br \/>\nDescription&#061;Frp Server<br \/>\nAfter&#061;network-online.target<br \/>\nWants&#061;network-online.target<\/p>\n<p>[Service]<br \/>\nType&#061;simple<br \/>\nExecStart&#061;\/usr\/local\/frp\/frps -c \/usr\/local\/frp\/frps.toml<br \/>\nRestart&#061;always<br \/>\nRestartSec&#061;5s<\/p>\n<p>[Install]<br \/>\nWantedBy&#061;multi-user.target<\/p>\n<li>Python \u865a\u62df\u73af\u5883\u9879\u76ee<\/li>\n<p>[Unit]<br \/>\nDescription&#061;My Flask API<br \/>\nAfter&#061;network-online.target<\/p>\n<p>[Service]<br \/>\nType&#061;simple<br \/>\nUser&#061;app<br \/>\nWorkingDirectory&#061;\/opt\/myapp<br \/>\nExecStart&#061;\/opt\/venv\/bin\/gunicorn -w 4 -b 0.0.0.0:8000 app:app<br \/>\nExecReload&#061;\/bin\/kill -HUP $MAINPID<br \/>\nRestart&#061;on-failure<br \/>\nRestartSec&#061;20s<br \/>\nEnvironment&#061;&#034;PATH&#061;\/opt\/venv\/bin&#034;<\/p>\n<p>[Install]<br \/>\nWantedBy&#061;multi-user.target<\/p>\n<li>\u4e00\u6b21\u6027\u5907\u4efd &#043; \u5b9a\u65f6\u5668&#xff08;\u66ff\u4ee3 cron&#xff09;<br \/>\nrsync-to-win.service<\/li>\n<p>[Unit]<br \/>\nDescription&#061;Backup to Windows share<br \/>\n[Service]<br \/>\nType&#061;oneshot<br \/>\nExecStart&#061;\/usr\/local\/bin\/rsync_to_win.sh<\/p>\n<p>rsync-to-win.timer<\/p>\n<p>[Unit]<br \/>\nDescription&#061;Run backup every 10 min<br \/>\n[Timer]<br \/>\nOnCalendar&#061;*:0\/10<br \/>\nPersistent&#061;true<br \/>\n[Install]<br \/>\nWantedBy&#061;timers.target<\/p>\n<p>\u542f\u7528&#xff1a;<\/p>\n<p><span class=\"token function\">sudo<\/span> systemctl daemon-reload<br \/>\n<span class=\"token function\">sudo<\/span> systemctl <span class=\"token builtin class-name\">enable<\/span> &#8211;now rsync-to-win.timer<br \/>\n<span class=\"token comment\"># \u67e5\u770b\u4e0b\u6b21\u6267\u884c\u65f6\u95f4<\/span><br \/>\nsystemctl list-timers<\/p>\n<hr \/>\n<h4>\u56db\u3001\u65e5\u5e38\u8fd0\u7ef4 6 \u547d\u4ee4<\/h4>\n<table>\n<tr>\u4efb\u52a1\u547d\u4ee4<\/tr>\n<tbody>\n<tr>\n<td>\u4fee\u6539\u5b8c .service \u6587\u4ef6<\/td>\n<td>sudo systemctl daemon-reload<\/td>\n<\/tr>\n<tr>\n<td>\u542f\u52a8\/\u505c\u6b62\/\u91cd\u542f<\/td>\n<td>sudo systemctl start&#xff5c;stop&#xff5c;restart \u5355\u5143\u540d<\/td>\n<\/tr>\n<tr>\n<td>\u5f00\u673a\u81ea\u542f \/ \u5173\u95ed<\/td>\n<td>sudo systemctl enable&#xff5c;disable \u5355\u5143\u540d<\/td>\n<\/tr>\n<tr>\n<td>\u770b\u5b9e\u65f6\u65e5\u5fd7<\/td>\n<td>sudo journalctl -u \u5355\u5143\u540d -f<\/td>\n<\/tr>\n<tr>\n<td>\u770b\u5386\u53f2\u542f\u52a8\u8017\u65f6<\/td>\n<td>systemd-analyze blame<\/td>\n<\/tr>\n<tr>\n<td>\u770b\u5355\u5143\u4f9d\u8d56\u56fe<\/td>\n<td>systemctl dot | dot -Tsvg &gt; \/tmp\/tree.svg<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h4>\u4e94\u3001\u6392\u9519 3 \u677f\u65a7<\/h4>\n<li>\n<p>\u72b6\u6001\u9ad8\u4eae\u6cd5<br \/>\nsystemctl status \u5355\u5143\u540d \u279c \u7ea2\u8272\u5173\u952e\u5b57 failed \/ exit-code \/ signal \u76f4\u63a5\u5b9a\u4f4d\u3002<\/p>\n<\/li>\n<li>\n<p>\u65e5\u5fd7\u7ea7\u522b\u6cd5<br \/>\nsudo journalctl -u \u5355\u5143\u540d -o cat -p err..alert \u53ea\u770b\u9519\u8bef\u4e0e\u544a\u8b66\u3002<\/p>\n<\/li>\n<li>\n<p>\u624b\u52a8\u8dd1\u4e00\u904d\u6cd5<br \/>\n\u628a ExecStart&#061; \u547d\u4ee4\u539f\u6837\u590d\u5236\u5230\u7ec8\u7aef\u6267\u884c&#xff0c;90% \u8def\u5f84\/\u6743\u9650\/\u73af\u5883\u53d8\u91cf\u9519\u8bef\u4f1a\u7acb\u5373\u73b0\u5f62\u3002<\/p>\n<\/li>\n<hr \/>\n<h4>\u516d\u3001\u8fdb\u9636\u8def\u7ebf&#xff08;\u7528\u5230\u518d\u67e5&#xff09;<\/h4>\n<ul>\n<li>\u8d44\u6e90\u9650\u5236&#xff1a;MemoryMax&#061;\u3001TasksMax&#061;\u3001LimitNOFILE&#061;<\/li>\n<li>\u5e73\u6ed1\u542f\u52a8&#xff1a;ExecStartPre&#061;\u3001ExecStartPost&#061;\u3001TimeoutStartSec&#061;<\/li>\n<li>\u591a\u5b9e\u4f8b\u6a21\u677f&#xff1a;&#064;.service \u6a21\u677f &#043; \u5b9e\u4f8b\u540d<\/li>\n<li>\u7528\u6237\u7ea7\u670d\u52a1&#xff1a;systemctl &#8211;user enable \u5355\u5143\u540d&#xff08;\u65e0\u9700 root&#xff09;<\/li>\n<li>\u7f51\u7edc\u4f9d\u8d56&#xff1a;systemd-networkd-wait-online.service \u4e0e network-online.target \u7684\u533a\u522b<\/li>\n<\/ul>\n<hr \/>\n<h4>\u4e03\u3001\u4e00\u53e5\u8bdd\u603b\u7ed3<\/h4>\n<p>\u201c\u5199\u5355\u5143\u6587\u4ef6\u5c31\u662f\u586b\u7a7a\u9898&#xff1a;\u63cf\u8ff0\u2192\u4f9d\u8d56\u2192\u600e\u4e48\u8dd1\u2192\u8dd1\u6302\u600e\u4e48\u529e\u2192\u8981\u4e0d\u8981\u81ea\u542f&#xff1b;<br \/>\n\u65e5\u5e38\u8fd0\u7ef4\u5c31\u662f 6 \u4e2a\u547d\u4ee4&#xff1a;reload\u3001start\u3001enable\u3001status\u3001journalctl\u3001list-timers\u3002\u201d<br \/>\n\u638c\u63e1\u4ee5\u4e0a\u5957\u8def\u540e&#xff0c;\u4efb\u4f55\u811a\u672c\u3001\u4e8c\u8fdb\u5236\u3001Python \u9879\u76ee\u3001\u5b9a\u65f6\u4efb\u52a1\u90fd\u80fd 5 \u5206\u949f\u63a5\u5165 systemd\u3002\u795d\u73a9\u5f97\u5f00\u5fc3&#xff01;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u5148\u8dd1\u8d77\u6765<br \/>\n\u4efb\u610f\u811a\u672c\u505a\u6210\u7cfb\u7edf\u670d\u52a1&#xff08;\u4ee5\u6bcf 60 \u79d2\u6253\u5370\u65e5\u671f\u4e3a\u4f8b&#xff09;<br \/>\n# 1. \u51c6\u5907\u811a\u672c<br \/>\nsudo tee \/usr\/local\/bin\/date_demo.sh &lt;&gt;\/var\/log\/date_demo.log; sleep 60; done<br \/>\nEOF<br \/>\nsudo chmod x \/usr\/local\/bin\/date_demo.sh<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[58],"topic":[],"class_list":["post-65105","post","type-post","status-publish","format-standard","hentry","category-server","tag-linux"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>systemd\u7684\u4f7f\u7528\u548c\u7f16\u5199 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/65105.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"systemd\u7684\u4f7f\u7528\u548c\u7f16\u5199 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u4e00\u3001\u5148\u8dd1\u8d77\u6765 \u4efb\u610f\u811a\u672c\u505a\u6210\u7cfb\u7edf\u670d\u52a1&#xff08;\u4ee5\u6bcf 60 \u79d2\u6253\u5370\u65e5\u671f\u4e3a\u4f8b&#xff09; # 1. \u51c6\u5907\u811a\u672c sudo tee \/usr\/local\/bin\/date_demo.sh &lt;&gt;\/var\/log\/date_demo.log; sleep 60; done EOF sudo chmod x \/usr\/local\/bin\/date_demo.sh\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/65105.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-01-24T06:32:55+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/65105.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/65105.html\",\"name\":\"systemd\u7684\u4f7f\u7528\u548c\u7f16\u5199 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-01-24T06:32:55+00:00\",\"dateModified\":\"2026-01-24T06:32:55+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/65105.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/65105.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/65105.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"systemd\u7684\u4f7f\u7528\u548c\u7f16\u5199\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"systemd\u7684\u4f7f\u7528\u548c\u7f16\u5199 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/65105.html","og_locale":"zh_CN","og_type":"article","og_title":"systemd\u7684\u4f7f\u7528\u548c\u7f16\u5199 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u4e00\u3001\u5148\u8dd1\u8d77\u6765 \u4efb\u610f\u811a\u672c\u505a\u6210\u7cfb\u7edf\u670d\u52a1&#xff08;\u4ee5\u6bcf 60 \u79d2\u6253\u5370\u65e5\u671f\u4e3a\u4f8b&#xff09; # 1. \u51c6\u5907\u811a\u672c sudo tee \/usr\/local\/bin\/date_demo.sh &lt;&gt;\/var\/log\/date_demo.log; sleep 60; done EOF sudo chmod x \/usr\/local\/bin\/date_demo.sh","og_url":"https:\/\/www.wsisp.com\/helps\/65105.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-01-24T06:32:55+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/65105.html","url":"https:\/\/www.wsisp.com\/helps\/65105.html","name":"systemd\u7684\u4f7f\u7528\u548c\u7f16\u5199 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-01-24T06:32:55+00:00","dateModified":"2026-01-24T06:32:55+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/65105.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/65105.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/65105.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"systemd\u7684\u4f7f\u7528\u548c\u7f16\u5199"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/65105","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=65105"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/65105\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=65105"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=65105"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=65105"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=65105"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}