private static void Start() { Log.Action("Starting FOG Service"); var controlPath = Path.Combine(Helper.Instance.GetLocation(), "control.sh"); var returnCode = ProcessHandler.Run("/bin/bash", controlPath + " start"); Log.ActionResult(returnCode == 0); Log.NewLine(); }
private static bool DoAction(string action, Func <bool> method) { Log.Action(action); var success = false; try { success = method(); } catch (Exception ex) { Log.Error(LogName, "Method: " + method.Method.Name); Log.Error(LogName, ex); } Log.ActionResult(success); return(success); }