I have this service script:
[Unit]
Description=Description
[Service]
Type=simple
EnvironmentFile=/usr/local/etc/env.conf
ExecStart=/usr/local/bin/script.sh
User=my_user
Group=my_user
StandardOutput=journal
StandardError=journal
Restart=on-failure
RestartPreventExitStatus=13
RestartSec=10s
[Install]
WantedBy=multi-user.target
File script.sh looks as follow:
#!/usr/bin/env bash
echo "BOOM #1";
# /home/my_user/script.py
echo "BOOM #2";
File script.py looks as follow:
#!/usr/bin/env python
print "BOOM #P"
The problem is I do not see anything in journalctl if python script is commented. If I uncomment python script I will see in journalctl following lines:
BOOM #1
BOOM #P
I am suspecting that it might be some kind of buffering issue, but this is my guess. Any hint why to do to actually see echoes?