From 1d45bebe4fa7342818046a8d44379b1ab23576fe Mon Sep 17 00:00:00 2001 From: luqiuwen Date: Mon, 16 Sep 2019 19:11:39 +0800 Subject: [PATCH] =?UTF-8?q?#156=20=E5=A2=9E=E5=8A=A0tmpfiles=E6=8F=8F?= =?UTF-8?q?=E8=BF=B0=E6=96=87=E4=BB=B6=EF=BC=8C=E8=87=AA=E5=8A=A8=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E6=97=A5=E5=BF=97=E4=B8=8E=E4=B8=B4=E6=97=B6=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E3=80=82=E8=B0=83=E6=95=B4=E7=9B=AE=E5=BD=95=E7=BB=93?= =?UTF-8?q?=E6=9E=84=EF=BC=8C=E9=BB=98=E8=AE=A4=E5=AE=89=E8=A3=85=E5=88=B0?= =?UTF-8?q?/opt/tsg/tfe=E4=B8=8B=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 2 +- script/CMakeLists.txt | 5 ++--- script/service/tsgkni.service | 16 ---------------- script/service/tsgtfe.service | 14 -------------- script/tmpfiles/tfe.conf | 8 ++++++++ 5 files changed, 11 insertions(+), 34 deletions(-) delete mode 100644 script/service/tsgkni.service delete mode 100644 script/service/tsgtfe.service create mode 100644 script/tmpfiles/tfe.conf diff --git a/CMakeLists.txt b/CMakeLists.txt index 4279541..8f1880d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,7 @@ if(NOT CMAKE_BUILD_TYPE) endif() if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - set (CMAKE_INSTALL_PREFIX "/home/mesasoft/tfe" CACHE PATH "default install path" FORCE ) + set (CMAKE_INSTALL_PREFIX "/opt/tsg/tfe" CACHE PATH "default install path" FORCE ) endif() # Global compile options diff --git a/script/CMakeLists.txt b/script/CMakeLists.txt index 791e1d5..b9f1fd9 100644 --- a/script/CMakeLists.txt +++ b/script/CMakeLists.txt @@ -1,7 +1,6 @@ -install(PROGRAMS user/r2_tfe DESTINATION ./ COMPONENT Program) -install(PROGRAMS user/r3_tfe DESTINATION ./ COMPONENT Program) -install(FILES sysctl/80-tfe.conf DESTINATION /etc/sysctl.d/ COMPONENT Program) install(FILES service/tfe.service DESTINATION /usr/lib/systemd/system/ COMPONENT Program) install(FILES service/tfe-env-tun-mode.service DESTINATION /usr/lib/systemd/system/ COMPONENT Program) install(FILES service/tfe-env.service DESTINATION /usr/lib/systemd/system/ COMPONENT Program) +install(FILES sysctl/80-tfe.conf DESTINATION /etc/sysctl.d/ COMPONENT Profile) +install(FILES tmpfiles/tfe.conf DESTINATION /usr/lib/tmpfiles.d/ COMPONENT Profile) install(FILES service/tfe-env-config DESTINATION /etc/sysconfig/ COMPONENT Profile) diff --git a/script/service/tsgkni.service b/script/service/tsgkni.service deleted file mode 100644 index 993a8f5..0000000 --- a/script/service/tsgkni.service +++ /dev/null @@ -1,16 +0,0 @@ -[Unit] -Description=tsg kni module -Requires=tfe-env.service -After=tfe-env.service - -[Service] -WorkingDirectory=/home/tsg/kni -#ExecStart=/home/tsg/kni/kni_service_scipt start -ExecStart=/home/tsg/kni/sapp -#ExecStop=/home/tsg/kni/kni_service_scipt stop -#Type=forking -Restart=always -RestartSec=5s - -[Install] -WantedBy=multi-user.target diff --git a/script/service/tsgtfe.service b/script/service/tsgtfe.service deleted file mode 100644 index 7d490a4..0000000 --- a/script/service/tsgtfe.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=tsg tfe module -Requires=tsgkni.service -After=tsgkni.service - -[Service] -WorkingDirectory=/home/tsg/tfe/ -ExecStart=/home/tsg/tfe/bin/tfe -ExecStop=/bin/kill -9 $MAINPID -Restart=always -RestartSec=5s - -[Install] -WantedBy=multi-user.target diff --git a/script/tmpfiles/tfe.conf b/script/tmpfiles/tfe.conf new file mode 100644 index 0000000..fd69fcf --- /dev/null +++ b/script/tmpfiles/tfe.conf @@ -0,0 +1,8 @@ +#Type Path Mode User Group Age Argument +d /var/log/tfe/ 0755 - - 7d - +d /var/tmp/tfe/crashreport 0755 - - 30d - +d /var/tmp/tfe/pangu_files 0755 - - - 30d - +d /var/tmp/tfe/rulescan_tmp 0755 - - - 30d - +L /opt/tsg/tfe/log - - - - /var/log/tfe +L /opt/tsg/tfe/pangu_files - - - - /var/tmp/tfe/pangu_files +L /opt/tsg/tfe/rulescan_tmp - - - - /var/tmp/tfe/rulescan_tmp