small pixel drawing of a pufferfish lilp

README

lil process
------------

lilp watches git repositories for changes, clones them when they arrive,
and then runs arbitrary commands for you after the cloning is complete.

lilp is intended to be used like a service manager that is easy to keep
everything up to date with. lilp is especially nice to use with simple scripts,
statically compiled binaries, etc. you may also use it as a build service.

all logs for your processes go to /var/log/lilp/service-name/stdout and
/var/log/lilp/service-name/stderr.

                    lilp is stupid, but resilient
           if your process exits quickly, lilp will start it again immediately
         fork bombbbbb

                    lilp is asking to be hacked
     probably dont run lilp as root tbh
                                lilp provides no process isolation

                    lilp runs cron jobs better than cron tho
         i built lilp because im extremely lazy
            lilp was made to run binaries and scripts


install:

git clone https://git.j3s.sh/lilp
cd lilp && go build
mv lilp /usr/sbin/lilp
mkdir -p /etc/lilp /var/lib/lilp
cp contrib/example-config /etc/lilp/config

# systemd
cp contrib/lilp.service /etc/systemd/system/lilp.service
systemctl daemon-reload && systemctl start lilp

# openrc
cp contrib/lilp.initd /etc/init.d/lilp
service lilp start


config:

       definitions
clone = the git url to clone & watch. takes the ref argument.
ref   = the git ref (branch or tag) to clone + watch for changes
*run  = command to run (order matters) - use this to start your service / job

* at least 1 "run" statement is required, everything else is optional
if you leave "clone" out, no repo will be cloned or watched
if you leave "ref" out, the default ref will be "main"

the config format is very strict. it goes:

process "processname"
  definition "argument"

       example
# /etc/lilp/config
process "gitea"
  clone "https://github.com/go-gitea/gitea.git"
  ref "v1.16.1"
  # every "run" command is within the context of the cloned repo
  run "apt -q go || apt install go"
  run "go build"
  run "GITEA_PORT=8086 ./gitea"

process "backup"
  clone "https://git.j3s.sh/backup-stuff"
  ref "main"
  run "apt install rsync -y"
  run "./my-backup-script && sleep 8600"

process "loldockerino"
  run "docker run redis"

process "loldockerino"
  run "echo hi mom"