jgmdev / ddos-deflate

Fork of DDoS Deflate with fixes, improvements and new features.
Other
774 stars 263 forks source link

Check if root before install or uninstall #63

Closed Nardol closed 5 years ago

Nardol commented 5 years ago

Root privileges are required to install or uninstall DDOS-deflate. During this modification, a question came to my attention: why using Dash instead of Bash? Because we cannot use $EUID nor $UID in Dash, id -u looks like to make the job right.

jgmdev commented 5 years ago

On my system /bin/sh links to bash so I guess it depends on your distro, but it is better to use the id command like you did because that will always be available. Also as a side note it seems dash performs better than bash and consumes less memory.