• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Shell script is not writing to log file

L

linuxxphybrid

Guest
I have the following shell script.
Code:
#!/bin/bash
# Variables
LOGFILE="/home/admin/cron/http_log"

# redirect STDOUT stream to LOGFILE
exec 1>>$LOGFILE

echo "GET /" | nc localhost 80
(The file name is /home/admin/cron/checkhttp.sh and the directory /home/admin/cron/, its subdirectories and all files in the directory and subdirectories have

Owner root
Group psaadm

and the file's permission is set to rxwr-xr-x. I set up a cron job in Plesk so that the script is executed every 5 minutes; its configuration is as follows:

Min */5
H *
DM *
M *
DW *
Command /home/admin/cron/checkhttp.sh)

The script is not writing to /home/admin/cron/http_log, and I don't know why. Why is the script not writing to /home/admin/cron/http_log? How can I fix the problem?
 
Back
Top