Skip to content

Commit

Permalink
Halbox project prompt (#98)
Browse files Browse the repository at this point in the history
* Update start.sh

* export google project to fill in start.sh template
  • Loading branch information
npmaile authored Jan 30, 2020
1 parent f330e06 commit 50b5261
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion halyard/halyard.tf
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ data "template_file" "profile_aliases" {
data "template_file" "start_script" {
template = file("./start.sh")

vars = {
vars = {
GOOGLE_PROJECT = var.gcp_project
USER = var.service_account_name
BUCKET = "${var.gcp_project}${var.bucket_name}"
PROJECT = var.gcp_project
Expand Down
3 changes: 3 additions & 0 deletions halyard/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ exec > $logfile 2>&1
echo "Setting up alias for sudo action."
runuser -l root -c 'echo "${PROFILE_ALIASES}" | base64 -d > /etc/profile.d/aliases.sh'

echo "Adding prompt including google project to .bashrc skeleton file"
runuser -l root -c 'echo "\[\e]0;\u@\h: \w\a\]\[\033[01;32m\]\u@${GOOGLE_PROJECT}\[\033[00m\]\[\033[01;34m\]:\w\[\033[00m\]$" >> /etc/skel/.bashrc"'

#CREATE USER
echo "Creating user"
useradd -s /bin/bash ${USER} -u 1978
Expand Down

0 comments on commit 50b5261

Please sign in to comment.