dis: Display initial statistics

This commit is contained in:
Tom Wiesing 2022-11-16 16:44:24 +01:00
parent 6d30a42e56
commit 964e74a9f4
No known key found for this signature in database
12 changed files with 252 additions and 7 deletions

View file

@ -1,12 +1,15 @@
#!/bin/bash
set -e
# This script is used to start a user shell inside the docker container.
# if the user is not www-data, re-invoke self as www-data
if [ "$USER" != "www-data" ]; then
sudo -u www-data /bin/bash /user_shell.sh "$@"
exit $?
fi
# Now start a shell in the proper path
cd "/var/www/data/project"
export "PATH=/var/www/data/project/vendor/bin:$PATH"
if [ "$USER" = "www-data" ]; then
/bin/bash "$@"
else
sudo -u www-data /bin/bash "$@"
fi;
# Re-invoke the actual command
/bin/bash "$@"