rename binary, directory name
This commit is contained in:
parent
5099c1dfed
commit
01807ed447
|
|
@ -1,3 +1,3 @@
|
|||
lorahandler
|
||||
lorahandler.log*
|
||||
mini-beieli-lorahandler
|
||||
mini-beieli-lorahandler.log*
|
||||
logs/*
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ const (
|
|||
MyDB = "beieliscaledb"
|
||||
username = "beieli"
|
||||
password = "beieli4president"
|
||||
outputfile = "/home/beieli/lorahandler/lorahandler.log"
|
||||
outputfile = "/home/beieli/mini-beieli-lorahandler/mini-beieli-lorahandler.log"
|
||||
NOT_PLAUSIBLE_16 = 65535
|
||||
NOT_PLAUSIBLE_32 = 2147483647
|
||||
)
|
||||
|
|
@ -549,9 +549,9 @@ func WriteStringToFile(s string, deveui string, implausible bool) {
|
|||
|
||||
// Also write to individual files
|
||||
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 {
|
||||
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)
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
Loading…
Reference in New Issue