diff supervisoradmin/add.py @ 6:a1e06f4a8076

last minute tweaks
author Jeff Hammel <k0scist@gmail.com>
date Mon, 13 Apr 2015 13:04:11 -0700
parents d638b8578c78
children
line wrap: on
line diff
--- a/supervisoradmin/add.py	Mon Apr 13 12:33:44 2015 -0700
+++ b/supervisoradmin/add.py	Mon Apr 13 13:04:11 2015 -0700
@@ -21,7 +21,7 @@
 command={command}
 autorestart=true
 redirect_stderr=true
-startretries=3
+startretries={retries}
 stopasgroup=true
 stopwaitsecs=180
 user={user}
@@ -40,8 +40,11 @@
                           help="command to add")
         self.add_argument('-n', '--name', dest='name',
                           help="name of program; by default taken from command")
-        self.add_argument('-u', '--user', dest='user', default='ubuntu',
+        self.add_argument('-u', '--user', dest='user', default='root',
                           help="run program as this user [DEFAULT: %(default)s]")
+        self.add_argument('--retries', dest='retries',
+                          type=int, default=100,
+                          help="number of retries [DEFAULT: %(default)s]")
         self.add_argument('-o', '--output', dest='output',
                           type=argparse.FileType('w'),
                           nargs='?',
@@ -78,6 +81,7 @@
 
     output.write(template.format(name=name,
                                  user=options.user,
+                                 retries=options.retries,
                                  command=options.command))
     output.close()