summaryrefslogtreecommitdiffstats
path: root/ipsilon/install
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2014-03-19 16:30:53 -0400
committerSimo Sorce <simo@redhat.com>2014-03-20 17:28:02 -0400
commitc7e6e4e3129120cc14cc051290de2d15627ef499 (patch)
tree877ef6d0a5a1916e47273f5814c0c50537cabdb3 /ipsilon/install
parent92d1e2131ecf37b0c6a67376abfe949afb4daed7 (diff)
downloadipsilon-c7e6e4e3129120cc14cc051290de2d15627ef499.tar.gz
ipsilon-c7e6e4e3129120cc14cc051290de2d15627ef499.tar.xz
ipsilon-c7e6e4e3129120cc14cc051290de2d15627ef499.zip
Add user configuration option
This allow to specifify what system user should be used to configure the ipsilon server to run as. Signed-off-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'ipsilon/install')
-rwxr-xr-xipsilon/install/server.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/ipsilon/install/server.py b/ipsilon/install/server.py
index 70b3caa..28e5bdb 100755
--- a/ipsilon/install/server.py
+++ b/ipsilon/install/server.py
@@ -23,6 +23,7 @@ import argparse
import cherrypy
import logging
import os
+import pwd
import shutil
import socket
import sys
@@ -129,6 +130,8 @@ def parse_args(plugins):
help='Comma separated list of login managers')
parser.add_argument('--hostname',
help="Machine's fully qualified host name")
+ parser.add_argument('--system-user', default='ipsilon',
+ help="User account used to run the server")
parser.add_argument('--ipa', choices=['yes', 'no'], default='yes',
help='Detect and use an IPA server for authentication')
parser.add_argument('--uninstall', action='store_true',
@@ -152,6 +155,11 @@ def parse_args(plugins):
if len(args['hostname'].split('.')) < 2:
raise ConfigurationError('Hostname: %s is not a FQDN')
+ try:
+ pwd.getpwnam(args['system_user'])
+ except KeyError:
+ raise ConfigurationError('User: %s not found on the system')
+
if args['lm_order'] is None:
args['lm_order'] = []
for name in lms: