Shunze 學園 (http://www.shunze.info/forum/index.php)
|- Sophos XG (http://www.shunze.info/forum/board.php?boardid=36)
|-- 《分享》在開機時載入自訂服務 (http://www.shunze.info/forum/threadid.php?boardid=36&threadid=2105)


作者: shunze 發表時間: 2020-10-23, 17:06:

《分享》在開機時載入自訂服務

以Linux為底層的Sophos XG,有個開機時的startup script,
可以在此script中,寫入要載入的程式,來達到開機時載入自訂服務的功能。

編輯此script的流程如下。

  1. 以SSH軟體連線XG後,在主選單輸入5與3進入Advanced Shell。
    → 5.Device Management → 3.Advanced Shell

  2. 掛載根目錄為可讀寫權限。
    mount -o remount,rw /

  3. 編輯startup script customization_application_startup.sh
    vim /scripts/system/clientpref/customization_application_startup.sh

    把要載入或停止的服務加入此script中,
    例如我們要停用Web Proxy功能。
    service awarrenhttp:stop -ds nosync



  4. 存檔後,將根目錄掛載回唯讀狀態。
    mount -o remount,ro /

重開機後,會發現Web Proxy服務已自動被停用了。

Powered by: Burning Board 1.1.1 2001 by WoltLab
Taiwan Translation by Achi