mirror of
https://github.com/islehorse/HISP.git
synced 2025-06-07 11:31:28 +12:00
Fix N00BS
This commit is contained in:
parent
0c299729dd
commit
b3df338715
15 changed files with 71 additions and 81 deletions
|
@ -48,14 +48,17 @@ namespace HISP.Cli
|
|||
}
|
||||
public static void LogToFile(bool error, string type,string text)
|
||||
{
|
||||
sw.WriteLineAsync(text + sw.NewLine);
|
||||
sw.WriteLineAsync(DateTime.Now.ToString("MM-dd-YYYY HH:mm:dd") + ": [" + type + "] " + text + sw.NewLine);
|
||||
}
|
||||
public static void LogStdout(bool error, string type, string text)
|
||||
{
|
||||
if (type == "CRASH")
|
||||
LogToFile(error, type, text);
|
||||
|
||||
if (error)
|
||||
Console.Error.WriteAsync("[" + type + "] " + text + Console.Error.NewLine);
|
||||
Console.Error.WriteAsync(DateTime.Now.ToString("MM-dd-YYYY HH:mm:dd")+": [" + type + "] " + text + Console.Error.NewLine);
|
||||
else
|
||||
Console.Out.WriteAsync("[" + type + "] " + text + Console.Out.NewLine);
|
||||
Console.Out.WriteAsync(DateTime.Now.ToString("MM-dd-YYYY HH:mm:dd") + ": [" + type + "] " + text + Console.Out.NewLine);
|
||||
|
||||
}
|
||||
|
||||
|
@ -120,6 +123,10 @@ namespace HISP.Cli
|
|||
LogFile = HispLogVar;
|
||||
Logger.SetCallback(LogToFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
LogFile = Path.Combine(BaseDir, "crash.log");
|
||||
}
|
||||
|
||||
if (HispBaseDir != null)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Package: hisp
|
||||
Version: 1.7.92
|
||||
Version: 1.7.99
|
||||
Depends: coreutils,systemd,mariadb-server,libsqlite3-dev,zlib1g-dev,libicu-dev,libkrb5-dev
|
||||
Maintainer: Li
|
||||
Homepage: https://islehorse.com
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
useradd -r horseisle
|
||||
mkdir -p /etc/hisp
|
||||
mkdir -p /var/log/hisp
|
||||
chown -R horseisle:horseisle /etc/hisp
|
||||
chown -R horseisle:horseisle /var/log/hisp
|
||||
systemctl enable HISP.service
|
||||
systemctl start HISP
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ Group=horseisle
|
|||
WorkingDirectory=/etc/hisp
|
||||
ExecStart=/usr/bin/HISPd
|
||||
|
||||
Environment=USER=horseisle HOME=/etc/hisp HISP_BASE_DIR=/etc/hisp HISP_CONF_FILE=/etc/hisp/server.properties
|
||||
Environment=USER=horseisle HOME=/etc/hisp HISP_BASE_DIR=/etc/hisp HISP_CONF_FILE=/etc/hisp/server.properties HISP_LOG_FILE=/var/log/hisp/hisp.log
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue