Skip to content

Instantly share code, notes, and snippets.

@feng-zhe
Created April 15, 2019 00:55
Show Gist options
  • Save feng-zhe/2d7af0e543ba1a9aa2e7590d5db46362 to your computer and use it in GitHub Desktop.
Save feng-zhe/2d7af0e543ba1a9aa2e7590d5db46362 to your computer and use it in GitHub Desktop.
If apt update is run, the scripts in /etc/apt/apt.conf.d/ also gets run.
So, if there is a job running apt update, we can put a file with following content under /etc/apt/apt.conf.d/:
APT::Update::Pre-Invoke {"/bin/bash /tmp/myshell.sh"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment