Startup redhat script doesnt work

I created a startup script that is supposed to execute 4 other scripts after a reboot.
These scripts can be executed manually if I use dzdo su - appian and then run the scripts, but it doesn’t work when triggered by the startup process. The scripts need to be executed by the appian user.

So when I log in as root, and then do a dzdo su - appian and run these scripts it works

  1. dzdo /opt/appian/appian_home/services/bin/start.sh -p Password -s all
  2. dzdo /opt/appian/appian_home/data-server/bin/start.sh
  3. dzdo /opt/appian/appian_home/search-server/bin/start.sh
  4. dzdo /opt/appian/appian_home/tomcat/apache-tomcat/bin/start-appserver.sh

This is the systemd configuration I created:

# startup script
[Unit]
    Description=Start Appian Services a`your text`fter reboot
    After=network.target

    [Service]
    Type=oneshot
    User=appian
    ExecStart=/opt/scripts/start_appian_services.sh

    [Install]
    WantedBy=multi-user.target
bash
#!/bin/bash

# Log file for debugging
    LOG_FILE="/var/log/appian_services_start.log"

# Start services and log the process
    echo "Starting Appian services: $(date)" >> $LOG_FILE

# Script 1: Start services with credentials
    /opt/appian/appian_home/services/bin/start.sh -p Password -s all >> $LOG_FILE 2>&1
    echo "Service 1 started: services/bin/start.sh" >> $LOG_FILE

# Wait for 30 seconds
    sleep 30

# Script 2: Start data-server
    /opt/appian/appian_home/data-server/bin/start.sh >> $LOG_FILE 2>&1
    echo "Service 2 started: data-server/bin/start.sh" >> $LOG_FILE

# Wait for 10 seconds
    sleep 10

# Script 3: Start search-server
    /opt/appian/appian_home/search-server/bin/start.sh >> $LOG_FILE 2>&1
    echo "Service 3 started: search-server/bin/start.sh" >> $LOG_FILE

# Wait for 10 seconds
    sleep 10

# Script 4: Start Tomcat server
    /opt/appian/appian_home/tomcat/apache-tomcat/bin/start-appserver.sh >> $LOG_FILE 2>&1
    echo "Service 4 started: tomcat/apache-tomcat/bin/start-appserver.sh" >> $LOG_FILE

    echo "All services started successfully: $(date)" >> $LOG_FILE
                                                                                
# These are the manual steps what works
    dzdo /opt/appian/appian_home/services/bin/start.sh -p Password -s all
    dzdo /opt/appian/appian_home/data-server/bin/start.sh
    dzdo /opt/appian/appian_home/search-server/bin/start.sh
    dzdo /opt/appian/appian_home/tomcat/apache-tomcat/bin/start-appserver.sh`

but it doesn't work, what am I doing wrong?
how to arrange the startup script that after a reboot the scripts can be excecuted by the appian user.

this are the errors I get:

Sorry, user appian is not allowed to execute '/opt/appian/appian_home/tomcat/apache-tomcat/bin/start-appserver.sh' as appian on PARVL71AAB01.
Service 4 started: tomcat/apache-tomcat/bin/start-appserver.sh
All services started successfully: Tue Nov 26 00:23:44 CET 2024
Starting Appian services: Tue Nov 26 00:27:08 CET 2024
DirectAuthorize is disabled, unable to check command
Sorry, user appian is not allowed to execute '/opt/appian/appian_home/services/bin/start.sh -p Appianpr123! -s all' as appian on PARVL71AAB01.
Service 1 started: services/bin/start.sh
Sorry, user appian is not allowed to execute '/opt/appian/appian_home/data-server/bin/start.sh' as appian on PARVL71AAB01.
Service 2 started: data-server/bin/start.sh
Sorry, user appian is not allowed to execute '/opt/appian/appian_home/search-server/bin/start.sh' as appian on PARVL71AAB01.
Service 3 started: search-server/bin/start.sh
Sorry, user appian is not allowed to execute '/opt/appian/appian_home/tomcat/apache-tomcat/bin/start-appserver.sh' as appian on PARVL71AAB01.
Service 4 started: tomcat/apache-tomcat/bin/start-appserver.sh
All services started successfully: Tue Nov 26 00:27:38 CET 2024
[root@PARVL71AAB01 log]# vi Sorry, user appian is not allowed to execute '/opt/appian/appian_home/tomcat/apache-tomcat/bin/start-appserver.sh' as appian on PARVL71AAB01.
Service 2 started: data-server/bin/start.sh
Sorry, user appian is not allowed to execute '/opt/appian/appian_home/search-server/bin/start.sh' as appian on PARVL71AAB01.
Service 3 started: search-server/bin/start.sh
Sorry, user appian is not allowed to execute '/opt/appian/appian_home/tomcat/apache-tomcat/bin/start-appserver.sh' as appian on PARVL71AAB01.
Service 4 started: tomcat/apache-tomcat/bin/start-appserver.sh
All services started successfully: Tue Nov 26 00:27:38 CET 2024

Do you have the dzdo commands in the start script?