Fixed browser profile bug, line breaks and exceptions in news_check

This commit is contained in:
2022-09-26 15:25:55 +02:00
parent db161e50c8
commit 9349b046d2
12 changed files with 150 additions and 319 deletions

34
launch
View File

@@ -10,43 +10,61 @@ export CONTAINER_DATA=/mnt/media/@Bulk/COSS/Downloads/coss_archiving
export UNAME=remy
export U_ID=1000
### Main use cases ###
if [[ $1 == "debug" ]]
then
export DEBUG=true
export HEADFULL=true
export CODE=./
export ENTRYPOINT=/bin/bash
# since service ports does not open ports on implicitly started containers, also start chrome:
docker compose up -d chrome
# since service ports does not open ports on implicitly started containers, also start geckodriver:
docker compose up -d geckodriver
elif [[ $1 == "production" ]]
then
export DEBUG=false
elif [[ $1 == "build" ]]
then
export DEBUG=false
docker compose build
shift
docker compose build "$@"
exit 0
### Manual Shutdown ###
elif [[ $1 == "down" ]]
then
docker compose stop
docker compose down -t 0
exit 0
elif [[ $1 == "init" ]]
### Edge cases -> for firefox ###
elif [[ $1 == "edit_profile" ]]
then
export CODE=./
export HEADFULL=true
docker compose up -d chrome
docker compose up -d geckodriver
sleep 5
docker compose exec chrome /bin/bash /code/chrome/change_configuration.sh
docker compose exec geckodriver /bin/bash /code/geckodriver/edit_profile.sh # inside the container
docker compose down -t 0
### Fallback ####
else
echo "Please specify the execution mode (debug/production/build) as the first argument"
exit 1
fi
shift # consumes the variable set in $1 so that $@ only contains the remaining arguments
docker compose run -it --service-ports "$@"
echo "Docker run finished, shutting down containers..."
docker compose stop
docker compose down -t 0
echo "Bye!"