usb canary only installs once

This commit is contained in:
Bob Mottram 2017-05-01 12:28:44 +01:00
parent c7bffe6a77
commit aabb4503f0
1 changed files with 6 additions and 0 deletions

View File

@ -552,8 +552,14 @@ function disable_null_passwords {
}
function create_usb_canary {
if [[ $(is_completed $FUNCNAME) == "1" ]]; then
return
fi
echo "ACTION==\"add\", KERNEL==\"sd*[!0-9]\", RUN+=\"/usr/local/bin/${PROJECT_NAME}-usb-canary\"" > /etc/udev/rules.d/00-usb-canary.rules
udevadm control --reload-rules
mark_completed $FUNCNAME
}
function setup_firewall {