Switch Lora mode from console (SSH)

It is well documented how to set up gateways from web interface but,

Is it any documentation about how to configure Lora Network mode (switch from Network Server mode to Packet Forwarder and vice versa) from the console?

Packet_forwarder can be modified by change global_conf.json wich it seems is stored in /var/etc/ but this just changes the packet_forwarder itself, not the working mode.

Thank you in advance,