Browse Source

update otaserver

xuqiang 3 tháng trước cách đây
mục cha
commit
8873c3e805

+ 2 - 1
services/otaserver/Makefile

@@ -7,6 +7,7 @@ release:
 	pyinstaller otaserver.spec
 	cp -f ./run.sh ./release/otaserver
 	cp -f ./install.sh ./release/otaserver
+	cp -f ./uninstall.sh ./release/otaserver
 	cp -r ./dist ./release/otaserver/bin
 	cp -f ./otaserver.service ./release/otaserver
 
@@ -14,7 +15,7 @@ install:
 	mkdir -p /usr/local/otaserver
 	cp -r ./dist /usr/local/otaserver/bin
 	cp -f ./run.sh /usr/local/otaserver
-	cp otaserver.service  /usr/lib/systemd/system
+	cp otaserver.service  /etc/systemd/system
 	systemctl enable otaserver
 	systemctl start otaserver
 

+ 1 - 1
services/otaserver/install.sh

@@ -3,7 +3,7 @@
 mkdir -p /usr/local/otaserver/bin
 cp -f ./bin/otaserver /usr/local/otaserver/bin
 cp -f ./run.sh /usr/local/otaserver
-cp -f ./otaserver.service /usr/lib/systemd/system
+cp -f ./otaserver.service  /etc/systemd/system
 
 systemctl daemon-reload
 systemctl enable --now otaserver

+ 2 - 2
services/otaserver/otaserver.service

@@ -13,8 +13,8 @@ Restart=always
 RestartSec=3
 
 # 如果需要日志
-StandardOutput=journal
-StandardError=journal
+StandardOutput=null
+StandardError=null
 
 [Install]
 WantedBy=multi-user.target

+ 1 - 1
services/otaserver/uninstall.sh

@@ -2,5 +2,5 @@
 
 systemctl disable --now otaserver.service
 rm -r /usr/local/otaserver
-rm /usr/lib/systemd/system/otaserver.service
+rm /etc/systemd/system/otaserver.service
 systemctl daemon-reload