Trigger shell command after deploying container?

cmplieger

Dabbler
Joined
Aug 6, 2023
Messages
11
I have a container running qbittorrent to download linux ISOs, and I have a an external app called qbittools that runs a background process natively on the system and manages some of these downloads.
Whenever the qbittorrent container gets restarted (container update, or system reboot) the background command gets killed.

Is there a way to run a shell command that is dependent on a container launch? To be clear I don't want to run a command in the container on launch, but a general system shell command that triggers whenever a particular container gets booted up.

One workaround I found is to trigger the command as a cron job daily, which kinda solves the post-app-update trigger. Howver it does not sync with system reboots or when the container reboots due to another issue. It also creates a permanent notification stuck at 10% in the GUI as the process never finishes. Other ideas are welcome.
 
Last edited:
Top