Explorar el Código

update updatetime service

xuqiang hace 3 meses
padre
commit
aacc1bd852

+ 4 - 1
services/updatetime/Makefile

@@ -1,3 +1,5 @@
+all: build release
+
 build:
 	pyinstaller updatetime.spec
 
@@ -7,6 +9,7 @@ release:
 	pyinstaller updatetime.spec
 	cp -f ./run.sh ./release/updatetime
 	cp -f ./install.sh ./release/updatetime
+	cp -f ./uninstall.sh ./release/updatetime
 	cp -r ./dist ./release/updatetime/bin
 	cp -f ./updatetime.service ./release/updatetime
 
@@ -14,7 +17,7 @@ install:
 	mkdir -p /usr/local/updatetime
 	cp -r ./dist /usr/local/updatetime/bin
 	cp -f ./run.sh /usr/local/updatetime
-	cp updatetime.service  /usr/lib/systemd/system
+	cp updatetime.service  /etc/systemd/system
 	systemctl enable updatetime
 	systemctl start updatetime
 

+ 1 - 1
services/updatetime/install.sh

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

+ 1 - 1
services/updatetime/uninstall.sh

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

+ 2 - 2
services/updatetime/updatetime.service

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