Ubuntu 16 set program autorun 一問,thx
本帖最後由 CyberSection 於 2019-3-22 17:50 編輯
我想部機一開機自動行wireshark(或Tshark),我已set 好command 放在Desktop 的wires.sh,及eit 了sudoers行sudo 無需打password,我經terminal 也可以call wires.sh 行到wireshark +autosave output file,但不明為何放落rc.local 或 crontab -e 後,每次開機都冇應,請問應該點set 去autorun 個.sh file ,thx
wires.sh 內容如下:
#!/bin/sh
wireshark -i eth0 -k -b filesize:100000 -b files:100 -w /home/user/Desktop/wire/user.pcap
exit 0
crontab 如下
@reboot /home/user/Desktop/wires.sh
rc.local 內容如下
/home/user/Desktop/wires.sh |
|
|