rename binary, directory name

This commit is contained in:
Joerg Lehmann 2021-04-10 11:35:52 +02:00
parent 5099c1dfed
commit 01807ed447
4 changed files with 20 additions and 20 deletions

4
.gitignore vendored
View File

@ -1,3 +1,3 @@
lorahandler mini-beieli-lorahandler
lorahandler.log* mini-beieli-lorahandler.log*
logs/* logs/*

View File

@ -19,7 +19,7 @@ const (
MyDB = "beieliscaledb" MyDB = "beieliscaledb"
username = "beieli" username = "beieli"
password = "beieli4president" password = "beieli4president"
outputfile = "/home/beieli/lorahandler/lorahandler.log" outputfile = "/home/beieli/mini-beieli-lorahandler/mini-beieli-lorahandler.log"
NOT_PLAUSIBLE_16 = 65535 NOT_PLAUSIBLE_16 = 65535
NOT_PLAUSIBLE_32 = 2147483647 NOT_PLAUSIBLE_32 = 2147483647
) )
@ -549,9 +549,9 @@ func WriteStringToFile(s string, deveui string, implausible bool) {
// Also write to individual files // Also write to individual files
datestr := time.Now().Format("2006-01") datestr := time.Now().Format("2006-01")
individual_file := "/home/beieli/lorahandler/logs/" + deveui + "-" + datestr + ".log" individual_file := "/home/beieli/mini-beieli-lorahandler/logs/" + deveui + "-" + datestr + ".log"
if implausible { if implausible {
individual_file = "/home/beieli/lorahandler/logs/" + "implausible" + "-" + datestr + ".log" individual_file = "/home/beieli/mini-beieli-lorahandler/logs/" + "implausible" + "-" + datestr + ".log"
} }
fi, err := os.OpenFile(individual_file, os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0644) fi, err := os.OpenFile(individual_file, os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0644)

View File

@ -1,15 +0,0 @@
[Unit]
Description=Lorahandler web service
After=syslog.target
After=network.target redis.service
[Service]
Type=simple
User=beieli
Group=beieli
WorkingDirectory=/home/beieli/lorahandler
ExecStart=/home/beieli/lorahandler/lorahandler
Restart=always
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,15 @@
[Unit]
Description=mini-beieli Lorahandler web service
After=syslog.target
After=network.target redis.service
[Service]
Type=simple
User=beieli
Group=beieli
WorkingDirectory=/home/beieli/mini-beieli-lorahandler
ExecStart=/home/beieli/mini-beieli-lorahandler/mini-beieli-lorahandler
Restart=always
[Install]
WantedBy=multi-user.target