Fedora 44, install/configure improvements, Nextcloud desktop client fixes #24
@@ -61,20 +61,22 @@ if [ "${#CLIENT_DATA_SYNC[@]}" -eq 0 ]; then
|
||||
fi
|
||||
|
||||
#Loop through all Entries
|
||||
_nc_first=1
|
||||
#_nc_first=1
|
||||
_nc_wipe_done=0
|
||||
for CLIENT_DATA_DECLARE_LINE in "${CLIENT_DATA_SYNC[@]}"; do
|
||||
eval "${CLIENT_DATA_DECLARE_LINE}"
|
||||
# echo "DEBUG user_run.sh(0020)_2: ${CLIENT_DATA_SYNC_LINE[@]}"
|
||||
# Now, CLIENT_DATA_SYNC_LINE[0] contains the local path and CLIENT_DATA_SYNC_LINE[1] contains the remote path
|
||||
if grep -q "localPath=${CLIENT_DATA_SYNC_LINE[0]}" "/${HOME}/.var/app/com.nextcloud.desktopclient.nextcloud/config/Nextcloud/nextcloud.cfg"; then
|
||||
echo "Already found configured local folder ${CLIENT_DATA_SYNC_LINE[0]} syncing with ${CLIENT_DATA_SYNC_LINE[1]} . Leaving it unchanged."
|
||||
# _nc_first=0
|
||||
else
|
||||
echo "Setup new sync from remote ${CLIENT_DATA_SYNC_LINE[1]} to local ${CLIENT_DATA_SYNC_LINE[0]}"
|
||||
if [ "${_nc_first}" -eq 0 ]; then
|
||||
echo "Due to Bug in Nextcloud Client, more than one synced Folder cannot be setup currently. Maybe in the Future."
|
||||
continue
|
||||
fi
|
||||
_nc_first=0
|
||||
# if [ "${_nc_first}" -eq 0 ]; then
|
||||
# echo "Due to Bug in Nextcloud Client, more than one synced Folder cannot be setup currently. Maybe in the Future."
|
||||
# continue
|
||||
# fi
|
||||
# _nc_first=0
|
||||
if [ -d "${CLIENT_DATA_SYNC_LINE[0]}" ]; then
|
||||
echo "Old unsynced Folder ${CLIENT_DATA_SYNC_LINE[0]} was found, renaming to ${CLIENT_DATA_SYNC_LINE[0]}_bak."
|
||||
mv "${CLIENT_DATA_SYNC_LINE[0]}" "${CLIENT_DATA_SYNC_LINE[0]}_bak"
|
||||
@@ -83,11 +85,14 @@ for CLIENT_DATA_DECLARE_LINE in "${CLIENT_DATA_SYNC[@]}"; do
|
||||
SYNCCMD="$BASECMD --userid ${DAVTOKEN_USER} --apppassword ${DAVTOKEN_PASS} --localdirpath ${CLIENT_DATA_SYNC_LINE[0]} --remotedirpath ${CLIENT_DATA_SYNC_LINE[1]} --serverurl https://${SERVERFQDN_NC}"
|
||||
SYNCCMD_HIDDENPW=$( echo "${SYNCCMD/${DAVTOKEN_PASS}/***HIDDEN***}" )
|
||||
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
|
||||
if [ "${_nc_wipe_done}" -eq 0 ]; then
|
||||
# Autoprovisioning only works when no configuration is existent — wipe once before first new setup
|
||||
rm -rif ${HOME}/.var/app/com.nextcloud.desktopclient.nextcloud/data/Nextcloud
|
||||
rm -rif ${HOME}/.var/app/com.nextcloud.desktopclient.nextcloud/config/Nextcloud
|
||||
_nc_wipe_done=1
|
||||
fi
|
||||
#Now, execute Nextcloud autoprovisionig
|
||||
${SYNCCMD}
|
||||
${SYNCCMD} && sleep 0.5
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "=========== !!! ========================"
|
||||
echo "Error: It looks like this did not work!"
|
||||
|
||||
Reference in New Issue
Block a user