File tree Expand file tree Collapse file tree 3 files changed +13
-3
lines changed
Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 1414# Argument definition
1515user=$1
1616version=${2-2}
17+ update=$3
1718
1819if [ -z " $HESTIA " ]; then
1920 HESTIA=" /usr/local/hestia"
@@ -31,7 +32,7 @@ source_conf "$HESTIA/conf/hestia.conf"
3132# Verifications #
3233# ----------------------------------------------------------#
3334
34- check_args ' 1' " $# " ' USER [VERSION]'
35+ check_args ' 1' " $# " ' USER [VERSION] [UPDATE] '
3536is_format_valid ' user'
3637is_number_format_valid " $version " " version"
3738is_object_valid ' user' ' USER' " $user "
@@ -50,6 +51,10 @@ COMPOSER_DIR="$HOMEDIR/$user/.composer"
5051COMPOSER_BIN=" $COMPOSER_DIR /composer"
5152
5253if [ -f " $COMPOSER_BIN " ]; then
54+ if [ -f " $update " ]; then
55+ user_exec $COMPOSER_BIN selfupdate
56+ exit
57+ fi
5358 echo " Composer already available"
5459 exit
5560fi
Original file line number Diff line number Diff line change 1212
1313# Argument definition
1414user=$1
15+ update=$2
1516
1617if [ -z " $HESTIA " ]; then
1718 HESTIA=" /usr/local/hestia"
@@ -28,7 +29,7 @@ source_conf "$HESTIA/conf/hestia.conf"
2829# Verifications #
2930# ----------------------------------------------------------#
3031
31- check_args ' 1' " $# " ' USER'
32+ check_args ' 1' " $# " ' USER [UPDATE] '
3233is_format_valid ' user'
3334is_object_valid ' user' ' USER' " $user "
3435is_object_unsuspended ' user' ' USER' " $user "
@@ -44,6 +45,10 @@ WPCLI_DIR="/home/$user/.wp-cli"
4445WPCLI_BIN=" $WPCLI_DIR /wp"
4546
4647if [ -f " $WPCLI_BIN " ]; then
48+ if [ -f " $update " ]; then
49+ user_exec $WPCLI_BIN cli update --yes
50+ exit
51+ fi
4752 check_result " $E_EXISTS " " For user name '$user ' WP-CLI already available!"
4853 exit
4954fi
Original file line number Diff line number Diff line change 4444 <?php } ?>
4545 <option value="suspend"><?= _ ("Suspend " ) ?> </option>
4646 <option value="unsuspend"><?= _ ("Unsuspend " ) ?> </option>
47- <?php if ($ _SESSION ['PROXY_SYSTEM ' ] == 'nginx ' ) || $ _SESSION ['WEB_SYSTEM ' ] == 'nginx ' )){?> }
47+ <?php if (( $ _SESSION ['PROXY_SYSTEM ' ] == 'nginx ' ) || ( $ _SESSION ['WEB_SYSTEM ' ] == 'nginx ' )){?> }
4848 <option value="purge"><?= _ ('Purge Nginx Cache ' );?> </option>
4949 <? } ?>
5050 <option value="delete"><?= _ ("Delete " ) ?> </option>
You can’t perform that action at this time.
0 commit comments