Posted on 05-18-2016 05:39 PM
Hey All!
So ForeScout downloads as a DMG for us which I can get to install properly on machines, but it will not auto launch.
If i install manually (a la double clicking it) it will go through the process, ask me to authenticate, then the icon will show up in the menu bar.
Yet a push only places the app in the applications folder.
I have tried doing a composer with the file change and everything, waited for the app to launch automatically and show up in the menu bar then pushing that package, but nothing helps.
Last ditch effort was to create a script that looks for the app and forces it to autolaunch, but that seems highly inefficient.
Any suggestions?
thanks!
Posted on 05-18-2016 06:53 PM
Try to add an:
open /Applications/ForeScout.app
To the policy via "Execute Command" under the "Files And Processes" heading.
See if that does it for you.
Posted on 05-19-2016 10:02 AM
rats, i was hoping it would be that easy.
the problem now is the following:
Posted on 05-19-2016 10:13 AM
ill try the following, looks promising
open -a Forescout SecureConnector
edit: osascript still bugs for credentials, even when opening it with sudo.
Posted on 05-25-2016 02:03 PM
hey @jreinstedler
you got any thoughts on this?
maybe share how you are deploying this now.
Posted on 07-08-2016 12:38 PM
Hey Justin,
Did you get anywhere with this? I'm running into the same issue.
osascript still bugs for credentials?
Thanks, James
Posted on 12-15-2016 08:04 AM
hey was anyone able to get this one working? I'm having the same issue.
Posted on 12-15-2016 08:14 PM
Yo MacDaddy's,
open /Applications/ForeScout.app did not work for me. I kept banging at it to try to get it to work.
I ended up using the package I made with Composer (Can't remember if I did anything special) and used AutoDMG with the OS 10.11.dmg from Apple and added my Forescout.pkg to the .dmg from the AutoDMG build. 10.11 worked fine with imaging. 10.12 is giving me issues in AutoDMG with the Forescout pkg. but it works as a package via Self Service now. Still testing 10.12 imaging.
Hope that helps. JW
Posted on 06-29-2017 01:58 PM
I dropped the following 2 commands in to Files&Processes, which launched the SC agent and authenticated for osascript silently, after installing the pkg of ForeScout SecureConnector.app created in Composer. Hopefully I quoted out the first command properly but please doublecheck (no errors when I ran it).
Hope this helps!
sudo osascript -e "do shell script "/Library/Application\ Support/ForeScout/startScDaemon.sh" with administrator privileges"
sudo launchctl load /Library/LaunchAgents/com.forescout.secureconnector.agent.plist
Posted on 07-10-2018 08:46 PM
Hi,
What is inside the ForeScout/startScDaemon.sh file?
Posted on 10-30-2020 01:35 AM
Hey, does anyone found a solution for that? I’m having the same issue...
Posted on 02-11-2021 11:53 AM
Hey, I found this script that fixed the issue for me, hope that will help you too:
!/bin/sh
Downloading OSX Update Package to /tmp on the host
curl -o /tmp/update.tgz http://YOUR_SERVER_NAME_OR_IP/SC_packages/update.tgz; sleep 3
Extracting update.tgz to /tmp
tar -zxvf /tmp/update.tgz -C /tmp; sleep 3
Installing SecureConnector as a Daemon/Dissolvable w/ visible/invisible menu bar icon
sudo -S /tmp/Update/Update.sh -t daemon -v 1; sleep 3
Checking/Starting processes in case they did not start on install
daemon_pid=ps auxww | grep -v grep | egrep "ForeScout SecureConnector.-daemon" | awk '{print $2}'
agent_pid=ps auxww | grep -v grep | egrep "ForeScout SecureConnector.-agent" | awk '{print $2}'
daemon_plist=/Library/LaunchDaemons/com.forescout.secureconnector.daemon.plist
agent_plist=/Library/LaunchAgents/com.forescout.secureconnector.agent.plist
if [[ -z "$daemon_pid" && -z "$agent_pid" ]]; then #Starting Daemon process launchctl unload $daemon_plist launchctl load $daemon_plist
Starting GUI process launchctl unload $agent_plist launchctl load $agent_plist
elif [[ ! -z "$daemon_pid" && -z "$agent_pid" ]]; then #Starting GUI process launchctl unload $agent_plist launchctl load $agent_plist
fi
Clean-up a little
sudo rm -rf /tmp/update.tgz /tmp/Update/