SPB Git

Repository Public

gestionnaire-essai.sh 2.9 KB 60 lines shellscript

1#!/usr/bin/env bash2# =============================================================================3#                  SP BOUCHER | INFRASTRUCTURE & AUTOMATION4#             ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING5# =============================================================================6#7# Project          : Lou-Ka iOS8# File             : Scripts/gestionnaire-essai.sh9# Description      : crée en préproduction un compte de gestionnaire d'essai10#                    (entreprise « cogir »), le fait approuver sur le nœud, et11#                    range ses identifiants dans build/gestionnaire.env12#                    (dossier ignoré par git) pour les tests de messagerie. À13#                    relancer si le compte a disparu. usage :14#                    gestionnaire-essai.sh15# Module           : Scripts16# Repository       : https://git.spboucher.ai/lou-ka-ios-v317# Project Website  : https://www.lou-ka.com18# Created          : 2026-11-3019# Last Modified    : 2026-11-3020#21# Author           : Simon-Pierre Boucher22# Position         : Professor of Finance23# Institution      : Université du Québec en Outaouais (UQO)24# Organization     : SP Boucher25# Website          : https://spboucher.ai26# Git              : https://git.spboucher.ai27#28# Preferred Contact: support@spboucher.ai29# Technical Contact: dev@spboucher.ai30# Security/Admin   : admin@spboucher.ai31#32# Copyright (c) 202633# Simon-Pierre Boucher34# All rights reserved where applicable. This file is governed by the35# applicable project license, copyright notices and relevant law.36# Existing third-party rights and notices remain unaffected.37#38# License          : None specified (no license file in this repository)39#40# Do not embed credentials, private keys, access tokens,41# certificates or confidential personal information.42#43# =============================================================================44# END OF SP BOUCHER SOURCE HEADER45# =============================================================================4647set -euo pipefail48cd "$(dirname "$0")/.."49B="${LOUKA_ACCOUNT_API:-https://louka-comptes.51-161-112-61.sslip.io}"50GE="essai-ios-$(date +%s)@cogir.net"51GPW="Sapin-Bleu-$((RANDOM % 9000 + 1000))-g"52H=(-H "Content-Type: application/json" -H "X-LouKa-Client: ios")53curl -fsS -m 15 -o /dev/null -X POST "$B/api/v3/compte/inscription" "${H[@]}" \54  -d "{\"role\":\"gestionnaire\",\"manager_source_id\":\"cogir\",\"name\":\"Essai Gestion\",\"email\":\"$GE\",\"password\":\"$GPW\"}"55curl -fsS -m 15 -o /dev/null -X POST "$B/api/v3/compte/verification" "${H[@]}" -d "{\"email\":\"$GE\",\"code\":\"424242\"}"56ssh -o ConnectTimeout=15 M4M64a "cd ~/apps/lou-ka-v3-comptes && ../lou-ka-v3/.venv/bin/python run.py pro-decision $GE approuver" | tail -157mkdir -p build58( umask 077; printf 'GE=%s\nGPW=%s\n' "$GE" "$GPW" > build/gestionnaire.env )59echo "gestionnaire d'essai : $GE (identifiants dans build/gestionnaire.env)"60
Files main
Menu

Theme