Letzte Änderung: 04. Juli 2021

rc.local für systemd Systeme


vim /etc/systemd/system/rc-local.service

[Unit] Description=/etc/rc.local compatibility [Service] Type=oneshot ExecStart=/etc/rc.local # disable timeout logic TimeoutSec=0 #StandardOutput=tty RemainAfterExit=yes SysVStartPriority=99 [Install] WantedBy=multi-user.target

und anschliessend noch chmod 644 /etc/systemd/system/rc-local.service systemctl enable rc-local.service touch /etc/rc.local chmod 755 /etc/rc.local

vim /etc/rc.local

#!/bin/bash # THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES # # It is highly advisable to create own systemd services or udev rules # to run scripts during boot instead of using this file. # # In contrast to previous versions due to parallel execution during boot # this script will NOT be run after all other services. touch /root/test.txt