Files
jugement_majoritaire/nextcloud_devenv/runit.sh
2026-03-12 14:45:17 +01:00

55 lines
788 B
Bash
Executable File

#!/bin/bash
# SPDX-FileCopyrightText: 2025 artlog@l0g.eu
# SPDX-License-Identifier: AGPL-3.0-or-later
#
toolsdir=lib
pushd $toolsdir >/dev/null
toolsdir=$(pwd)
source metascript.sh
popd >/dev/null
usage() {
cat runit.README.md
}
while [[ $# > 0 ]]
do
case "$1" in
up|down)
action=$1
;;
*)
parsemetaarg "$1"
;;
esac
shift
done
if [[ -z $action ]]
then
log_warn "Missing arguments"
usage
exit 0
fi
metarun=metarun
metasudo=sudo
enforcedir nextcloud-docker-dev exists
pushd nextcloud-docker-dev
if [[ $action = down ]]
then
$metarun podman-compose down
fi
services=(nextcloud proxy database-mysql)
if [[ $action == up ]]
then
$metarun podman-compose --env-file $(pwd)/.env $action "${services[@]}"
fi
popd