If i understand correctly,
- You restart app: your package is available
- You deploy your app: package not found
It's pretty weird...
When you use the package, you know where is installed?
You can find the package with the command "find / -name package-name"
I see this configuration:
removeAdditionalFilesFlag: true
excludeFilesFromAppDataFlag: true
it's a basic configuration, but if I understand what you say, it's possible the package was "erased" when you deploy your app BECAUSE of this configuration
You can test with:
- Deploy with this configuration to "false"
- if with this value to false, the package still here, you can move / copy the package to another location to not erase this with the next deploy
Another solution: use your script / your CI to execute the command and reinstall the package if needed
For exemple: "apt install XXX --yes"