提交 94885543 编写于 作者: T tanghai

增加rsync使用注意事项,妈的垃圾rsync

上级 cad9d640
// /etc/rsyncd.secrets必须是600权限,否则报错
// @ERROR: auth failed on module Upload
// rsync error: error starting client-server protocol (code 5) at main.c(1635) [sender=3.1.1]
sudo chmod 600 /etc/rsyncd.secrets
// 启动服务端rsync服务
sudo rsync --daemon
\ No newline at end of file
{ "_t" : "RsyncConfig", "Host" : "192.168.12.188", "Account" : "tanghai", "Password" : "1234567890", "RelativePath" : "Source/Egametang", "Exclude" : [".git/", "Logs/", "Tools/", "Bin/", "Server/packages/", "Temp/", "Server/Server.sdf", "Unity/Library/", "Unity/Temp/", "*/obj"] }
\ No newline at end of file
{ "_t" : "RsyncConfig", "Host" : "192.168.8.235", "Account" : "tanghai", "Password" : "1234567890", "RelativePath" : "Source/Egametang", "Exclude" : [".git/", "Logs/", "Tools/", "Bin/", "Server/packages/", "Temp/", "Server/Server.sdf", "Unity/Library/", "Unity/Temp/", "*/obj"] }
\ No newline at end of file
......@@ -98,6 +98,7 @@ namespace MyEditor
startInfo.WorkingDirectory = @"..\";
Process p = Process.Start(startInfo);
p.WaitForExit();
Log.Info($"{startInfo.FileName} {startInfo.Arguments}");
Log.Info("同步完成!");
}
}
......
......@@ -6,15 +6,10 @@ namespace Base
{
public static class Log
{
private static StreamWriter info;
private static StreamWriter error;
// 每多少秒发一次
public static long SendToServerFrequency = 20 * 1000;
public static long SendToServerTime;
private static readonly StreamWriter info;
private static readonly StreamWriter error;
#if UNITY_EDITOR
private static bool IsNeedFlush = true;
#else
......@@ -27,8 +22,8 @@ namespace Base
{
Directory.CreateDirectory("../Logs");
}
info = new StreamWriter($"../Logs/Log-Client-Info.txt", false, Encoding.Unicode, 1024);
error = new StreamWriter($"../Logs/Log-Client-Error.txt", false, Encoding.Unicode, 1024);
info = new StreamWriter("../Logs/Log-Client-Info.txt", false, Encoding.Unicode, 1024);
error = new StreamWriter("../Logs/Log-Client-Error.txt", false, Encoding.Unicode, 1024);
}
public static void Warning(string msg)
......@@ -83,12 +78,6 @@ namespace Base
#if UNITY_EDITOR
UnityEngine.Debug.LogError(s);
#endif
long timeNow = TimeHelper.ClientNow();
if (timeNow - SendToServerTime > SendToServerFrequency)
{
SendToServerTime = timeNow;
}
}
public static void Debug(string msg)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册