chill wrote: 
> Understandably, Paul doesn't want to include the ngrok executable as a
> package in pCP since it appears to be closed source.
> 
> So pCP users have a choice of where to put the ngrok executable:
> 
> 1) Place it in /home/tc/.local/bin
> Pro: This will mean that it's in the executable path so can be invoked
> without supplying its path.  
> Con: It will be included in the user's backup whenever pCP is backed up,
> so the backup will be large and slow.
> 
> 2) Place it in a folder on another drive, such as a third partition on
> the boot drive, e.g. /mnt/PCP_DATA
> Pro: This will be permanent storage, so won't be included in the user's
> backup
> Con1: This approach requires there to be another mounted partition, and
> it has to be reliably available when the ngrok command is invoked at
> boot
> Con2: This location will not be in the user's executable path, so the
> path to ngrok will have to be specified whenever it is invoked.
> 
> 3) Make your own 'ngrok.tcz' package so that the executable is loaded by
> the system at boot.  This is the 'best' option if you are comfortable
> with the steps below.
> Pro: ngrok will be available in the executable path without it being
> part of the user's backup
> Con: Making the package involves a few more steps (below), but they're
> straightforward, and 'do-and-forget'. 
> 
> 
> Steps for making ngrok.tcz:
> 
> 1)    Make this folder in your home directory:
>       cd ~
>       mkdir -p ngrok/usr/local/bin
>       
> 2)    Obtain the ngrok binary from https://ngrok.com/download.  Look for
> 'Linux (ARM)' for pCP 32-bit or 'LINUX (ARM64)' for pCP 64-bit
>       Extract the single binary file from the download and place it in the
> folder you've just made, /home/tc/ngrok/usr/local/bin
>       Your method for placing ngrok in that folder will depend on the tools
> you use.
>       For instance, FileZilla will allow you to upload the file from your
> computer to a destination on the RPi
>       
> 3)    Install the squashfs-tools.tcz extension from the pCP 'Extensions'
> page
> 
> 4)    Make 'ngrok.tcz' with: 
>       cd ~
>       mksquashfs ngrok/ ngrok.tcz
> 
> 5)    Copy the resulting ngrok.tcz to the 'tce/optional' folder with:
>       cp ngrok.tcz /mnt/mmcblk0p2/tce/optional 
>       If you have booted from USB, the 'tce' folder will be at a diffrent
> mount point, 
>       so replace 'mmcblk0p2' with your 'root' partition, e.g. 'sdb2'
> 
> 6)    Edit the onboot.lst in the tce folder to include ngrok.tcz      
>       e.g. use 'vi' on the pCP, or the linked file editor in FileZilla
> 
> 7)    Backup and reboot your pCP.  After rebooting you should now have the
> ngrok executable in /usr/local/bin.
>       Type 'which ngrok' to check.
>       
> 8)    Assuming that works, remove the ngrok folder and the ngrok.tcz from
> your home directory to minimise the size of your pCP backup.
>       cd ~
>       rm ngrok.tcz
>       rm -Ri ngrok/ # the -i option will prompt for every deletion. Check
> that it's doing what you expect before answering 'y'
>       Finally, backup pCP again, otherwise those deleted files will come back
> after a reboot!

Appreciate your looking into this topic. Is a prepared tcz file (2
versions for 32 and 64 bit) something that I can host on my site to
reduce the number of steps?


------------------------------------------------------------------------
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

Reply via email to