Page MenuHomeDevCentral

run-by-realm.sh.jinja
No OneTemporary

run-by-realm.sh.jinja

#!/bin/sh
# -------------------------------------------------------------
# PaaS Docker
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# License: Trivial work, not eligible to copyright
# Source file: roles/paas-docker/wrappers/files/run-by-realm.sh
# Description: Redirect to a specific realm wrapper,
# customized with correct volumes and environment.
# Command: {{ service }}
# -------------------------------------------------------------
#
# <auto-generated>
# This file is managed by our rOPS SaltStack repository.
#
# Changes to this file may cause incorrect behavior
# and will be lost if the state is redeployed.
# </auto-generated>
if [ "$#" -lt 2 ]; then
echo "Usage: $0 <realm> <command> [arguments]" 1>&2;
exit 1
fi
REALM=$1
shift
if [ ! -d "/srv/{{ service }}/$REALM" ]; then
echo "Realm doesn't exist: $REALM" 1>&2;
exit 2
fi
DOCKER_RUN_SCRIPT=/srv/{{ service }}/$REALM/bin/{{ service }}
if [ ! -f "$DOCKER_RUN_SCRIPT" ]; then
echo "File doesn't exist: $DOCKER_RUN_SCRIPT" 1>&2;
echo "You can generate it running 'deploy-container {{ service }}' command on the Salt primary server. 1>&2;"
exit 4
fi
$DOCKER_RUN_SCRIPT "$@"

File Metadata

Mime Type
text/x-shellscript
Expires
Fri, May 15, 12:00 (1 d, 14 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3697145
Default Alt Text
run-by-realm.sh.jinja (1 KB)

Event Timeline