Swap curl for wget, invoke sudo in beginning. Script is now run as root by default.