#!/usr/bin/env bash yq() { docker run --rm -i -v "${NGINX_PATH}:/workdir" mikefarah/yq:4 "$@" } config() { if [ "$(whoami)" = "root" ] then echo "It is not recommended to run this script as root. As a normal user, elevation will be prompted if needed." [[ "$YES_ALL" = "true" ]] && confirm="y" || read -rp "Continue anyway? (Y/n) " confirm " nginxpath /dev/null } docker_restart() { docker-compose -f "$NGINX_PATH/docker-compose.yml" restart "$SERVICE" } function trap_ctrlc() { echo "Ctrl^C, exiting..." exit 2 } upgrade_directive() { trap "trap_ctrlc" 2 # SIGINT config proceed_upgrade docker_restart printf "upgrade complete\n" } upgrade_directive "$@"