Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
1
Task/Hostname/Lasso/hostname-1.lasso
Normal file
1
Task/Hostname/Lasso/hostname-1.lasso
Normal file
|
|
@ -0,0 +1 @@
|
|||
[web_request->httpHost]
|
||||
35
Task/Hostname/Lasso/hostname-2.lasso
Normal file
35
Task/Hostname/Lasso/hostname-2.lasso
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
define host_name => thread {
|
||||
|
||||
data
|
||||
public initiated::date, // when the thread was initiated. Most likely at Lasso server startup
|
||||
private hostname::string // as reported by the servers hostname
|
||||
|
||||
public onCreate() => {
|
||||
.reset
|
||||
}
|
||||
|
||||
public reset() => {
|
||||
if(lasso_version(-lassoplatform) >> 'Win') => {
|
||||
protect => {
|
||||
local(process = sys_process('cmd',(:'hostname.exe')))
|
||||
#process -> wait
|
||||
.hostname = string(#process -> readstring) -> trim&
|
||||
#process -> close
|
||||
}
|
||||
else
|
||||
protect => {
|
||||
local(process = sys_process('/bin/hostname'))
|
||||
#process -> wait
|
||||
.hostname = string(#process -> readstring) -> trim&
|
||||
#process -> close
|
||||
}
|
||||
}
|
||||
.initiated = date(date -> format(`yyyyMMddHHmmss`)) // need to set format to get rid of nasty hidden fractions of seconds
|
||||
.hostname -> size == 0 ? .hostname = 'undefined'
|
||||
}
|
||||
|
||||
public asString() => .hostname
|
||||
|
||||
}
|
||||
|
||||
host_name
|
||||
Loading…
Add table
Add a link
Reference in a new issue