mirror of
https://github.com/simplex-chat/simplexmq.git
synced 2026-03-30 18:35:59 +00:00
22 lines
620 B
Haskell
22 lines
620 B
Haskell
module Main where
|
|
|
|
import Control.Logger.Simple
|
|
import Simplex.Messaging.Server.CLI (getEnvPath)
|
|
import Simplex.FileTransfer.Server.Main
|
|
|
|
defaultCfgPath :: FilePath
|
|
defaultCfgPath = "/etc/opt/simplex-xftp"
|
|
|
|
defaultLogPath :: FilePath
|
|
defaultLogPath = "/var/opt/simplex-xftp"
|
|
|
|
logCfg :: LogConfig
|
|
logCfg = LogConfig {lc_file = Nothing, lc_stderr = True}
|
|
|
|
main :: IO ()
|
|
main = do
|
|
setLogLevel LogDebug -- change to LogError in production
|
|
cfgPath <- getEnvPath "XFTP_SERVER_CFG_PATH" defaultCfgPath
|
|
logPath <- getEnvPath "XFTP_SERVER_LOG_PATH" defaultLogPath
|
|
withGlobalLogging logCfg $ xftpServerCLI cfgPath logPath
|