branch develop updated (be560b6 -> 60c6eb6)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository mum. See http://git.chorem.org/mum.git from be560b6 added AGPL licence file + updated debian packaging new 60c6eb6 install script creates mum user and group and add it to sudoers The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 60c6eb6b60f5f6575f1a50c7ce60d945c88208db Author: Alexis Guilbaud <guilbaud@codelutin.com> Date: Fri Jun 12 16:59:29 2015 +0200 install script creates mum user and group and add it to sudoers Summary of changes: app/module_loader.py | 9 ++++----- install.sh | 27 ++++++++++++++++++++++++++- 2 files changed, 30 insertions(+), 6 deletions(-) -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository mum. See http://git.chorem.org/mum.git commit 60c6eb6b60f5f6575f1a50c7ce60d945c88208db Author: Alexis Guilbaud <guilbaud@codelutin.com> Date: Fri Jun 12 16:59:29 2015 +0200 install script creates mum user and group and add it to sudoers --- app/module_loader.py | 9 ++++----- install.sh | 27 ++++++++++++++++++++++++++- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/app/module_loader.py b/app/module_loader.py index 3399d87..e99df41 100644 --- a/app/module_loader.py +++ b/app/module_loader.py @@ -314,7 +314,6 @@ class ModuleLoader: else: # to check this part, it is necessary to create a connection with the host... # getting all availiable connections for this part to check - compatible_conn = self.loaded_mod_moni[part_name]['compatible_conn'] conf_conn = self.db.get_conf_conn(addr_host) check_done = False i = 0 @@ -328,10 +327,10 @@ class ModuleLoader: # if this monitoring module is compatible for the current connection try: conn_inst = self.create_connection(addr_host, conf_conn[i]) - res_check = getattr(self.loaded_mod_moni[part_name]['modules'][mod]['imported'], - 'check')(conn_inst, - modules.ModuleNotCompatibleException, - subpart_list) + res_check = getattr(loaded_mod, + 'check')(conn_inst, + modules.ModuleNotCompatibleException, + subpart_list) dict_notif = self.db.add_check(conn_inst.get_addr_host(), part_name, res_check) self.run_notification_modules(dict_notif) check_done = True diff --git a/install.sh b/install.sh index 0eed87d..849306a 100755 --- a/install.sh +++ b/install.sh @@ -7,4 +7,29 @@ venv/bin/python --version >/dev/null 2>&1 || virtualenv venv sed -i 's/{{/[[/g' venv/bin/bottle.py sed -i 's/}}/]]/g' venv/bin/bottle.py sed -i 's/{{/[[/g' venv/lib/python2.7/site-packages/bottle.py -sed -i 's/}}/]]/g' venv/lib/python2.7/site-packages/bottle.py \ No newline at end of file +sed -i 's/}}/]]/g' venv/lib/python2.7/site-packages/bottle.py + +# creating mum user if doesn't exist +NB_MUM_USR=$(grep '^mum:' /etc/passwd | wc -l) +if [ $NB_MUM_USR -eq 0 ]; then + /usr/sbin/adduser mum --system + echo "mum user created" +fi + +# creating mum group if doesn't exist and adding mum user to it +NB_MUM_GRP=$(grep '^mum:' /etc/group | wc -l) +if [ $NB_MUM_GRP -eq 0 ]; then + /usr/sbin/addgroup mum --system + echo "mum group created" + /usr/sbin/usermod -a -G mum mum + echo "mum user added to mum group" +fi + +# adding mum group to sudoers if not registered +NB_MUM_SUDOERS=$(grep '^mum\s' /etc/sudoers | wc -l) +if [ $NB_MUM_SUDOERS -eq 0 ]; then + echo 'mum ALL= /usr/bin/nmap' >> /etc/sudoers + echo "mum added to sudoers" +fi + +exit 0; \ No newline at end of file -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm