2017-04-18 76 views
0

在debian上安裝tripwire時,它會提示我是否要創建站點密鑰,本地密鑰,最後在完成時需要點擊「確定」。安裝tripwire無提示

有沒有一種方法可以安裝tripwire,不創建任何鍵,並在最後回答'ok'?

我正在使用Digital Ocean的'用戶數據',我複製了&粘貼了一堆bash命令,以便我可以快速部署新的墨滴。

編輯:

貌似我能靜音他們,但我仍然得到這個:

Setting up tripwire (2.4.2.2-4) ... 
chmod: cannot access ‘/etc/tripwire/site.key’: No such file or directory 
chmod: cannot access ‘/etc/tripwire/debian-512mb-nyc2-01-local.key’: No such file or directory 

我怎樣才能避免chmod: cannot access錯誤?

+0

如果你只是想擺脫錯誤輸出,那麼你可以重定向錯誤通道'的/ dev/null'。請嘗試'ls /絕對不存在'與'ls /絕對不存在的2>/dev/null'。 (這在cygwin的bash中適用於我。) – Scheff

回答

0

爲了僅僅抑制錯誤,將stderr重定向到你的userdata腳本中的/ dev/null。或者,如果您想將錯誤日誌重定向到文件,以便在啓動時進行檢查。

chmod /etc/tripwire/site.key 2>/dev/null 

chmod /etc/tripwire/site.key &>/tmp/chmod.log 
相關問題