Skip to content

Instantly share code, notes, and snippets.

@appunni-m
appunni-m / flower.sh
Last active November 16, 2017 13:09 — forked from rodrigogadea/flower.sh
Quick and Dirty bash script to daemonize Flower - i.e. /etc/init.d/flower
#!/bin/bash
NAME=flower
DESC="flower daemon"
USER=USER
VIRTUALENV=VIRTUALENV
PROJECT=PROJECT
# Name of the projects settings module.
export DJANGO_SETTINGS_MODULE="$PROJECT.settings"
aws-okta exec ${1-dev} -- /bin/bash -c 'printf "\n[default]\naws_access_key_id = ${AWS_ACCESS_KEY_ID}\naws_secret_access_key = ${AWS_SECRET_ACCESS_KEY}\naws_session_token = ${AWS_SESSION_TOKEN}" > ~/.aws/credentials'