OpenConnect (OSX APP)

If it’s gets implemented it should work for almost any device such as OSX, PC, Linux, synology etc.

There is a whole host of reasons why it is unlikely to be implemented into the main code at the moment.

Something similar was discussed near the inception of PlexConnect but it has a couple of gotchas eg what if port 80 is already being used, plus this implementation is pretty rough round the edges e.g. what the hell does bash vs non-bash mean to even a technical user.

Not that I am knocking the effort putting it together as is :wink:

Bash is the standard PlexConnect.bash plist. PlexConnect non-bash is for other Mac releases where the bash may not work like 10.7 and below. I for one have issues where the bash doesn’t work so I use the non-bash that doesn’t have network readiness prior to launch. Baa and I are looking into a solution so we can just use the Plexconnect.bash which would be ideal to simplify the code immensely for OpenConnect and WebConnect. When I run the bash it doesn’t work for me @ boot so I have to resort to the non-bash to load plexConnect @ boot.


*Update I fixed the plexconnect bash to work on any version of OSX here is the updated code:


#!/bin/bash


#

OSX PlexConnect startup script

#

Package

APPNAME=“PlexConnect.py”


sleep 1

Run in a loop until successfully connected to the internet

until wget -q -O - http://www.google.com | grep Lucky > /dev/null; do

sleep 10

done

exec $1&

./${APPNAME}

Determine if the network is up by looking for any non-loopback network interfaces.

Currently supports only OSX “Darwin” OS

CheckForNetwork()

{

local test


if [ -z “${NETWORKUP:=}” ]; then

test=$(ifconfig -a inet 2>/dev/null | sed -n -e ‘/127.0.0.1/d’ -e ‘/0.0.0.0/d’ -e ‘/inet/p’ | wc -l)

if [ “${test}” -gt 0 ]; then

NETWORKUP="-YES-"

else

NETWORKUP="-NO-"

fi

fi

}


Wait for network readiness.

This avoids the binding of PlexConnect to the loopback address which may otherwise occur

if the bash script is called from a LaunchDaemon/plist file at boot time.

CheckForNetwork

while [ “${NETWORKUP}” != “-YES-” ]

do

sleep 5

NETWORKUP=

CheckForNetwork

done


Start PlexConnect

./${APPNAME}

I don’t think hackint0sh is a dirty word :wink:

The problem with detecting that is that you could make a call on eg the BIOS manufacturer but it might fail if someone had been trying to fake it to be as vanilla as possible, BIOS might be a good one to try with though.

I was also trying to make a point around user friendliness as well though, sometimes it is hard to distance yourself from something you created and look at it from a user’s point of view (especially the least technical users).

If there was a way to get the PlexConnect bash to work for all variations of OSX be it mac, non mac or older OSX versions this would be ideal. I’m thinking of a wget if then statement to rely on google then fall back to the standard network readiness code as a all in one bash solution. I created one in my ios jailbreak folder but haven’t attempted to implement it yet. I’m taking a break for a bit but. I will see what I can come up with to solve this for all universal OSX solution.

I have just fixed WebConnect & OpenConnect to only use the PlexConnect.bash script and found out what the error was that was preventing the code from executing at boot. By simply adding this simple command before the network readiness code in PlexConnect.bash I was able to get the PlexConnect.bash plist functionality to work on other versions of OSX as well:


sleep 1


I was also able to strip out the non-bash portion from WebConnect & OpenConnect to make both easier to use. Here is a new screenshot of the new WebConnect now that it has been simplified:





As usual grab follow the OP to update to the latest code/app and follow the readme.txt for full instructions.

did someone test openconnect on OS Lion ??

i definitively couldn't start plexify on 10.7.5 (don't know why) so i'm searching for an alternative like OC ^^

thanks for the job and yours answers :-)

did someone test openconnect on OS Lion ??

i definitively couldn't start plexify on 10.7.5 (don't know why) so i'm searching for an alternative like OC ^^

thanks for the job and yours answers :-)

What computer do you have? Did you consider updating to lion?

What computer do you have? Did you consider updating to lion?

It is a macmini from 2007 (2,16GHz Core 2 duo, 10.7.5, PMS 0.9.8.18.290) , maybe the problem comes from there :-(

i have the latest version of PMS on, idem for plexify, everything is working well using classic method python. i just wanted to automate in case of reboot/shutdown

and everything is ok with a MBP retina 15 2013 with all same softwares on, so i think it is maybe the macmini which is too old ^^'

>> just wanted to automate in case of reboot/shutdown

launchctl daemon?

Congratulations Wahlman.

I am not able to do this righ. I followed step 1 but have issue at step 2

nboe4h.jpg

This is first method I employed. but clearly not right.

Then i pulled terminal at folder level of update/OSX and gave command 

2gxqy48.jpg

So still wrong.. what is I need to do?

chmod +x install.bash

I am not able to do this righ. I followed step 1 but have issue at step 2

nboe4h.jpg

This is first method I employed. but clearly not right.

Then i pulled terminal at folder level of update/OSX and gave command 

2gxqy48.jpg

So still wrong.. what is I need to do?

 
 
chmod +x install.bash
He just put it in the readme.txt just now
He forgot to do it.
 
 
chmod +x install.bash
He just put it in the readme.txt just now
He forgot to do it.

Okay, I did that and now I get this

2afk67o.jpg

Okay, I did that and now I get this

2afk67o.jpg

Make sure you're in the /update/osx/ directory. 

There is no <!doctype> HTML in my install.bash, I not know where you are but its not my install.bash…type this to see where you are at in terminal:


ls

Make sure you're in the /update/osx/ directory. 

yeah , infact i launched terminal at folder level of update/osx

yeah , infact i launched terminal at folder level of update/osx

sorry man. gotta wait for wahlman.