systemd サービスのステータスは常にアクティブ化状態です

systemd サービスのステータスは常にアクティブ化状態です

systemd サービスで問題が発生しています。スクリプトのステータスが常に「アクティブ」ではなく「アクティブ化状態」になっています。何が問題なのかわかりません。どうか助けてください。

30秒ごとにbashスクリプトを実行するsystemdサービスを作成しました

My script : 
#!/bin/bash
PGPORT=$1
echo "running through bash script thourgh  systemd working `date`" >> //tmp/diditwork.txt

私のsystemdサービス設定

[root@pglinux02 system]# cat /etc/systemd/system/test-pg.service
[Unit]
Description=PostgreSQL db Service
After=network.target

[Service]
User=postgres
Type=simple
ExecStart=/tmp/test.sh 5432
Restart=always
RestartSec=30
[Install]
WantedBy=multi-user.target
[root@pglinux02 system]#

スクリプトは期待通りに実行されていますが、サービスのステータスを確認すると、常に「アクティブ化」状態が表示されます

[root@pglinux02 system]# systemctl status test-pg.service
● test-pg.service - PostgreSQL db Service 
   Loaded: loaded (/etc/systemd/system/test-pg.service; enabled; vendor preset: disabled)
   Active: **activating (auto-restart)** since Fri 2021-10-29 19:49:57 GMT; 6s ago
  Process: 5274 ExecStart=/tmp/test.sh 5432 (code=exited, status=0/SUCCESS)
 Main PID: 5274 (code=exited, status=0/SUCCESS)
[root@pglinux02 system]#

このサービスを「アクティブ(実行中)」にする方法は何ですか?別のパラメータ「RemainAfterExit=yes」を追加すると、スクリプトは最初に実行され、その後の間隔では実行されません。

私の間違いと解決策についてアドバイスをお願いします

ありがとう、ドゥルガー

関連情報