We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Create a file named mystartup.service at
vi /etc/systemd/system/mystartup.service
[Unit] Description=myaustart After=network.target [Service] ExecStart=/root/init.sh Type=oneshot [Install] WantedBy=multi-user.target
Now let's create the init.sh script that will be called after boot:
vi ~/init.sh
#!/bin/sh touch /root/test.txt #create a file test after boot
chmod +x ~/init.sh
systemctl enable mystartup.service