From fbb35cc7ffbd53ffddff4c87b582f7474bca2cfa Mon Sep 17 00:00:00 2001 From: Pranav Lawate Date: Wed, 8 Oct 2025 08:47:29 +0530 Subject: [PATCH] run_init: add page (#18459) --- pages/linux/run_init.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 pages/linux/run_init.md diff --git a/pages/linux/run_init.md b/pages/linux/run_init.md new file mode 100644 index 0000000000..60403e5ef5 --- /dev/null +++ b/pages/linux/run_init.md @@ -0,0 +1,22 @@ +# run_init + +> Run init scripts in the proper SELinux context. +> Typically used to run system service scripts with correct SELinux domains. +> See also: `runcon`, `semanage`. +> More information: . + +- Run a script in the init script context: + +`sudo run_init {{path/to/script}}` + +- Run a script with arguments: + +`sudo run_init {{path/to/script}} {{start|stop|restart}}` + +- Run a script and specify the init script context explicitly: + +`sudo run_init {{[-t|--type]}} {{context_type}} {{path/to/script}}` + +- Display the context that would be used without running the script: + +`sudo run_init {{[-n|--dry-run]}} {{path/to/script}}`