mirror of
https://github.com/Akkadius/glass-isc-dhcp.git
synced 2025-07-29 16:45:48 +02:00
use hostname binary if we don't find an /etc/hostname
This commit is contained in:
parent
8b83cf4fed
commit
f32eefe31a
4
app.js
4
app.js
@ -109,7 +109,11 @@ global.socket_clients = 0;
|
|||||||
/**
|
/**
|
||||||
* Server hostname
|
* Server hostname
|
||||||
*/
|
*/
|
||||||
|
try {
|
||||||
global.host_name = execSync("cat /etc/hostname").toString().replace("\n", "");
|
global.host_name = execSync("cat /etc/hostname").toString().replace("\n", "");
|
||||||
|
} catch (e) {
|
||||||
|
global.host_name = execSync("/usr/bin/env hostname -s").toString().replace("\n", "");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pull in core handlers
|
* Pull in core handlers
|
||||||
|
Loading…
x
Reference in New Issue
Block a user