Laur IVAN

Rundeck – Speeding Up Even More the Cleaning Process

Posted by in IT, Tutorial

As I was running the script, I’ve noticed it ran very slow. I have left it for a few days to run (700K executions), I’ve noticed the speed increased linearly over time. As Rundeck has both DB and files to store its data, it looked to me that it was the file system which was the slow part. Sure enough, when I tried to access the directory where the execution data was stored, it was slow – 1.4M files would take a while to get organised :) To short out…read more

Fix *standard_init_linux.go:XXX: exec user process caused “no such file or directory”* Error

Posted by in IT, Tutorial

TL;DR: Use dos2unix While switching from Ubuntu to Alpine images, I’ve encountered the fillowing error: standard_init_linux.go:195: exec user process caused “no such file or directory” Quite unfortunate, because the script stayed in the same spot and only the image changed. After reading a bunch, I figured that it’s the fact that I’m editing on Windows and Alpine doesn’t seem to interpret #/bin/sh properly – adding a ^M :). The solution is to either fix the script locally or to format it as part of the docker build process. I chose…read more

Make a Shell Script with Arguments (Native)

Posted by in Software, Tutorial

I was building a bash script and I needed several arguments to make it more versatile (e.g. dry-run). The list of parameters was: help as -h or –help dry run ad -d or –dry-run to go through the motions without actually executing commands keep last N images ad -k num or –keep num to keep last N images (default 5) As one can see, none of the parameters are compulsory and have default values:

The snipped taking care of my input parameters is:

The idea is that we…read more

Change a django password manually

Posted by in Software

The other day I’ve been confronted with a strange situation: I forgot the admin password for a django application. I was playing with installing my own pypi repository, I’ve configured and deployed a test application and, after a couple of weeks, I forgot the password. I tried several times bu I knew that I used something silly and… unfortunate. Even worse, the user name I thought I used was not the one I had set up for the test. Oops :) After looking online for options I’ve found the following:…read more