[Unit] Description=Starts the process After=network.target [Service] User=user ExecStartPre=/bin/sleep 5 ExecStart=/bin/bash -c '. "$0" && exec "$@"' /home/user/.bash_profile /tomcat/bin/service.sh startup ExecStop=/tomcat/bin/service.sh shutdown Type=forking TimeoutSec=infinity [Install] WantedBy=multi-user.target