init: Remove support for 'Script' parameters
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This can now be changed to good old 'Command', putting a shebang into the script, thanks to the new shebang support in the kernel.
This commit is contained in:
parent
3638d3da46
commit
3598dacbed
@ -175,28 +175,10 @@ static Result<void> load_service(const os::Path& path)
|
||||
|
||||
if (parts[0].view() == "Command")
|
||||
{
|
||||
if (!service.command.is_empty())
|
||||
{
|
||||
do_log("[init] 'Command' cannot be specified after 'Script' has already been set! (%s)\n",
|
||||
line.chars());
|
||||
return {};
|
||||
}
|
||||
service.command = move(parts[1]);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (parts[0].view() == "Script")
|
||||
{
|
||||
if (!service.command.is_empty())
|
||||
{
|
||||
do_log("[init] 'Script' cannot be specified after 'Command' has already been set! (%s)\n",
|
||||
line.chars());
|
||||
return {};
|
||||
}
|
||||
service.command = TRY(String::format("/bin/sh -- %s"_sv, parts[1].chars()));
|
||||
continue;
|
||||
}
|
||||
|
||||
if (parts[0].view() == "Restart")
|
||||
{
|
||||
if (parts[1].view() == "true" || parts[1].view().to_uint().value_or(0) == 1)
|
||||
|
Loading…
Reference in New Issue
Block a user