mirror of https://github.com/LemmyNet/lemmy.git
Fixing some things in the pictrs upgrade script.
parent
5872658f8c
commit
4332828dd7
|
@ -11,6 +11,10 @@ if [[ ! -f docker-compose.yml ]]; then
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Fixing pictrs permissions
|
||||||
|
mkdir -p volumes/pictrs
|
||||||
|
sudo chown -R 991:991 volumes/pictrs
|
||||||
|
|
||||||
echo "Restarting docker-compose, making sure that pictrs is started and pictshare is removed"
|
echo "Restarting docker-compose, making sure that pictrs is started and pictshare is removed"
|
||||||
docker-compose up -d --remove-orphans
|
docker-compose up -d --remove-orphans
|
||||||
|
|
||||||
|
@ -26,8 +30,8 @@ else
|
||||||
echo "Imagemagick already installed."
|
echo "Imagemagick already installed."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Stopping Lemmy so that users dont upload new images during the migration"
|
# echo "Stopping Lemmy so that users dont upload new images during the migration"
|
||||||
docker-compose stop lemmy
|
# docker-compose stop lemmy
|
||||||
|
|
||||||
echo "Importing pictshare images to pict-rs"
|
echo "Importing pictshare images to pict-rs"
|
||||||
pushd volumes/pictshare/
|
pushd volumes/pictshare/
|
||||||
|
@ -46,14 +50,14 @@ for image in $IMAGE_NAMES; do
|
||||||
echo -e "\nImporting $IMAGE_PATH"
|
echo -e "\nImporting $IMAGE_PATH"
|
||||||
ret=0
|
ret=0
|
||||||
curl --fail -F "images[]=@$IMAGE_PATH" http://127.0.0.1:8537/import || ret=$?
|
curl --fail -F "images[]=@$IMAGE_PATH" http://127.0.0.1:8537/import || ret=$?
|
||||||
if [[ $ret != 0 ]]; then
|
# if [[ $ret != 0 ]]; then
|
||||||
read -p "Failed to import $IMAGE_PATH, continue? " yn
|
# read -p "Failed to import $IMAGE_PATH, continue? " yn
|
||||||
case $yn in
|
# case $yn in
|
||||||
[Yy]* ) ;;
|
# [Yy]* ) ;;
|
||||||
[Nn]* ) exit;;
|
# [Nn]* ) exit;;
|
||||||
* ) exit;;
|
# * ) exit;;
|
||||||
esac
|
# esac
|
||||||
fi
|
# fi
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Fixing permissions on pictshare folder"
|
echo "Fixing permissions on pictshare folder"
|
||||||
|
|
Loading…
Reference in New Issue