Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
cprn17055yIf you didn't facepalm at this point - the script does this before anything else:
> pkill -f projectName
...so it's okay to call it like this:
> ./script.sh
...but it's not okay to call it like this:
> projectName/script.sh -
cprn17055y@NotWhoIUsedToBe It's not supposed to be "good". It's for old people who refuse to use docker and give bullshit excuses. Nevertheless, it's not hard to debug a script when the issue is glaring at you from the very first line of the code.
-
If my script was so bad it was killing itself i wouldn't blame the user. Own up to your own mistakes.
-
cprn17055y@NotWhoIUsedToBe Oh, I don't deny it's shitty. I meant it was written in haste and following the path of least resistance so... yeah, funny mistakes were bound to happen. Never meant to make it user-proof. Just didn't think I'll be the user.
-
xalys18825y@cprn yes, because old people don’t use docker and docker is necessary to run applications well </sarcasm>
-
xalys18825y@cprn why would you write a script if it’s not meant to be used? You couldn’t run it programmatically as it’d just kill itself
-
cprn17055y@xalys It was meant to be run by people who bugged me about making a run script that doesn't need Docker. And it works fine when used as per instructions, i.e. it's not part of the project and cannot be run within the project because it's supposed to kill all parts of said project so yes, when it itself is a part of the project it suicides. I don't know which part you don't get but I understand you felt offended because I said old people don't use Docker. Well, in my experience, they don't.
Guy: - "Your restart script doesn't work."
Me: - "What do you mean?"
Guy: - "It does nothing."
Me: - "It should kill every processes that's running within the project and start them again. Wait... Why do you terminate it?"
Guy: - "I don't. It just stops."
Me: - "It says `Terminated` here. You killed it. Just let it do it's job, don't kill it."
Guy: - "I'm not killing it! It just stops!"
(...two hours later...)
Me: - "Wait... Where do you run it from?"
Guy: - "What do you mean? I just run the script you gave me."
Me: - "Yeah, but where do you run it from? Where did you put it?"
Guy: - "It's part of the project so I put it in the project, d'oh!"
devrant
suicidal code