config/scripts/0.start_dls.sh

35 lines
674 B
Bash
Raw Normal View History

#!/bin/bash
#
CTR_NAME=dls
#
#
set -xe
IMG=mcluseau/dkl-local-server:beta
start_store() {
set +e
docker stop $CTR_NAME &>/dev/null
docker wait $CTR_NAME &>/dev/null
set -e
docker run --rm --name $CTR_NAME --net host \
-e http_proxy=$http_proxy \
-e https_proxy=$https_proxy \
-e HTTP_PROXY=$HTTP_PROXY \
-e HTTPS_PROXY=$HTTPS_PROXY \
-v $ctxdir:/var/lib/direktil \
$IMG &
# -auto-unlock 'N0v!T'
sleep 2
}
source .common
command -v docker 1>/dev/null || perror "Docker is needed, please install it and run again."
systemctl is-active docker &>/dev/null || systemctl start docker
prereqs
start_store
unlock_store