def create_dhparam_if_necessary(): if exists(DHPARAM_PATH): print('dhparam file exists, skipping this step') return sudo('openssl dhparam -out %s 2048' % DHPARAM_PATH)