#!/usr/bin/php getPlugins()["openvpn"] ?? null; if ($instance === null) { throw new RuntimeException("Plugin is not enabled"); } /** * @var Custom $instance */ $config = $instance->getRoutingConfig(); $outfile = $argv[1]; file_put_contents($outfile, implode("\n", $config)); } catch (Exception $e) { echo "\nError:" . $e->getMessage() . "\n"; exit(1); } exit(0);