Shameless ripoff from the ff3l site2domain package
This commit is contained in:
parent
ef9fcc1222
commit
6187a611a1
2 changed files with 53 additions and 0 deletions
22
site2domain/luasrc/lib/gluon/upgrade/590-site2domain
Executable file
22
site2domain/luasrc/lib/gluon/upgrade/590-site2domain
Executable file
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/lua
|
||||
|
||||
local site = require 'gluon.site_config'
|
||||
local fs = require 'nixio.fs'
|
||||
|
||||
local sitecode = site.site_code
|
||||
|
||||
if sitecode == 'ffhh-sued' then
|
||||
domain = 'ffhh_sued'
|
||||
elseif sitecode == 'ffhh-west' then
|
||||
domain = 'ffhh_west'
|
||||
elseif sitecode == 'ffhh-nowe' then
|
||||
domain = 'ffhh_nowe'
|
||||
elseif sitecode == 'ffhh-ost' then
|
||||
domain = 'ffhh_ost'
|
||||
else
|
||||
domain = 'ffhh_nowe'
|
||||
end
|
||||
|
||||
local content = 'config core \'core\'\n\toption domain \'' .. domain .. '\'\n'
|
||||
|
||||
fs.writefile('/etc/config/gluon', content)
|
Loading…
Add table
Add a link
Reference in a new issue