epiccurious / jade-diy

Securely custody your bitcoin with Open Source software and generic hardware.
MIT No Attribution
20 stars 2 forks source link

Improve the check for root/sudo permission #14

Closed epiccurious closed 1 year ago

epiccurious commented 1 year ago

Currently, check for sudo is fairly headstrong: sudo echo -n.

Implement a more resilient solution like this:

if [ `whoami` != root ]; then
    echo Please run this script as root or using sudo
    exit
fi
epiccurious commented 1 year ago

Issue is fixed with PR #17.