path

Clojure app setup for Auto-deploy with raw systemd

REPLACED [2022-11-11 Fri] The below is hopefully informative, but it actually only causes a thing to deploy once and then to re-deploy on system restart. For instructions that ACTUALLY auto-deploy, see https://tech.toryanderson.com/2022/11/11/systemd-devops-run-and-restart-services/ Updated [2022-09-19 Mon] Fixed error in deploy script that occurred if trying to restart but nothing was in the docket Updated [2022-07-13 Wed] Enhanced the server-side deploy script to operate more transparently if files are missing.

Should I put my systemd [Install] section in my .path file or my .service file?

Configuring systemd to redeploy my service when I commit a new source .jar file, I have a path file that goes along with the service and uses a PathChanged directive. The [Install] section should be in the path file, not the service file, but I notice this makes “systemctl enable MYAPP” impossible. It turns out that enable MYAPP assumes you mean MYAPP.service, so you actually just do systemctl enable MYAPP.path and you’re set.

Finding a File's Full Path in Linux

Particularly when coding and you need to make links to files or libraries, or if you use sym links to streamline your file system, it can be very useful to find the Fully Qualified Path (sometimes referred to as FQP) of a file. This command does the trick: readlink -f ./MyFile.txt