Run a script on boot using systemd on Ubuntu 18.04
Previous versions of Ubuntu had /etc/rc.local. that get executed after system boot. On Ubuntu 18.04, you can use systemd to start a bash script on system boot. Create file vi /etc/systemd/system/sok-startup.service Add [Unit] Description=Start up script ConditionPathExists=/etc/rc.local [Service] Type=forking ExecStart=/etc/rc.local start TimeoutSec=0 StandardOutput=tty RemainAfterExit=yes SysVStartPriority=99 [Install] WantedBy=multi-user.target Create file /etc/rc.local with #!/bin/bash touch /root/OK exit … Read more