apachectl graceful error from cron
i have a cron file that reloads apache using
Code:
RELOAD="/usr/sbin/apachectl graceful" Code:
(13)Permission denied: Error retrieving pid file run/httpd.pid Remove it before continuing if it is corrupted. Code:
RELOAD="/usr/sbin/sudo apachectl graceful" just tried Code:
RELOAD="sudo /usr/sbin/apachectl graceful" Code:
sudo: sorry, you must have a tty to run sudo |
Two things:
- is RELOAD="/usr/sbin/apachectl graceful" the correct format for a crontab file???? I don't have Linux, but I use AIX, and its crontab file has this format: Code:
minute hour day_of_month month weekday command Code:
05 10 * * * /usr/sbin/apachectl graceful -tony |
the crontab is
Code:
0 */2 * * * /usr/local/bin/check.sh httpd /etc/httpd/conf.x/cronfile >> /var/log/date.log 2>&1 Code:
#!/bin/bash |
think i got it
Code:
0 */2 * * * sudo /usr/local/bin/check.sh httpd /etc/httpd/conf.x/cronfile >> /var/log/date.log 2>&1 sudo nano /etc/sudoers then add Defaults:%USER-NAME !requiretty Defaults:USER-NAME !requiretty |
All times are GMT -5. The time now is 11:58 PM. |