Error: must specify `lapis systemd service` as command
giann opened this issue · 3 comments
giann commented
Here the full error with --trace
:
Error: ...sr/local/share/lua/5.1/lapis/cmd/actions/systemd.lua:11: must specify `lapis systemd service` as command
stack traceback:
[C]: in function 'assert'
...sr/local/share/lua/5.1/lapis/cmd/actions/systemd.lua:11: in function <...sr/local/share/lua/5.1/lapis/cmd/actions/systemd.lua:9>
(tail call): ?
[C]: in function 'xpcall'
/usr/local/share/lua/5.1/lapis/cmd/actions.lua:323: in function 'execute'
...usr/local/lib/luarocks/rocks/lapis/1.5.1-1/bin/lapis:4: in main chunk
[C]: ?
leafo commented
did you update lapis recnetly? Are you sure you have most recent version of this repo installed?
giann commented
Yes i just installed it from luarocks the day of the issue
Deleted user commented
Quick workaround: /usr/local/share/lua/5.1/lapis/cmd/actions/systemd.lua, line 9
- function(self, flags, command, environment)
+ function(flags, command, environment)
Also, to fix LUA_PATH=nil in .service file, /usr/local/share/lua/5.1/lapis/systemd/service.lua, line 141
- local lua_path = os.getenv("LUA_PATH")
- local lua_cpath = os.getenv("LUA_CPATH")
+ local lua_path = os.getenv("LUA_PATH") or package.path
+ local lua_cpath = os.getenv("LUA_CPATH") or package.cpath
If /usr/lib/systemd/system
doesn't exist, create it with
mkdir -p /usr/lib/systemd/system
before --install
ing