Browse Source

Fixed ranger/ranger-agent helm charts main deployment scripts to include $USER

The "ranger" and "ranger-agent" user ids are hard coded in the helm
services scripts.  This prevents overriding them.  Changed both scripts
to use $USER instead of hard-coded values.

Change-Id: I2dd9a667c6b33575324c179a8c10c394bf07ab47
jmq 2 months ago
parent
commit
5fa68b90df

+ 1
- 1
ranger-agent/templates/bin/_ranger-agent-engine.sh.tpl View File

@@ -31,7 +31,7 @@ if [ -n "${SSH_KEY}" ] && [ -n "${SSH_KEY_CONFIGURATION}" ];then
31 31
     echo -e "${SSH_KEY}" >>${USER_HOME}/.ssh/${SSH_KEY_FILE}
32 32
     echo -e "${SSH_KEY_CONFIGURATION}" >>${USER_HOME}/.ssh/config
33 33
 
34
-    chown ranger_agent: ${USER_HOME}/.ssh
34
+    chown ${USER}: ${USER_HOME}/.ssh
35 35
     chmod 0700 -R ${USER_HOME}/.ssh
36 36
     chmod 0644 ${USER_HOME}/.ssh/config
37 37
     chmod 0600 ${USER_HOME}/.ssh/${SSH_KEY_FILE}

+ 2
- 2
ranger/templates/bin/_ranger-services.sh.tpl View File

@@ -31,7 +31,7 @@ if [ -n "${SSH_KEY}" ] && [ -n "${SSH_KEY_CONFIGURATION}" ];then
31 31
     echo -e "${SSH_KEY}" >>${USER_HOME}/.ssh/${SSH_KEY_FILE}
32 32
     echo -e "${SSH_KEY_CONFIGURATION}" >>${USER_HOME}/.ssh/config
33 33
 
34
-    chown ranger: ${USER_HOME}/.ssh
34
+    chown ${USER}: ${USER_HOME}/.ssh
35 35
     chmod 0700 -R ${USER_HOME}/.ssh
36 36
     chmod 0644 ${USER_HOME}/.ssh/config
37 37
     chmod 0600 ${USER_HOME}/.ssh/${SSH_KEY_FILE}
@@ -62,4 +62,4 @@ function stop() {
62 62
 
63 63
 }
64 64
 
65
-$COMMAND
65
+$COMMAND

Loading…
Cancel
Save