Changed Order of Nextcloud and Mozilla_pre

This commit is contained in:
Daniel Pätzold
2026-04-23 13:43:50 +02:00
parent 5cd143d8f0
commit fd3ab78f92
5 changed files with 16 additions and 4 deletions
@@ -26,15 +26,26 @@ fi
NC_PID=$( pgrep -u $USER nextcloud )
if [[ ! -z ${NC_PID} ]]; then
echo "Stopping Nextcloud with PID ${NC_PID}"
# Kill does not remove lockfiles in ~/.var/app/com.nextcloud.desktopclient.nextcloud/cache/tmp/ which will prevent next start
# kill ${NC_PID} && sleep 2
/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=nextcloud com.nextcloud.desktopclient.nextcloud --quit >/dev/null && sleep 2
/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=nextcloud com.nextcloud.desktopclient.nextcloud --quit >/dev/null
if [[ $? -ne 0 ]]; then
echo "Service could not be stopped, please check why."
exit 1
fi
sleep 0.5
fi
NC_PID=$( pgrep -u $USER nextcloud )
if [[ ! -z ${NC_PID} ]]; then
echo "Nextcloud still running with PID ${NC_PID}. Force stop"
# Kill does not remove lockfiles in ~/.var/app/com.nextcloud.desktopclient.nextcloud/cache/tmp/ which will prevent next start
kill ${NC_PID}
if [[ $? -ne 0 ]]; then
echo "Service could not be stopped, please check why."
exit 1
fi
sleep 0.5
rm -rif ${HOME}/.var/app/com.nextcloud.desktopclient.nextcloud/cache/temp/*
fi
sleep 0.5
#Check if Option is Configured to use Nextcloud Desktop Data- Sync
declare -p CLIENT_DATA_SYNC_DECLARE >/dev/null
@@ -73,6 +84,7 @@ for i in {0..99}; do
echo "Exec: ${SYNCCMD_HIDDENPW}"
# Due to Bugs in Nextcloud, autoprovisioning will only work when no configuration is existent. Therefore delete any exitsing configs that may be there
rm -rif ${HOME}/.var/app/com.nextcloud.desktopclient.nextcloud/data/Nextcloud
rm -rif ${HOME}/.var/app/com.nextcloud.desktopclient.nextcloud/config/Nextcloud
#Now, execute Nextcloud autoprovisionig
${SYNCCMD}
if [ $? -ne 0 ]; then