Execute another shell script in the shell script
You can execute another shell script (or non-executable file, mainly used to obtain the value of some variables) in one shell script :. file name (including path) or variable = file name (including path ). $ variable Note: there is a space behind the dot. In this way, some variables declared in other files can be referenced in the later part of this shell script. Manually add a startup service in Linux
Run CAT/etc/rc. Local to check this file. You do not need any help manuals or documents. After reading this file, you will have a better way to add a startup service.
#! /Bin/sh-e
#
# RC. Local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "Exit 0" on success or any other
# Value on error.
#
# In order to enable or disable this script just change the execution
# Bits.
#
# By default this script does nothing.
./Var/www/sphinx/restart. Sh
Exit 0
Crontab
# Full-text search
30 1 ***/bin/sh/var/www/sph?/ sph=. sh;
# Chat room online user check script
*/1 ***** PHP/var/www/ccccccc/_ tools/update_online_users.php
Linux if
# Pimei
Site = 1
If [$ site = 1]
Then
/Usr/local/coreseek/bin/indexer -- config/var/www/sphinx/www.site.com/pre_portal_article_title/pre_portal_article_title.conf -- all
/Usr/local/coreseek/bin/searchd-C/var/www/sph?/ www.site.com/pre_portal_article_title/pre_portal_article_title.conf
/Usr/local/coreseek/bin/indexer -- config/var/www/sphinx/www.site.com/pre_portal_article_and_tag/pre_portal_article_and_tag.conf -- all
/Usr/local/coreseek/bin/searchd-C/var/www/sph?/ www.site.com/pre_portal_article_and_tag/pre_portal_article_and_tag.conf
Fi