Browse Source

wrapper

merge-requests/68/head
Steven Foerster 5 years ago
parent
commit
baa2477d3d
  1. 6
      scripts/services/Mistborn-bitwarden.service
  2. 0
      scripts/subinstallers/extra/bitwarden.sh
  3. 0
      scripts/subinstallers/extra/guacamole.sh
  4. 0
      scripts/subinstallers/extra/jitsi.sh
  5. 0
      scripts/subinstallers/extra/nextcloud.sh
  6. 0
      scripts/subinstallers/extra/onlyoffice.sh
  7. 0
      scripts/subinstallers/extra/rocketchat.sh
  8. 20
      scripts/wrappers/mistborn_docker.sh

6
scripts/services/Mistborn-bitwarden.service

@ -10,13 +10,13 @@ User=root
Group=docker Group=docker
PermissionsStartOnly=true PermissionsStartOnly=true
# Shutdown container (if running) when unit is stopped # Shutdown container (if running) when unit is stopped
ExecStartPre=/usr/local/bin/docker-compose -f /opt/mistborn/extra/bitwarden.yml down ExecStartPre=/opt/mistborn/scripts/wrappers/mistborn_docker.sh bitwarden docker-compose -f /opt/mistborn/extra/bitwarden.yml down
ExecStartPre=/sbin/iptables -w -I DOCKER-USER -i DIFACE -p tcp --dport 3012 -j MISTBORN_LOG_DROP ExecStartPre=/sbin/iptables -w -I DOCKER-USER -i DIFACE -p tcp --dport 3012 -j MISTBORN_LOG_DROP
# Start container when unit is started # Start container when unit is started
ExecStart=/usr/local/bin/docker-compose -f /opt/mistborn/extra/bitwarden.yml up --build ExecStart=/opt/mistborn/scripts/wrappers/mistborn_docker.sh bitwarden docker-compose -f /opt/mistborn/extra/bitwarden.yml up --build
# Stop container when unit is stopped # Stop container when unit is stopped
ExecStop=/usr/local/bin/docker-compose -f /opt/mistborn/extra/bitwarden.yml down ExecStop=/opt/mistborn/scripts/wrappers/mistborn_docker.sh bitwarden docker-compose -f /opt/mistborn/extra/bitwarden.yml down
# Post stop # Post stop
ExecStopPost=-/sbin/iptables -D DOCKER-USER -i DIFACE -p tcp --dport 3012 -j MISTBORN_LOG_DROP ExecStopPost=-/sbin/iptables -D DOCKER-USER -i DIFACE -p tcp --dport 3012 -j MISTBORN_LOG_DROP

0
scripts/subinstallers/extras/bitwarden.sh → scripts/subinstallers/extra/bitwarden.sh

0
scripts/subinstallers/extras/guacamole.sh → scripts/subinstallers/extra/guacamole.sh

0
scripts/subinstallers/extras/jitsi.sh → scripts/subinstallers/extra/jitsi.sh

0
scripts/subinstallers/extras/nextcloud.sh → scripts/subinstallers/extra/nextcloud.sh

0
scripts/subinstallers/extras/onlyoffice.sh → scripts/subinstallers/extra/onlyoffice.sh

0
scripts/subinstallers/extras/rocketchat.sh → scripts/subinstallers/extra/rocketchat.sh

20
scripts/wrappers/mistborn_docker.sh

@ -0,0 +1,20 @@
#!/bin/bash
set -e
SERVICE="$1"
shift
export MISTBORN_HOME="/opt/mistborn"
# check and create file if needed
${MISTBORN_HOME}/scripts/env/check_env_file.sh ${SERVICE}
# read in variables
set -a
source ${MISTBORN_HOME}/.env
source ${MISTBORN_HOME}/.envs/.production/.${SERVICE}
set +a
echo $@
#exec "$@"
Loading…
Cancel
Save