Skip to content

Instantly share code, notes, and snippets.

@wrdg
wrdg / BashScriptExecutor.c
Last active February 6, 2024 21:11
DayZ SA Enforce runtime script execution
class BashExecutor
{
// fire and forget, method style execution
static void ExecuteEnf(string code)
{
FileHandle file;
MakeDirectory("$profile:Bash/"); // create directory for logging and execution purposes
string script_path = string.Format("$profile:Bash/script_%1.c", GetDate());
file = OpenFile(script_path, FileMode.WRITE);