Skip to content

Commit

Permalink
Merge pull request #35 from Hawk777/fix-syslog-without-hostname
Browse files Browse the repository at this point in the history
Fix syslog running with HOSTNAME unset
  • Loading branch information
XeonSquared authored Jul 27, 2023
2 parents 23915e4 + 4f0efd2 commit 98fbf0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions syslog/OpenOS/etc/rc.d/syslogd.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ local serial = require "serialization"
local computer = require "computer"
local havenet, net = pcall(require,"minitel")

local hostname = os.getenv("HOSTNAME") or computer.address:sub(1,8)
local hostname = os.getenv("HOSTNAME") or computer.address():sub(1,8)
local cfg = {}
cfg.port = 514
cfg.relay = false
Expand Down Expand Up @@ -41,7 +41,7 @@ function reload()
f:close()
end
end
hostname = os.getenv("HOSTNAME") or computer.address:sub(1,8)
hostname = os.getenv("HOSTNAME") or computer.address():sub(1,8)
end

local function wentry(_,msg,level,service,host)
Expand Down

0 comments on commit 98fbf0e

Please sign in to comment.