setup
A server config utility for nodejs Change: hostname, network interfaces, hosts and date/time
Features
- Set your network configuration. supports wireless adapters
- Change your hostname
- Set your hosts file (local dns)
- Modify server date/time and BIOS update
- Only works in linux :)
You need to install wpasupplicant for wireless options
Install
npm install setup
API
Networking
- setup.network.config(config) // Creates/returns a new network config file
- setup.network.save(config, outFile) // Saves the configuration
- setup.network.restart() // Restart network interfaces
Hostname
- setup.hosts.save(hostname, outFile)
Hosts (dns)
- setup.hosts.config(hosts)
- setup.hosts.save(config, outFile)
Date/Time
- setup.clock.set(time) // Set date/time and sync BIOS clock
Examples
Set network interfaces
This will set your wlan0 card to connect at boot, use dhcp for ip settings, e connect to the SSID 'myWirelessName'. Your ethernet card will have a static ip.
var setup = ; var config = setupnetwork; setupnetwork;
Change Hostname
setuphostname;
Change hosts
var hosts = setuphosts; setuphosts;