From 600e9ed1535793475354db62ed28919fb85ce5c2 Mon Sep 17 00:00:00 2001 From: Bohung Date: Tue, 15 Feb 2022 12:33:27 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4rc.local=20(=E5=B7=B2?= =?UTF-8?q?=E6=A3=84=E7=94=A8)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 50 -------------------------------------------------- 1 file changed, 50 deletions(-) diff --git a/README.md b/README.md index 4712097..987ca3e 100644 --- a/README.md +++ b/README.md @@ -307,11 +307,6 @@ $ sudo /usr/sbin/logrotate -f /etc/logrotate.conf #測試執行log壓縮程序 $ sudo vim /etc/init.d/orbit # 內容見附註 orbit $ sudo chmod 755 /etc/init.d/orbit $ update-rc.d orbit defaults -$ sudo vim /etc/init.d/rc.local #內容見附註 rc.local1 -$ sudo chmod 755 /etc/init.d/rc.local -$ sudo vim /etc/rc.local #內容見附註 rc.local -$ sudo chmod 755 /etc/rc.local -$ update-rc.d rc.local defaults $ sudo systemctl start orbit $ sudo systemctl enable mongod.service #ubuntu18.04以上適用(可在系統boot時,自動開啟mongo) $ sudo mv /etc/init.d/mongod /etc/systemd/system/ && sudo systemctl enable mongod.service @@ -553,51 +548,6 @@ setup) esac ``` -```txt -# 附註 rc.local1 -#! /bin/sh -### BEGIN INIT INFO -# Provides: rc.local -# Required-Start: $all -# Required-Stop: -# Default-Start: 2 3 4 5 -# Default-Stop: -# Short-Description: Run /etc/rc.local if it exist -### END INIT INFO - - -PATH=/sbin:/usr/sbin:/bin:/usr/bin - -. /lib/init/vars.sh -. /lib/lsb/init-functions - -do_start() { - if [ -x /etc/rc.local ]; then - [ "$VERBOSE" != no ] && log_begin_msg "Running local boot scripts (/etc/rc.local)" - /etc/rc.local - ES=$? - [ "$VERBOSE" != no ] && log_end_msg $ES - return $ES - fi -} - -case "$1" in - start) - do_start - ;; - restart|reload|force-reload) - echo "Error: argument '$1' not supported" >&2 - exit 3 - ;; - stop) - ;; - *) - echo "Usage: $0 start|stop" >&2 - exit 3 - ;; -esac -``` - ``` ### 五、網路設定