packages feed

iptadmin 1.3.1 → 1.3.2

raw patch · 3 files changed

+16/−4 lines, 3 files

Files

Changelog view
@@ -1,3 +1,6 @@+iptadmin 1.3.2	  28.10.2012:+  * add --no-daemon option to run on centos 5+ iptadmin 1.3.1    23.10.2012:   * fix cabal description - add missing files to a hackage tarball (again) 
iptadmin.cabal view
@@ -1,5 +1,5 @@ Name:           iptadmin-Version:        1.3.1+Version:        1.3.2 Cabal-Version:  >= 1.4 Author:         Evgeny Tarasov Build-type:     Simple
src/Main.hs view
@@ -49,9 +49,14 @@             putStrLn $ "Iptadmin v" ++ ver ++ ", (C) Evgeny Tarasov 2011"             exitSuccess         ("--help":_) -> do-            putStrLn $ "usage: iptadmin (start|stop|restart)"+            putStrLn $ "usage: \niptadmin [--no-daemon] (start|stop|restart)\niptadmin --help | --version"             exitSuccess-        _ -> return ()+	["--no-daemon"] -> return ()+        [] -> return ()+        a -> do+            putStrLn $ "Unrecognized options: " ++ show a+            exitFailure+    let daemonize = not $ "--no-daemon" `elem` args      checkRunUnderRoot @@ -62,7 +67,11 @@             putStrLn e             exitFailure         Right config ->-            serviced $ simpleDaemon {program = startDaemon config, user = Just "root", syslogOptions = [PID, PERROR]}+            if daemonize+            then+                serviced $ simpleDaemon {program = startDaemon config, user = Just "root", syslogOptions = [PID, PERROR]}+            else+                withSyslog "iptadmin" [PID, PERROR] USER (startDaemon config ())  startDaemon :: IptAdminConfig -> a -> IO () startDaemon config _ = do