fix bug and add service file
1.修正列印大小無法寫入BUG 2.加入SYSTEMD系統服務腳本
This commit is contained in:
parent
8c2913e8d6
commit
fc7425e97d
@ -66,7 +66,7 @@ class PrinterDevice {
|
||||
case 's':
|
||||
let size = tmp.substring(2)
|
||||
let sarr = size.trim().split(',')
|
||||
if (sarr != 2) break
|
||||
if (sarr.length != 2) break
|
||||
if(!isFinite(sarr[0]) || !isFinite(sarr[1])) break
|
||||
sarr = sarr.map(t => Math.floor(t))
|
||||
this._printer.size(sarr[0], sarr[1])
|
||||
|
11
initscript/systemd/ble-server.service
Normal file
11
initscript/systemd/ble-server.service
Normal file
@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=BLE Printer Server
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/node /usr/local/node/ble-server/app.js
|
||||
Restart=always
|
||||
User=root
|
||||
Environment="NODE_ENV=production"
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in New Issue
Block a user