Delete lua_script/init.lua
This commit is contained in:
parent
1f9d1c3aad
commit
8b5c4f0761
@ -1,36 +0,0 @@
|
|||||||
-- lua_scripts/init.lua
|
|
||||||
-- Инициализационный Lua скрипт для Futriix Server
|
|
||||||
-- Автоматически выполняется при старте сервера для настройки окружения
|
|
||||||
|
|
||||||
falcot_log("Initializing Futriix Server v1.0.0 with Lua scripting...")
|
|
||||||
|
|
||||||
-- Создаем глобальные функции для бэкапов
|
|
||||||
function futriix.engine.backup.start()
|
|
||||||
return futriix_db.backup_start()
|
|
||||||
end
|
|
||||||
|
|
||||||
function futriix.engine.backup.restore(backup_path)
|
|
||||||
return futriix_db.backup_restore(backup_path)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Пример создания коллекции при старте с временной меткой
|
|
||||||
local current_timestamp = os.date("%d-%m-%Y")
|
|
||||||
futriix_db.create("system_config", '{"key": "server_start_time", "value": "' .. current_timestamp .. '"}')
|
|
||||||
falcot_log("System configuration initialized with timestamp: " .. current_timestamp)
|
|
||||||
|
|
||||||
-- Пример ACL проверки
|
|
||||||
function check_access(ip_address)
|
|
||||||
if ip_address == "127.0.0.1" then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Логирование информации о кластере
|
|
||||||
if futriix.cluster.enabled then
|
|
||||||
falcot_log("Cluster mode enabled: " .. futriix.cluster.name)
|
|
||||||
else
|
|
||||||
falcot_log("Standalone mode enabled")
|
|
||||||
end
|
|
||||||
|
|
||||||
falcot_log("Lua initialization script completed")
|
|
||||||
Loading…
x
Reference in New Issue
Block a user