resolve 13247

This commit is contained in:
m0duspwnens
2024-09-16 11:19:16 -04:00
parent fbf0a9652a
commit 56666ad82c
2 changed files with 12 additions and 4 deletions

View File

@@ -249,8 +249,10 @@ download_and_verify() {
fi fi
if ! verify_md5_checksum "$dest_file" "$md5_file"; then if ! verify_md5_checksum "$dest_file" "$md5_file"; then
set +e
retry 15 10 "curl --fail --retry 5 --retry-delay 15 -L '$source_url' --output '$dest_file'" "" "" retry 15 10 "curl --fail --retry 5 --retry-delay 15 -L '$source_url' --output '$dest_file'" "" ""
retry 15 10 "curl --fail --retry 5 --retry-delay 15 -L '$source_md5_url' --output '$md5_file'" "" "" retry 15 10 "curl --fail --retry 5 --retry-delay 15 -L '$source_md5_url' --output '$md5_file'" "" ""
set -e
if verify_md5_checksum "$dest_file" "$md5_file"; then if verify_md5_checksum "$dest_file" "$md5_file"; then
echo "Source file and checksum are good." echo "Source file and checksum are good."

View File

@@ -525,11 +525,17 @@ stop_salt_master() {
pkill -9 -ef "/usr/bin/python3 /bin/salt" >> $SOUP_LOG 2>&1 pkill -9 -ef "/usr/bin/python3 /bin/salt" >> $SOUP_LOG 2>&1
echo "" echo ""
echo "Storing salt-master pid." echo "Storing salt-master PID."
MASTERPID=$(pgrep -f '/opt/saltstack/salt/bin/python3.10 /usr/bin/salt-master MainProcess') MASTERPID=$(pgrep -f '/opt/saltstack/salt/bin/python3.10 /usr/bin/salt-master MainProcess')
echo "Found salt-master PID $MASTERPID" if [ ! -z "$MASTERPID" ]; then
systemctl_func "stop" "salt-master" echo "Found salt-master PID $MASTERPID"
timeout 30 tail --pid=$MASTERPID -f /dev/null || echo "salt-master still running at $(date +"%T.%6N") after waiting 30s. We cannot kill due to systemd restart option." systemctl_func "stop" "salt-master"
if ps -p "$MASTERPID" > /dev/null 2>&1; then
timeout 30 tail --pid=$MASTERPID -f /dev/null || echo "salt-master still running at $(date +"%T.%6N") after waiting 30s. We cannot kill due to systemd restart option."
fi
else
echo "The salt-master PID was not found. The process '/usr/bin/salt-master MainProcess' is not running."
fi
set -e set -e
} }