Completely unattended local Blynk-Server setup

hi, i created this script to allow a completely unattended Blynk-Server setup on any Raspberry PI, and i tested it even on an Ubuntu 16.04 Xenial virtual machine… any hint to add more stuff is welcome, thanks
please read comments in there, too…


Well my RPi crashed from some form of data corruption again… it wasn’t running as a server, just a client, but I have been contemplating doing so (installing Blink Server) just to experiment with a 2nd server…

So, as a relative RPi noob, I am guessing that after I reload Raspbian on my SD card and setup the RPi, as normal for my network, Then I simply open up a terminal window and copy/paste this script into the CLI… Or is there more to it?

No, you download the script chmod +x and do ./ to execute it

Maybe you could combine this with my startup and update scripts for Unix?

Made a quick git repo:

Ok, I’ll take a look when back home…
Other way to run script:

And another:

sh rb (for a Pi reboot script)
sh sd (for a Pi shutdown script)

Even though the convention is to have a .sh file extension it’s not needed and if you are accessing the Pi via SSH from a Smartphone with a small virtual keyboard you want the command to be as short as possible :slight_smile:

Well, thank Heavens that is all cleared up for this poor Linux noob :confused:

So, I create a file with my favorite text editor NANO, copy paste all that stuff above into it, save it with a name that makes sense to me… like :wink: and then I can simply run it in one of about a million & 1/2 ways… e.g. sh CULBSS

Then sit back and watch another season of The Flash while this effortlessly installs my new Local Server. Almost too simple to mention :stuck_out_tongue_winking_eye:

1 Like

We serve to please :wink:


You have to name the script CULBSS not for this to work.

1 Like

Hmmm, if by that you mean it pleases you to drag me kicking and screaming into the wacky world of Linux… then… thanks?

Case in point…

I thought you meant using the extension was unnecessary… but you say I can’t name a file with the extension in order to run it that way?

But since I will be doing this with a big old keyboard, then I guess I DO need the .sh and then use something like bash… that acronym needs to be changed to :stuck_out_tongue:

That’s about right @Gunner but the sudo chmod +x per @Lichtsignaal is also critical.

Sooo… I run that after I create my file and copy/paste all that stuff? Does that “compile” it or something?

EDIT a Bit-o-Googleing seems to say that… “In short: chmod +x on a file only means, that you’ll make it executable.

I saw an episode of Flash where he fights with an other speedster… I accelerated play to 1.5x with VLC… A black hole appeared in my room…

1 Like

Yes after and it simply flags the file as executable, bit like changing a Windows file from .txt to .exe.

1 Like

Well, I ran it… we will see what happened, a black hole or two later :stuck_out_tongue_winking_eye:

@fragolinux So it seemed to do what it advertised… except it didn’t automatically run after reboot. Was it supposed to?

I can’t get back into your github page to double check the commands… nevermind :wink: I guess I could read my script file.

Check your rc.local file. It depends a bit on the Linux distro, but it should work after reboot.

My own startup script logs errors, so you could actually see what’s wrong, but you’d have to put the script in the correct rc.local or init.d folder and do update-rc.d to add it to startup :slight_smile:

(and change the COMMAND parameter to reflect the path to Java).

OK… auto run is manually set up, got it… that I know how to do.

Do you have a way to quickly update? Now that would make my lazy Linux life complete :stuck_out_tongue:

Yes, see my github link. There is an script :wink:

@fragolinux OK, I couldn’t see why it didn’t start… but after manually running the command I see this…

pi@raspberrypi:~ $ cd ~/Blynk && java -jar BlynkServer.jar &
[1] 471
pi@raspberrypi:~ $ -bash: line 13: java: command not found

And I suspect what happened (I will have to dig through the script to be sure) is similar to installing Blynk client on my old RPi Model B v2.0… I think the current, AKA “easy” way, of installing Java doesn’t work, due to older processor or something? (EDIT - nope… that was a NodeJS issue, not Java) My existing LS is installed on a Netbook running Mint, so I never had to run into this issue before.

Hmm… re-ran the script to look for errors and found these…

aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Raspbian/stretch

Package oracle-java8-installer is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'oracle-java8-installer' has no installation candidate

Oh well, guess I will have to figure out the alternate way to install Java on this flakey old pi.

Did you try this? Otherwise you can do it the hard way by downloading binaries and such from Oracle.