Esempio n. 1
0
        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();
        }
Esempio n. 2
0
        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);
        }