diff options
author | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2017-10-14 13:54:51 +0300 |
---|---|---|
committer | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2017-10-14 13:54:51 +0300 |
commit | c97a25b15202b533df02bfc7ce6a1dcb561e8492 (patch) | |
tree | 5672f68d46a6365d6716a5f9b9ad57daed7261e0 /WorkerForm.cs | |
parent | c46b99f4d2b9dce5f270f1a4ef7d8e9832fb83b5 (diff) |
Better config saving
Diffstat (limited to 'WorkerForm.cs')
-rw-r--r-- | WorkerForm.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/WorkerForm.cs b/WorkerForm.cs index 09b83104..25006c32 100644 --- a/WorkerForm.cs +++ b/WorkerForm.cs @@ -966,6 +966,7 @@ namespace com.clusterrr.hakchi_gui public static void SyncConfig(Dictionary<string, string> Config, bool reboot = false)
{
var clovershell = MainForm.Clovershell;
+ const string configPath = "/etc/preinit.d/p0000_config";
// Writing config
var config = new MemoryStream();
@@ -977,8 +978,7 @@ namespace com.clusterrr.hakchi_gui config.Write(data, 0, data.Length);
}
}
- clovershell.Execute("cat > /tmp/config", config, null, null, 1000, true);
- clovershell.Execute("temppath=/tmp ; source /etc/preinit ; script_init ; source /tmp/config ; source $preinit.d/pffff_config", null, null, null, 5000, true);
+ clovershell.Execute($"cat >> {configPath}", config, null, null, 3000, true);
config.Dispose();
if (reboot)
{
|