51
linuxxx
6y

Tried to modify a script again which pretty much installs a ready to use vpn server on a server.

Tried to modify it so that it takes arguments instead of manual input.

It is, fucking, yet again, quitting right after an apt install command.

Error exit code? Oh no, a perfectly fine fucking 0. Which means it ran successfully.

Successfully my fucking ass. You aren't even through half the motherfucking script!?

Fucking hell. Fuck my life sideways.

Comments
  • 2
    Bash, I presume?
  • 4
  • 0
    I like the label there.
  • 1
    @timlyrics What label where?
  • 1
    @linuxxx Can't help you, sorry :(

    My only comment would be that there is an exiting condition somewhere, but that's just stating the obvious :/
  • 3
    @linuxxx "fuck" => The tag
  • 6
    Well I highly respect you and your skills but after having seen that script, I must say in all honesty.. it's shit 😶
  • 1
    @Condor 😨
    Like in no comments and not readable?
  • 2
    @gitpush ehm, there are comments if memory serves me right.. But it's a convoluted mess that's a fork of an interactive script that somehow has been made manual (edit, automated.. blame the Duvel).. Needless to say, there's a lot of redundant code from the original interactive script in there.
  • 1
    @Condor oh I see, is it that long? I mean can it be rewritten ?
  • 3
    @gitpush 600-ish lines. So yeah pretty long for just OpenVPN. Just a wild guess, but if it were to be entirely rewritten I think it should be possible to shrink it down to 200 at most. So @linuxxx that's what I suggest you do with this thing.. Refactor the shit out of it 😉
  • 1
    @Condor isn't interactive and manual the same thing? if you're talking about angristans fork of nyrs script - both have the interactive walkthrough iirc
  • 1
    @Condor I'll use the chance to also mention that angristan even if hackily implemented a lot of changes to the fork that nyr is too spastic to merge or even consider, because of his elitist view of that install script.
  • 1
    @JoshBent blame the booze 😛 it's an interactive script that's been hacked into accepting command-line arguments. That way it could be automated.. But it's a bodge.
  • 1
    @JoshBent oh and I recall that it was actually the angristan script that's been forked!
  • 1
    @Condor wait, angristans fork has command line args implemented? lol, never saw that or used it, thought @linuxxx is adding it himself
  • 1
    @Condor wait.. you've got to be wrong, because linuxxx is clearly writing he wanted to add that function, which implies it doesn't exist yet, maybe lay the phone aside 😂
  • 1
    @JoshBent exactly, the fork from @linuxxx has it hacked in. Kinda dirty IMO, but somehow it works.. Until there's an update or any kind of system change, that is.
  • 1
    @Condor ah, now I get it, thought you were referencing angristans fork 😊
  • 2
    @JoshBent well that's what it looks to be developed against.. I mean it's got that repo credited and everything. Very different from the repos from the Python Lord! Proper crediting.. kinda rare these days.

    Anyway, that's where the script came from, and that's why I think that it's a hack. The original is highly interactive while the objective from @linuxxx was to automate it. That's where I'd have started from 0, especially since bash is the only language in which I can code reasonably well. But instead it's been that script, turned into a dirty hack that somehow accepts arguments over its interactive parts. Kinda like WordPress now that I think of it 🤔

    .. Anyway, I'll put my phone to the side for now 😛 the Duvel ain't helping and Collin Cunningham is about to show me some electronics stuff as a light-minded little refresher :3
  • 1
    @Condor tbh I don't think there's much needed to make it non interactive last time I've seen it and also maintaining it towards the upstream won't be hard either, as there's rarely major changes, so I don't see it as a wordpress implementation 😅
  • 1
    @JoshBent but the implementation of it is 😜
  • 1
    Use ansible, you will never go back to plain bash
  • 1
    @JoshBent This is the one from angristan, just want to automate it so it doesn't need input :)
  • 1
    @linuxxx what about
    $ script.sh < inputfile
    I know it's ugly, but it should work
  • 2
    @linuxxx I presume you’ve added “set -xe” to see where it presumably fails?
Add Comment