script

Using drupal query - API - Linux shell command line script

The Drupal API is very useful, but it cannot be used easily via the command line.

This code allows a PHP shell script to masquerade as a normal request so the Drupal API loads and can be used correctly.

 

Linux file structure and directories


 

Auto execute scripts when linux boots by placing script file in /etc/rc.d/init.d/ chkconfig

View directory /etc/rc.d/init.d on your own machine.
Set to start the service automatically: chkconfig --level 345 nfs on

chkconfig Command Linux
Syntax:
chkconfig --list [name]
chkconfig --add name
chkconfig --del name
chkconfig [--level levels] name
chkconfig [--level levels] name

chkconfig has five functions: append service, delete service, list service, change startup info and check the start state of specified service.
Chkconfig displays usage without parameter running tim

 

Syndicate content