mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 23:42:51 +02:00
helpers: add function to execute init scripts
Origin commit data
------------------
Commit: b4e75bdb24
Author: vanhofen <vanhofen@gmx.de>
Date: 2021-02-01 (Mon, 01 Feb 2021)
Origin message was:
------------------
- helpers: add function to execute init scripts
This commit is contained in:
@@ -568,6 +568,16 @@ bool exec_controlscript(std::string script)
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool exec_initscript(std::string script, std::string command)
|
||||
{
|
||||
dprintf(DEBUG_NORMAL, "executing service %s %s\n", script.c_str(), command.c_str());
|
||||
int ret = my_system(3, "service", script.c_str(), command.c_str());
|
||||
if (ret)
|
||||
dprintf(DEBUG_NORMAL, "exec init script [%s] failed\n", script.c_str());
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
std::string backtick(std::string command)
|
||||
{
|
||||
char *buf = NULL;
|
||||
|
Reference in New Issue
Block a user