Cron job
#1
Cron job
Hi guys,

I noticed that cron job most of the time work with only direct php call no need for full path.

So the question why we redirect output to /dev/null why we don't log it so we get last daemon run time and last output in case!

Code:
php -q /etc/zpanel/panel/bin/daemon.php > /panel_path/daemon_last_run.log


Also no need for the mess and permission to creat the cron all we have to is here:

Code:
# CRON specific installation tasks... sudo crontab -l -u $HTTP_USER> /tmp/mycron; echo "*/5 * * * * nice -2 php -q $PANEL_DAEMON_PATH >> $PANEL_PATH/daemon_last_run.log 2>&1" >> /tmp/mycron; sudo crontab -u $HTTP_USER /tmp/mycron; sudo rm -f /tmp/mycron


You will notice the variables here.

I'm trying to improve the installer so we can have ONLY ONE installer and variables like this would help adapting to the OS, as most of them are changed uppon OS detection process.

I got :
Code:
SEN_VERSION="master" PANEL_PATH="/etc/zpanel" PANEL_DATA="/var/zpanel" DB_SERVER="mariadb" HTTP_SERVER="httpd" FIREWALL_SERVICE="iptables" HTTP_USER="apache" PHP_BIN_PATH="php" PANEL_DAEMON_PATH="$PANEL_PATH/panel/bin/daemon.php" PACKAGE_INSTALLER="yum"

As you can see here:
https://github.com/MBlagui/Sentora-tools...staller.sh

@[5050] @[TGates] @[Nigel] @[motters] @[kandrews]
No support using PM (Auto adding to IGNORE list!), use the forum. 
How to ask

200$ free to start your VPS 60 days credit
#2
RE: Cron job
Looks good to me, tested it and its working.

I've made a fair few changes at https://github.com/zVPS/Sentora-tools/bl...staller.sh

Pull them in before you make too many more changes Smile


Forum Jump:


Users browsing this thread: 1 Guest(s)