Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
wtf juniper. Anyone else find it irritating that junos pulse services and pulse tray must always running in OS X regardless of whether or not you're currently connected? Yeah, me too. I added the following as aliases to my shell to fix this problem. Be sure to change your /Library/LaunchAgents/net.juniper.pulsetray.plist file to reflect the `Kee…
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>net.juniper.pulsetray</string>
<key>LimitLoadToSessionType</key>
<array>
<string>Aqua</string>
</array>
<key>ProgramArguments</key>
<array>
<string>/Applications/Junos Pulse.app/Contents/Plugins/JamUI/PulseTray.app/Contents/MacOS/PulseTray</string>
</array>
<key>KeepAlive</key>
<false/>
<key>Disabled</key>
<false/>
</dict>
</plist>
#################################################################################
# start and stop the vpn from the command line from now on with these two commands
# or rename the aliases as you see fit.
#################################################################################
alias startvpn="sudo launchctl load -w /Library/LaunchDaemons/net.juniper.AccessService.plist; open -a '/Applications/Junos Pulse.app/Contents/Plugins/JamUI/PulseTray.app/Contents/MacOS/PulseTray'"
alias quitvpn="osascript -e 'tell application \"PulseTray.app\" to quit';sudo launchctl unload -w /Library/LaunchDaemons/net.juniper.AccessService.plist"
@mevanlc

This comment has been minimized.

Copy link

mevanlc commented Mar 27, 2014

I started working the same plists and executables out for myself, then thought "I bet I'm not the only one annoyed by Pulse's behavior, I'll try Google first." Your gist works perfectly for me. Thanks for sharing.

@herikwebb

This comment has been minimized.

Copy link

herikwebb commented Apr 2, 2014

This also really annoyed me. Very basic functionality that should've been included from the start. Thanks for this.

@mevanlc

This comment has been minimized.

Copy link

mevanlc commented Apr 11, 2014

My IT department just pushed out an upgrade of Pulse, and the original post no longer works for me. However, this does:

startvpn() {
        sudo launchctl load -w /Library/LaunchDaemons/net.juniper.AccessService.plist
        launchctl load -w /Library/LaunchAgents/net.juniper.pulsetray.plist
}
quitvpn() {
        launchctl unload -w /Library/LaunchAgents/net.juniper.pulsetray.plist
        sudo launchctl unload -w /Library/LaunchDaemons/net.juniper.AccessService.plist
        osascript -e 'tell application "Junos Pulse" to quit'
}
@cizko

This comment has been minimized.

Copy link

cizko commented Dec 22, 2014

I packed mevanics updated versions into two stand alone automator actions. Now I can click and run them from my dock. If anyone is interested, here is a download: http://www.assetive.com/downloads/PulseControl.zip
I also provided my untouched net.juniper.pulsetray.plist just for reference, since I did not need to change it at all.

@bombastian

This comment has been minimized.

Copy link

bombastian commented Sep 16, 2015

@cizko, thanks, works like a charm! Do you also have a similarly slick solution to the "enter admin password"-dialogue every time one runs start or stop?

@joedaniels29

This comment has been minimized.

Copy link

joedaniels29 commented Jun 18, 2016

I was so pissed when I couldn't get this thing to stop. Thank A bunch for this script its a wonder!!

@caillou

This comment has been minimized.

Copy link

caillou commented Apr 16, 2018

The latest update to Pulse Secure has moved files around. Here is the updated version for @mevanlc functions:

startvpn() {
    sudo launchctl load -w /Library/LaunchDaemons/net.pulsesecure.AccessService.plist
    launchctl load -w /Library/LaunchAgents/net.pulsesecure.pulsetray.plist
}
quitvpn() {
    launchctl unload -w /Library/LaunchAgents/net.pulsesecure.pulsetray.plist
    sudo launchctl unload -w /Library/LaunchDaemons/net.pulsesecure.AccessService.plist
    osascript -e 'tell application "Pulse Secure" to quit'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.