salt/pkg/debian/salt-common.postinst
Barney Sowood af9ee1a9c6 Update packages for python modules owned by root
Updates Debian and RPM packages so that /opt/saltstack/salt and the
python packages don't have to be owned by salt user.

It shouldn't be necessary for salt user, used to run salt-master to be
able to write/modify files in that directory hierarchy.

Add postinst scripts to call the python compileall module to create
byte-compiled python modules. This should preserve performance whilst
not requiring write access for salt user.

Also cleans up .pyc files and __pycache__ dirs on removal.
2023-08-16 15:53:29 -07:00

4 lines
92 B
Bash

#!/bin/sh
set -e
/opt/saltstack/salt/bin/python3 -m compileall -qq /opt/saltstack/salt/lib