fix: help entry, logging
This commit is contained in:
@ -16,6 +16,17 @@ module Main (call, main) where
|
||||
import Data.Either
|
||||
import Control.Monad.State hiding (liftIO)
|
||||
|
||||
help :: App String
|
||||
help = return $
|
||||
mkHelp "vsftpd [--options]"
|
||||
[ ("--directory <path>", "directory to serve, default: /srv/ftp/serverman/")
|
||||
, ("--user <username>", "ftp server username, default: serverman")
|
||||
, ("--password <password>", "ftp server password, default: serverman")
|
||||
, ("--port <num>", "ftp server port number, default: 20")
|
||||
, ("--anonymous", "allow anonymous connections, default: False")
|
||||
, ("--anonymous-write", "allow anonymous writes, default: False")
|
||||
, ("--writable", "allow writes to the ftp server, default: True")
|
||||
, ("--recreate-user", "if the specified username exists, delete and create it again, otherwise leave it intact")]
|
||||
|
||||
call :: Service -> App ()
|
||||
call s@(Service { name, version, service })= do
|
||||
|
@ -13,6 +13,7 @@ module Types ( FileSharingParams (..)
|
||||
toFSParams (("anonymous", Nothing):xs) = (toFSParams xs) { anonymous = True }
|
||||
toFSParams (("anonymous-write", Nothing):xs) = (toFSParams xs) { anonymousWrite = True }
|
||||
toFSParams (("recreate-user", Nothing):xs) = (toFSParams xs) { recreateUser = True }
|
||||
toFSParams (_:xs) = (toFSParams xs)
|
||||
toFSParams _ = def
|
||||
|
||||
data FileSharingParams = FileSharingParams { directory :: FilePath
|
||||
|
Reference in New Issue
Block a user