fix up a couple items
@@ -23,7 +23,7 @@ Options:
-i, info/status display current status of the Poseidon service
-l, logs display the information logs about what Poseidon is doing
-L, system-logs display the system logs related to Poseidon
- -p, pcap process a PCAP file or directory of PCAPs
+ -p, pcap process a PCAP file or directory of PCAPs (uses sudo)
-R, reconfig reconfigures all settings (uses sudo, will restart the Poseidon service)
-r, restart restart the Poseidon service (uses sudo)
-s, start start the Poseidon service (uses sudo)
@@ -89,14 +89,13 @@ function check_args()
echo "Please supply the path to the PCAP(s) to process."
else
if [[ -d "$2" ]]; then
- echo "$2 is a directory"
for line in $(find "$2" -name '*.pcap'); do
filename=$(echo "$line" | rev | cut -d/ -f1 | rev)
- cp "$2" /opt/vent_files/trace_"$filename"
+ sudo cp "$line" /opt/vent_files/trace_"$filename"
done
elif [[ -f "$2" ]]; then
filename=$(echo "$2" | rev | cut -d/ -f1 | rev)
- cp "$2" /opt/vent_files/trace_"$filename"
+ sudo cp "$2" /opt/vent_files/trace_"$filename"
else
echo "$2 is not a valid path."
fi
