Running script at startup

Step 1: Create your startup script in /usr/local/bin/ you could have something simple in it to verify it runs like:

echo "Startup script succeeded!"

Step 2: Create a file in /etc/systemd/system/startup.service and put the following code in it:

Description=Startup Service



Step 3: Test your startup script with:

systemctl daemon-reload
systemctl enable startup
systemctl start startup

Step 4: Check your status with:

systemctl status startup

Borrowed from Ian Walker at Rocky Linux here