Skip to main content
Question

OneDrive sync issues solved

  • April 1, 2016
  • 0 replies
  • 8 views

Forum|alt.badge.img+5

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