:::
17. 修正 /etc/rc.local 無效問題
- 這是因為 Debian9、10之後,就不再支援 /etc/rc.local 的關係,故可以將之做為 service來啟用即可
- 建立 service
cat <<EOF >> /etc/systemd/system/rc-local.service [Unit] Description=/etc/rc.local ConditionPathExists=/etc/rc.local [Service] Type=forking ExecStart=/etc/rc.local start TimeoutSec=0 StandardOutput=tty RemainAfterExit=yes SysVStartPriority=99 [Install] WantedBy=multi-user.target EOF - 自行建立好需要的
/etc/rc.local內容,然後賦予執行權限chmod +x /etc/rc.local - 開啟自動啟用該 service
systemctl enable rc-local - 手動啟用方式:
systemctl start rc-local - 查看狀態
systemctl status rc-local
16. 大量建立帳號