Thursday, October 7, 2010

[update]chkroot

Don't know why I didn't think to do this before...

#!/bin/bash

[[ $(id -u) = 0 ]] && exit 0
[[ $1 = "-q" ]] || echo 'error: this script must be run with root privileges'
exit 1

No comments:

Post a Comment