gluon-geolocator: refactoring and spellcheck
* rm irrelevant else states * fix print message for time stamp file
This commit is contained in:
parent
78b4396713
commit
2ef1df3084
@ -22,11 +22,10 @@ end
|
|||||||
if file_exsist(PID_PART) then
|
if file_exsist(PID_PART) then
|
||||||
io.stdout:write("The geolocator is still running.\n")
|
io.stdout:write("The geolocator is still running.\n")
|
||||||
os.exit(0)
|
os.exit(0)
|
||||||
else
|
end
|
||||||
if io.open(PID_PART, "w") == nil then
|
if io.open(PID_PART, "w") == nil then
|
||||||
io.stdout:write("Can`t create pid file on " .. PID_PART .. "\n")
|
io.stdout:write("Can`t create pid file on " .. PID_PART .. "\n")
|
||||||
os.exit(1)
|
os.exit(1)
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Program terminating function including removing of PID file
|
-- Program terminating function including removing of PID file
|
||||||
@ -126,9 +125,8 @@ end
|
|||||||
local timestap = io.open(TIME_STAMP, "w")
|
local timestap = io.open(TIME_STAMP, "w")
|
||||||
if timestap ~= nil then
|
if timestap ~= nil then
|
||||||
timestap:write(os.time())
|
timestap:write(os.time())
|
||||||
else
|
timestap:close()
|
||||||
io.stdout:write("Can`t create pid file on " .. TIME_STAMP .. "\n")
|
exit(0)
|
||||||
exit(1)
|
|
||||||
end
|
end
|
||||||
timestap:close()
|
io.stdout:write("Can`t create file on " .. TIME_STAMP .. "\n")
|
||||||
exit(0)
|
exit(1)
|
||||||
|
Loading…
Reference in New Issue
Block a user