From ed23529393af4bddb3d25f41fdaf1078000e252d Mon Sep 17 00:00:00 2001 From: Ste Vaidis Date: Fri, 4 Aug 2023 09:09:44 +0300 Subject: [PATCH] Update 1.RockyLinux.md --- 1.RockyLinux.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/1.RockyLinux.md b/1.RockyLinux.md index 9b5a3a9..3ceec08 100644 --- a/1.RockyLinux.md +++ b/1.RockyLinux.md @@ -89,5 +89,42 @@ docker info -f '{{ .DockerRootDir }}' # /data/docker mv /var/lib/docker /var/lib/docker.old ``` +# Enable rc.local +`/etc/rc.local` + +```sh +#!/bin/bash +# Add terminal commands here without sude + +# Make sure the script will "exit 0" on success +# or any other value on error. +exit 0 +``` + +`/etc/systemd/system/rc-local.service` + +```sh +[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 +``` + +```sh +chmod +x /etc/rc.local +systemctl enable rc-local +systemctl start rc-local.service +systemctl status rc-local.service +```