chill wrote:
> Well indeed both of those details were worth investigating.
>
> 1) ngrok can be run as root by simply including the path to the yml
> configuration file with the --config option, e.g.:
> >
Code:
--------------------
> > ngrok start mediaservertunnel --config=/home/tc/.ngrok2/ngrok.yml >
/dev/null 2>&1 &
--------------------
> >
> I guess the script could have that option included in another
> variable, but for a standard pCP user who has carried out the
> authorisation as user 'tc', that /home/tc/.ngrok2/ngrok.yml file is
> fixed. This option means the whole section of the script that
> determines which user is calling ngrok is redundant.
>
> 2) It is quite simple to create your own .tcz package that just
> includes the ngrok executable, to be placed in /usr/local/bin/, and to
> have this package loaded at boot. The result is that ngrok is
> available in the user's executable path without taking up any space in
> the user's backup and without the need for an extra mount point. So
> since it's now in the path the startup script doesn't need to point to
> a specific copy of the executable, so
> >
Code:
--------------------
> > $ngrok_exec start mediaservertunnel --config=/home/tc/.ngrok2/ngrok.yml
> /dev/null 2>&1 &
--------------------
> >
> becomes
> >
Code:
--------------------
> > ngrok start mediaservertunnel --config=/home/tc/.ngrok2/ngrok.yml >
/dev/null 2>&1 &
--------------------
> >
>
> I could detail this process for the pCP-specific setup instructions,
> but I think it would be simpler to ask one of the pCP guys to make
> ngrok available in the standard repositories so that it can be
> installed like any other extension. I've made a request in the pCP7
> thread ('here'
> (https://forums.slimdevices.com/showthread.php?113512-ANNOUNCE-piCorePlayer-7-0-0&p=1006481&viewfull=1#post1006481)).
Excellent detective work ! In the service file for a Debian install, the
full path to the yml config is also specified so that makes sense
actually.
Lets see what the pCP guys come up with on the tcz. Would be really
great to lower the threshold for using ngrok as its great not only for
the skills but for any kind of secure remote access.
------------------------------------------------------------------------
philchillbill's Profile: http://forums.slimdevices.com/member.php?userid=68920
View this thread: http://forums.slimdevices.com/showthread.php?t=111016
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins