OneDrive sync issues solved

Jens_Mansson
New Contributor

I noticed that whenever a client switches to another network then the OneDrive client stops syncing and doesnt really start to work until the app is restarted.
I solved this by running a policy with a script that simply just restarts the OneDrive app and triggers on network state change + cached on users mac's.

#!/bin/bash

process="OneDrive"
processrunning=$( ps axc | grep "${process}" )
if [ "$processrunning" != "" ]; then
    osascript -e 'tell application "OneDrive" to quit'
    open -a "OneDrive"
fi
0 REPLIES 0