Skip to content

Commit

Permalink
fix: only run pre-start script if Tamr is not installed.
Browse files Browse the repository at this point in the history
  • Loading branch information
creynolds15 committed May 1, 2023
1 parent 56266f5 commit 786b44a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions templates/startup_script.sh.tmpl
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
#!/bin/bash

# run any custom commands to prepare VM
%{ if pre_start_script != "" }
${pre_start_script}
%{ endif }

# create tamr user, to run tamr
adduser --shell /bin/bash --home /home/tamr tamr

Expand All @@ -21,6 +16,10 @@ EOF

# check if tamr has been installed on the VM, if not download and install it
if [[ ! -f ${tamr_home_directory}/tamr/start.sh ]]; then
# run any custom commands to prepare VM
%{ if pre_start_script }
${pre_start_script}
%{ endif }
# download tamr install
sudo -S -u tamr -i /bin/bash -c 'gsutil cp ${tamr_zip_uri} ${tamr_home_directory}/unify.zip'
# unzip and install unify
Expand Down

0 comments on commit 786b44a

Please sign in to comment.