mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-16 22:12:48 +01:00
change how pgrep finds salt-master PID
This commit is contained in:
@@ -17,6 +17,7 @@ commonpkgs:
|
|||||||
- netcat-openbsd
|
- netcat-openbsd
|
||||||
- sqlite3
|
- sqlite3
|
||||||
- libssl-dev
|
- libssl-dev
|
||||||
|
- procps
|
||||||
- python3-dateutil
|
- python3-dateutil
|
||||||
- python3-docker
|
- python3-docker
|
||||||
- python3-packaging
|
- python3-packaging
|
||||||
@@ -70,6 +71,7 @@ commonpkgs:
|
|||||||
- net-tools
|
- net-tools
|
||||||
- nmap-ncat
|
- nmap-ncat
|
||||||
- openssl
|
- openssl
|
||||||
|
- procps
|
||||||
- python3-dnf-plugin-versionlock
|
- python3-dnf-plugin-versionlock
|
||||||
- python3-docker
|
- python3-docker
|
||||||
- python3-m2crypto
|
- python3-m2crypto
|
||||||
|
|||||||
@@ -436,7 +436,7 @@ stop_salt_master() {
|
|||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "Storing salt-master pid."
|
echo "Storing salt-master pid."
|
||||||
MASTERPID=$(pgrep salt-master | head -1)
|
MASTERPID=$(pgrep -f '/opt/saltstack/salt/bin/python3.10 /usr/bin/salt-master MainProcess')
|
||||||
echo "Found salt-master PID $MASTERPID"
|
echo "Found salt-master PID $MASTERPID"
|
||||||
systemctl_func "stop" "salt-master"
|
systemctl_func "stop" "salt-master"
|
||||||
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."
|
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."
|
||||||
|
|||||||
Reference in New Issue
Block a user