From 931a38fd0adedddfddb847452d622b8b7eef7214 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=88=98=EC=A4=80?= Date: Wed, 6 Sep 2023 14:54:44 +0900 Subject: [PATCH] first commit --- awx-perfermance-arm32.service | 10 ++++++++++ install.sh | 6 +++--- main.py | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 awx-perfermance-arm32.service diff --git a/awx-perfermance-arm32.service b/awx-perfermance-arm32.service new file mode 100644 index 0000000..a736ca8 --- /dev/null +++ b/awx-perfermance-arm32.service @@ -0,0 +1,10 @@ +[Unit] +Description=awx-perfermance-arm32 + +[Service] +ExecStart=/usr/bin/python3 /usr/local/sdt/app/awx-perfermance-arm32/main.py +Restart=always +RestartSec=10 + +[Install] +WantedBy=multi-user.target diff --git a/install.sh b/install.sh index 02b563e..dcf53ba 100755 --- a/install.sh +++ b/install.sh @@ -1,5 +1,5 @@ #!/bin/bash -sudo cp /usr/local/sdt/app/awx-perfermance/awx-perfermance.service /etc/systemd/system/ -sudo systemctl start awx-perfermance -sudo systemctl enable awx-perfermance \ No newline at end of file +sudo cp /usr/local/sdt/app/awx-perfermance-arm32/awx-perfermance-arm32.service /etc/systemd/system/ +sudo systemctl start awx-perfermance-arm32 +sudo systemctl enable awx-perfermance-arm32 diff --git a/main.py b/main.py index 001a402..1468ccb 100644 --- a/main.py +++ b/main.py @@ -5,7 +5,7 @@ from datetime import datetime import time import yaml -with open('/usr/local/sdt/app/awx-perfermance/config.yaml', encoding='UTF-8') as f: +with open('/usr/local/sdt/app/awx-perfermance-arm32/config.yaml', encoding='UTF-8') as f: yamlData = yaml.load(f, Loader=yaml.FullLoader)