Box Sync running script

Brianmarum
New Contributor

I need a script to check that Box Sync is running in the background. I have tried adding a few as extension attributes but they don't seem to work. I just need a report to see if the process is actually running or not.

Any ideas?

1 ACCEPTED SOLUTION

chriscollins
Valued Contributor

@Brianmarum

As a start, this works fine as an extension attribute:

#!/bin/bash

box_status=$(ps aux | grep "Box Sync Monitor" | grep -v "grep")

if [ ! -z "$box_status" ]; then
    echo "<result>Running</result>"
else
    echo "<result>Not Running</result>"
fi

View solution in original post

3 REPLIES 3

mark_mahabir
Valued Contributor

chriscollins
Valued Contributor

@Brianmarum

As a start, this works fine as an extension attribute:

#!/bin/bash

box_status=$(ps aux | grep "Box Sync Monitor" | grep -v "grep")

if [ ! -z "$box_status" ]; then
    echo "<result>Running</result>"
else
    echo "<result>Not Running</result>"
fi

Brianmarum
New Contributor

This worked perfectly. Thanks a million!