You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

mnt.sh 524B

1234567891011121314151617181920
  1. #! /bin/bash
  2. #
  3. set -o allexport;
  4. source ./.env;
  5. set +o allexport
  6. docker_volumes_path=/home/$USER/.docker-data/volumes # volume_path=/var/lib/docker/volumes
  7. volume_src_path=$docker_volumes_path/$PREFIX-web/_data
  8. volume_dest_path=$PWD/volume
  9. if [ ! -d ./volume ]; then
  10. sudo -u $USER mkdir volume
  11. fi
  12. if [ -d ./volume ]; then
  13. if [ ! "$(ls -A ./volume)" ]; then
  14. /usr/bin/bindfs --force-user=$USER --force-group=$USER --create-for-user=www-data --create-for-group=www-data $volume_src_path $volume_dest_path
  15. fi
  16. fi