Пример #1
0
        private void ReloadShoreWall()
        {
            ProcessResult processResult = _processTool.Execute("/sbin/shorewall", "refresh");

            if (processResult.ExitCode != 0)
            {
                throw new Exception("Couldn't reload ShoreWall");
            }
        }
Пример #2
0
        public void Apply(DnsMasqConfiguration configuration)
        {
            configuration.Write("/etc/dnsmasq.d");

            var processResult = _processTool.Execute("/usr/sbin/service", "dnsmasq restart");

            if (processResult.ExitCode != 0)
            {
                throw new Exception("Couldn't restart dnsmasq");
            }
        }