How to start my application automatically after boot up / wake up

I created a systemd service for boot up and enabled it during create the image.
After build and flashed the image into eMMC and boot up, the script invoked most of time, but NOT every time. I checked the service status, it is enabled. I don’t know why the service does not invoked every boot up.

This is my service for boot up:

Description=my application

ExecStart=/home/ion/Application/ boot


This is code to enable the service during create the image using ansible

- name: Enable services
    name: "{{ item }}"
    enabled: yes
    - ssh
    - systemd-networkd
    - network-manager
    - ion-application

How can fix it?


If you are using Ubuntu 18.04, you can use the “Start-up Applications” applet to set your script/app to start after booting. The applet wizard will guide you though the steps.

Hi mike_ev,
Thank you for your kind reply.
I am using Ubuntu 18.04 headless image. Would you please give me more info on using “Start-up Applications” applet to set your script/app to start after booting, such as reference link, etc.

This is an Ubuntu topic and you can find several tutorials on the web. Search for “Start-up Applications over Command Line” and you should be pointed to some resources.