From 18eeb6715c8e9f48a7e82465aadfdbb4d3ed689c Mon Sep 17 00:00:00 2001 From: shaozhimin Date: Thu, 27 Oct 2022 15:03:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9systime=E7=9A=84postinst?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debian/libkysdk-systime.postinst | 10 ++++++++++ debian/postinst | 3 --- 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 debian/libkysdk-systime.postinst delete mode 100644 debian/postinst diff --git a/debian/libkysdk-systime.postinst b/debian/libkysdk-systime.postinst new file mode 100644 index 0000000..05567c8 --- /dev/null +++ b/debian/libkysdk-systime.postinst @@ -0,0 +1,10 @@ +check_env=`systemd-detect-virt` +echo $check_env +if [ $check_env = "docker" ];then + echo "docker env do not start kysdk-systime.service" +else + systemctl daemon-reload + systemctl enable kysdk-systime.service + systemctl restart kysdk-systime.service +fi + diff --git a/debian/postinst b/debian/postinst deleted file mode 100644 index f87affe..0000000 --- a/debian/postinst +++ /dev/null @@ -1,3 +0,0 @@ -systemctl daemon-reload -systemctl enable kysdk-systime.service -systemctl restart kysdk-systime.service