2021-05-26 20:11:53 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
if [[ $EUID -ne 0 ]]; then
|
|
|
|
echo "This script must be run as root"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
rm -rf /tmp/seahub
|
|
|
|
su - podman-seafile -c "podman cp seafile:/opt/seafile/seafile-server-latest/seahub /tmp"
|
|
|
|
mkdir -p /var/www/seafile/seafile-server-latest/
|
|
|
|
|
|
|
|
rm -rf /var/www/seafile/seafile-server-latest/seahub
|
|
|
|
mv -v /tmp/seahub /var/www/seafile/seafile-server-latest/
|
|
|
|
|
|
|
|
rm -rf /var/www/seafile/seahub-data
|
2021-09-18 09:38:09 +00:00
|
|
|
rsync -av --exclude 'thumbnail' ~podman-seafile/.local/share/containers/storage/volumes/podman-seafile_seafile-data/_data/seafile/seahub-data /var/www/seafile/
|
2021-05-26 20:11:53 +00:00
|
|
|
|
|
|
|
restorecon -RF /var/www/seafile
|
|
|
|
chown -R nginx:nginx /var/www/seafile
|