Thank you all, This works very well as expected!
------------------------------
Juan Reforme
------------------------------
Original Message:
Sent: Fri January 12, 2024 11:21 AM
From: Matheus Francisco
Subject: MQ manager autostart after AWS reboot
You can run as a systemd service, example:
[Unit]Description=IBM MQ queue manager {QueueManagerName}Wants=network-online.targetAfter=network.target[Service]ExecStart=/opt/mqm/bin/strmqm -x {QueueManagerName}ExecStop=/opt/mqm/bin/endmqm -w -s {QueueManagerName}SuccessExitStatus=0 5 30 77Type=forkingUser=mqmGroup=mqmKillMode=noneLimitNOFILE=10240LimitNPROC=4096[Install]WantedBy=multi-user.target"
------------------------------
Matheus Francisco
Original Message:
Sent: Thu January 11, 2024 06:20 PM
From: Juan Reforme
Subject: MQ manager autostart after AWS reboot
Hi!
I'm trying to make the MQ Manager autostart after the AWS Instance restart or reboot.
Basically trying to run a bash script when the server start but nothing happens...
#!/bin/bash
# Start queue managers
qmgrs=( $(dspmq | grep -v "Running" | cut -d "(" -f2 | cut -d ")" -f1) )
for i in "${qmgrs[@]}"
do
:
strmqm "$i"
done
Thank you!
------------------------------
Juan Reforme
------------------------------