-- 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")