forked from ISTI-ansible-roles/ansible-roles
library/roles/smartgears/r_connector: New version that fixes the 'missing userconfig.csv' bug. The rusersadd script also readds the .Rprofile if it's missing.
This commit is contained in:
parent
c9a63a6330
commit
c2d493d83e
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
gcube_repository: 'gcube-staging'
|
||||
r_connector_install: False
|
||||
r_connector_ver: 2.1.2-4.3.0-144071
|
||||
r_connector_ver: 2.1.3-4.4.0-146364
|
||||
r_connector_name: r-connector
|
||||
r_connector_group_id: org.gcube.data.analysis
|
||||
r_connector_extension: war
|
||||
|
|
|
@ -10,11 +10,18 @@ ALLOW_LOCAL_USERS=1
|
|||
RPROFILE_FILE='{{ r_connector_rprofile_path }}/{{ r_connector_rprofile_filename }}'
|
||||
|
||||
if [ -d $HDIR ] ; then
|
||||
logger "$LOG_PREFIX user $HDIR directory exists"
|
||||
sudo /usr/bin/touch ${HDIR}/{{ r_connector_userconfig }}
|
||||
sudo /bin/chown ${USER}:{{ smartgears_user }} $HDIR/{{ r_connector_userconfig }}
|
||||
sudo /usr/bin/setfacl -m u:${USER}:rw,g:{{ smartgears_user }}:rw $HDIR/{{ r_connector_userconfig }}
|
||||
exit 0
|
||||
if id -u $USER >/dev/null 2>&1
|
||||
then
|
||||
logger "$LOG_PREFIX user $HDIR directory exists. Touching the userconfig.csv file to ensure that it exists with the correct permissions"
|
||||
sudo /usr/bin/touch ${HDIR}/{{ r_connector_userconfig }}
|
||||
sudo /bin/chown ${USER}:{{ smartgears_user }} $HDIR/{{ r_connector_userconfig }}
|
||||
sudo /usr/bin/setfacl -m u:${USER}:rw,g:{{ smartgears_user }}:rw $HDIR/{{ r_connector_userconfig }}
|
||||
sudo /bin/ln -s $RPROFILE_FILE $HDIR/{{ r_connector_rprofile_filename }}
|
||||
exit 0
|
||||
else
|
||||
logger "$LOG_PREFIX user $HDIR directory exists but the user not. Aborting."
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
if id -u $USER >/dev/null 2>&1
|
||||
then
|
||||
|
|
Loading…
Reference in New Issue