コード例 #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");
            }
        }