refactor:将tsg-diagnose.service移动到service目录下

This commit is contained in:
fumingwei
2021-09-01 16:07:17 +08:00
parent 07ba7697e9
commit 349132cf07
2 changed files with 15 additions and 15 deletions

View File

@@ -23,7 +23,7 @@ set(CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/cmake/PostunInstall
install(FILES docker-compose/docker-compose.yml DESTINATION ./compose)
install(FILES unittest_python/unittest/etc/tsg-diagnose.config DESTINATION ./etc)
install(FILES docker-compose/tsg-diagnose.service DESTINATION /usr/lib/systemd/system)
install(FILES service/tsg-diagnose.service DESTINATION /usr/lib/systemd/system)
install(FILES dnsmasq/config/dnsmasq.conf DESTINATION /opt/tsg/tsg-diagnose/etc/)
install(DIRECTORY images/ DESTINATION ./images)
install(DIRECTORY deploy/ DESTINATION ./deploy)

View File

@@ -1,14 +1,14 @@
[Unit]
Description=Tsg diagnose
Requires=docker.service tsg-env.service
After=docker.service tsg-env.service
[Service]
Type=oneshot
RemainAfterExit=yes
WorkingDirectory=/opt/tsg/tsg-diagnose/compose/%i
ExecStart=/bin/sh -c "docker-compose down --remove-orphans; docker-compose up -d --remove-orphans"
ExecStop=/bin/sh -c "docker-compose down --remove-orphans"
[Install]
WantedBy=multi-user.target
[Unit]
Description=Tsg diagnose
Requires=docker.service tsg-env.service
After=docker.service tsg-env.service
[Service]
Type=oneshot
RemainAfterExit=yes
WorkingDirectory=/opt/tsg/tsg-diagnose/compose/%i
ExecStart=/bin/sh -c "docker-compose down --remove-orphans; docker-compose up -d --remove-orphans"
ExecStop=/bin/sh -c "docker-compose down --remove-orphans"
[Install]
WantedBy=multi-user.target