Commit c7d331f9 authored by Dmitry Blinov's avatar Dmitry Blinov Committed by Esteban Blanc

proviewR: fix shellinabox shell and HOME in WR

parent 36162818
......@@ -166,7 +166,7 @@ mode = 600
recipe = collective.recipe.template
input = inline:#!/bin/bash
umask 022
export HOME=${buildout:directory}
# include .bashrc if it exists
if [ -f ~/.bashrc ]; then
......@@ -216,9 +216,12 @@ mode = 0700
rendered = ${directory:bin}/shellinaboxd
template = inline:
#!/bin/sh
# XXXXXXXXXXXXXXXXXXXXXXX WORKAROUND XXXXXXXXXXXXXXXXXXXXXxx
export HOME=${buildout:directory}
# XXXXXXXXXXXXXXXXXXXXXXX WORKAROUND XXXXXXXXXXXXXXXXXXXXXxx
exec {{ shellinabox_bin }} \
--unixdomain-only=${:socket}:$(id -u):$(id -g):0600 \
--service "/:$(id -u):$(id -g):HOME:${shell-environment:shell} -l"
--service "/:$(id -u):$(id -g):${buildout:directory}:${shell-environment:shell} --rcfile ${bash-profile:output} -i"
[shellinabox-service]
recipe = slapos.cookbook:wrapper
......@@ -227,7 +230,8 @@ wrapper-path = ${directory:services}/shellinaboxd
hash-existing-files = ${buildout:directory}/software_release/buildout.cfg
[shell-environment]
shell = /bin/bash
#shell = /bin/bash
shell = {{ bash_location.replace('//','/') }}
[ca-nginx]
<= certificate-authority
......
......@@ -36,6 +36,7 @@ template = ${template-proview-r:location}/${template-proview-r:filename}
rendered = $${buildout:directory}/template-proview-r.cfg
extensions = jinja2.ext.do
extra-context =
raw bash_location ${bash:location}/bin/bash
raw novnc_location ${noVNC:location}
raw x11vnc_bin ${x11vnc:location}/bin/x11vnc
raw websockify_executable_location ${buildout:directory}/bin/websockify
......
......@@ -36,7 +36,7 @@ recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
output = ${buildout:directory}/template.cfg
mode = 0644
md5sum = 48cb44d73e1da468497af45cc37d5fa4
md5sum = e8aa863f96c8c2090842dd1f4afe28aa
[download-base]
recipe = hexagonit.recipe.download
......@@ -46,7 +46,7 @@ mode = 0644
[template-proview-r]
<= download-base
md5sum = 9f96bec6fd3097102ddf548012278d4b
md5sum = fcbc29709a7724309606d4d36a278b7a
filename = instance-proview-r.cfg.jinja2.in
[template-pwrp-profile]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment