SHARE
TWEET

Untitled

a guest Apr 23rd, 2015 342 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. description "Initialize Project Environment"
  2. author "Torkel Lyng"
  3.  
  4. start on runlevel [2345]
  5.  
  6. emits project-environment-bootstrap project-environment-configure
  7.  
  8. task
  9.  
  10. script
  11.     [ -f /etc/project-env ] && . /etc/project-env
  12.  
  13.     # Bootstrap the environment
  14.     logger -i -t "project-environment" "bootstrapping environment"
  15.     initctl emit project-environment-bootstrap \
  16.         project_name=${DEPLOYMENT_PROJECT} \
  17.         project_role=${DEPLOYMENT_ROLE} \
  18.         project_environment=${DEPLOYMENT_ENVIRONMENT} \
  19.         project_version=${DEPLOYMENT_VERSION}
  20.  
  21.     # Configure the environment
  22.     logger -i -t "project-environment" "configure environment"
  23.     initctl emit project-environment-configure \
  24.         project_name=${DEPLOYMENT_PROJECT} \
  25.         project_role=${DEPLOYMENT_ROLE} \
  26.         project_environment=${DEPLOYMENT_ENVIRONMENT} \
  27.         project_version=${DEPLOYMENT_VERSION}
  28.  
  29.     # Start services
  30.     logger -i -t "project-environment" "starting services"
  31.     initctl emit --no-wait project-environment-ready \
  32.         project_name=${DEPLOYMENT_PROJECT} \
  33.         project_role=${DEPLOYMENT_ROLE} \
  34.         project_environment=${DEPLOYMENT_ENVIRONMENT} \
  35.         project_version=${DEPLOYMENT_VERSION}
  36. end script
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top