mirror of
https://github.com/Kicksecure/security-misc.git
synced 2024-10-01 08:25:45 -04:00
28 lines
429 B
Bash
28 lines
429 B
Bash
#!/bin/sh
|
|
|
|
## Author: friedy10 friedrichdoku@gmail.com
|
|
|
|
|
|
ram_wipe_check_needshutdown() {
|
|
local wipe_action
|
|
wipe_action=$(getarg wiperamaction)
|
|
|
|
wait $(pgrep sdmem)
|
|
info "DONE WAITING..."
|
|
|
|
if [ "$wipe_action" = "reboot" ]; then
|
|
reboot -f
|
|
fi
|
|
|
|
if [ "$wipe_action" = "poweroff" ]; then
|
|
poweroff -f
|
|
fi
|
|
|
|
if [ "$wipe_action" = "halt" ]; then
|
|
halt -f
|
|
fi
|
|
}
|
|
|
|
ram_wipe_check_needshutdown
|
|
|