feat: add multi-distro RPM packaging for CentOS 7 and Rocky Linux 8/9/10
- Create RPM maintainer scripts (post, preun, postun) - Add Docker build stages for each target distribution (el7, el8, el9, el10) - Update architecture.yml with supported RPM distributions - Update build.sh to extract distro-specific RPM packages Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
17
packaging/rpm/postun
Normal file
17
packaging/rpm/postun
Normal file
@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
# postun script for logcorrelator RPM package
|
||||
# Compatible with CentOS 7, Rocky Linux 8, 9, 10
|
||||
|
||||
set -e
|
||||
|
||||
# $1 = 0: package is being removed
|
||||
# $1 = 1: package is being upgraded
|
||||
if [ -x /bin/systemctl ]; then
|
||||
systemctl daemon-reload
|
||||
if [ "$1" -ge 1 ]; then
|
||||
# Package upgrade, restart service
|
||||
systemctl try-restart logcorrelator.service
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user