database Keys redesing

This commit is contained in:
Serghey Rodin 2012-02-16 01:25:03 +02:00
commit 444137f225
49 changed files with 202 additions and 112 deletions

View file

@ -48,7 +48,7 @@ sync_cron_jobs() {
eval ${key%%=*}="${key#*=}"
done
if [ "$SUSPEND" = 'no' ] ; then
if [ "$SUSPENDED" = 'no' ] ; then
# Adding line to system cron
echo "$MIN $HOUR $DAY $MONTH $WDAY $CMD" |\
sed -e "s/%quote%/'/g" -e "s/%dots%/:/g" >> $conf
@ -75,7 +75,7 @@ del_cron_job() {
is_job_suspended() {
# Parsing jobs
str=$(grep "JOB='$job'" $V_USERS/$user/cron.conf|grep "SUSPEND='yes'" )
str=$(grep "JOB='$job'" $V_USERS/$user/cron.conf|grep "SUSPENDED='yes'" )
# Checkng key
if [ ! -z "$str" ]; then
@ -87,7 +87,7 @@ is_job_suspended() {
is_job_unsuspended() {
# Parsing jobs
str=$(grep "JOB='$job'" $V_USERS/$user/cron.conf|grep "SUSPEND='no'" )
str=$(grep "JOB='$job'" $V_USERS/$user/cron.conf|grep "SUSPENDED='no'" )
# Checkng key
if [ ! -z "$str" ]; then

View file

@ -348,7 +348,7 @@ is_pgsql_host_alive() {
is_db_suspended() {
config="$V_USERS/$user/db.conf"
check_db=$(grep "DB='$database'" $config|grep "SUSPEND='yes'")
check_db=$(grep "DB='$database'" $config|grep "SUSPENDED='yes'")
# Checking result
if [ ! -z "$check_db" ]; then
@ -360,7 +360,7 @@ is_db_suspended() {
is_db_unsuspended() {
config="$V_USERS/$user/db.conf"
check_db=$(grep "DB='$database'" $config|grep "SUSPEND='yes'")
check_db=$(grep "DB='$database'" $config|grep "SUSPENDED='yes'")
# Checking result
if [ -z "$check_db" ]; then

View file

@ -108,7 +108,7 @@ is_domain_suspended() {
config_type="$1"
# Parsing domain values
check_domain=$(grep "DOMAIN='$domain'" $V_USERS/$user/$config_type.conf|\
grep "SUSPEND='yes'")
grep "SUSPENDED='yes'")
# Checking result
if [ ! -z "$check_domain" ]; then
@ -122,7 +122,7 @@ is_domain_unsuspended() {
config_type="$1"
# Parsing domain values
check_domain=$(grep "DOMAIN='$domain'" $V_USERS/$user/$config_type.conf|\
grep "SUSPEND='no'")
grep "SUSPENDED='no'")
# Checking result
if [ ! -z "$check_domain" ]; then
@ -741,7 +741,7 @@ upd_web_domain_values() {
fi
# Checking suspend
if [ "$SUSPEND" = 'yes' ]; then
if [ "$SUSPENDED" = 'yes' ]; then
docroot_string="Redirect / http://$url"
proxy_string="rewrite ^(.*)\$ http://$url;"
fi