Buster Startup Scripts: Difference between revisions
From embeddedTS Manuals
(Created page with "A systemd service can be created to start up headless applications. Create a file in /etc/systemd/system/yourapp.service <source lang=ini> [Unit] Description=Run an applicati...") |
(No difference)
|
Latest revision as of 10:05, 24 January 2020
A systemd service can be created to start up headless applications. Create a file in /etc/systemd/system/yourapp.service
[Unit]
Description=Run an application on startup
[Service]
Type=simple
ExecStart=/usr/local/bin/your_app_or_script
[Install]
WantedBy=multi-user.target
If networking is a dependency add "After=network.target" in the Unit section. Once you have this file in place add it to startup with:
# Start the app on startup, but will not start it now
systemctl enable yourapp.service
# Start the app now, but doesn't change auto startup
systemctl start yourapp.service
Note: | See the systemd documentation for in depth documentation on services. |