Letzte Änderung: 13. Juli 2022

rc.local für systemd Systeme

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

[Unit] Description=/etc/rc.local Compatibility 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

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