Просмотр исходного кода

Update script options to match actually used

bisubus 5 лет назад
Родитель
Сommit
1012f6a8b7

+ 1 - 1
bin/v-add-database-host

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: add new database server
-# options: TYPE HOST DBUSER DBPASS [MAX_DB] [CHARSETS] [TEMPLATE]
+# options: TYPE HOST DBUSER DBPASS [MAX_DB] [CHARSETS] [TEMPLATE] [PORT]
 #
 # The function add new database server to the server pool. It supports local
 # and remote database servers, which is useful for clusters. By adding a host

+ 1 - 1
bin/v-add-fs-archive

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: archive directory
-# options: USER ARCHIVE SOURCE
+# options: USER ARCHIVE SOURCE [SOURCE...]
 #
 # The function creates tar archive
 

+ 1 - 1
bin/v-add-sys-filemanager

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: add file manager functionality to Hestia Control Panel
-# options: NONE
+# options: [MODE]
 #
 # The function installs the File Manager on the server
 # for access through the Web interface.

+ 2 - 2
bin/v-change-dns-domain-ip

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: change dns domain ip address
-# options: USER DOMAIN IP
+# options: USER DOMAIN IP [RESTART]
 #
 # The function for changing the main ip of DNS zone.
 
@@ -31,7 +31,7 @@ format_domain_idn
 #                    Verifications                         #
 #----------------------------------------------------------#
 
-check_args '3' "$#" 'USER DOMAIN IP'
+check_args '3' "$#" 'USER DOMAIN IP [RESTART]'
 is_format_valid 'user' 'domain' 'ip'
 is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM'
 is_object_valid 'user' 'USER' "$user"

+ 2 - 2
bin/v-change-dns-domain-soa

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: change dns domain soa record
-# options: USER DOMAIN SOA
+# options: USER DOMAIN SOA [RESTART]
 #
 # The function for changing SOA record. This type of records can not be
 # modified by v-change-dns-record call.
@@ -32,7 +32,7 @@ format_domain_idn
 #                    Verifications                         #
 #----------------------------------------------------------#
 
-check_args '3' "$#" 'USER DOMAIN SOA'
+check_args '3' "$#" 'USER DOMAIN SOA [RESTART]'
 is_format_valid 'user' 'domain' 'soa'
 is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM'
 is_object_valid 'user' 'USER' "$user"

+ 2 - 2
bin/v-change-dns-domain-ttl

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: change dns domain ttl
-# options: USER DOMAIN TTL
+# options: USER DOMAIN TTL [RESTART]
 #
 # The function for changing the time to live TTL parameter for all records.
 
@@ -31,7 +31,7 @@ format_domain_idn
 #                    Verifications                         #
 #----------------------------------------------------------#
 
-check_args '3' "$#" 'USER DOMAIN TTL'
+check_args '3' "$#" 'USER DOMAIN TTL [RESTART]'
 is_format_valid 'user' 'domain' 'ttl'
 is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM'
 is_object_valid 'user' 'USER' "$user"

+ 1 - 1
bin/v-change-dns-record

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: change dns domain record
-# options: USER DOMAIN ID VALUE [PRIORITY] [RESTART] [TTL]
+# options: USER DOMAIN ID RECORD TYPE VALUE [PRIORITY] [RESTART] [TTL]
 #
 # The function for changing DNS record.
 

+ 2 - 2
bin/v-change-sys-language

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: change sys language
-# options: LANGUAGE
+# options: LANGUAGE [UPDATE_USERS]
 #
 # The function for changing system language.
 
@@ -31,7 +31,7 @@ is_language_valid() {
 #                    Verifications                         #
 #----------------------------------------------------------#
 
-check_args '1' "$#" 'LANGUAGE'
+check_args '1' "$#" 'LANGUAGE [UPDATE_USERS]'
 is_format_valid 'language'
 is_language_valid $language
 

+ 1 - 1
bin/v-change-sys-theme

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: update web templates
-# options: NONE
+# options: THEME
 #
 # The function for changing the currently active system theme.
 

+ 2 - 2
bin/v-change-user-name

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: change user full name
-# options: USER NAME
+# options: USER NAME [LAST_NAME]
 #
 # The function allow to change user's full name.
 
@@ -23,7 +23,7 @@ source $HESTIA/conf/hestia.conf
 #                    Verifications                         #
 #----------------------------------------------------------#
 
-check_args '2' "$#" 'USER NAME'
+check_args '2' "$#" 'USER NAME [LAST_NAME]'
 is_format_valid 'user' 'name'
 is_object_valid 'user' 'USER' "$user"
 is_object_unsuspended 'user' 'USER' "$user"

+ 1 - 1
bin/v-change-web-domain-httpauth

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: change password for http auth user
-# options: USER DOMAIN AUTH_USER AUTH_PASSWORD
+# options: USER DOMAIN AUTH_USER AUTH_PASSWORD [RESTART]
 #
 # The call is used for changing http auth user password
 

+ 1 - 1
bin/v-change-web-domain-sslhome

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: changing domain ssl home
-# options: NONE
+# options: USER DOMAIN SSL_HOME [RESTART]
 #
 # The function changes SSL home directory.
 

+ 1 - 1
bin/v-check-api-key

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: check api key
-# options: KEY
+# options: KEY [IP]
 #
 # The function checks a key file in $HESTIA/data/keys/
 

+ 1 - 1
bin/v-copy-user-package

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: duplicate existing package
-# options: NONE
+# options: PACKAGE NEW_PACKAGE
 #
 # The function allows the user to duplicate an existing
 # package file to facilitate easier configuration.

+ 1 - 1
bin/v-delete-backup-host

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: delete backup ftp server
-# options: TYPE
+# options: TYPE [HOST]
 #
 # The function deletes ftp backup host
 

+ 2 - 2
bin/v-delete-dns-domains

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: delete dns domains
-# options: USER
+# options: USER [RESTART]
 #
 # The function for deleting all users DNS domains.
 
@@ -22,7 +22,7 @@ source $HESTIA/conf/hestia.conf
 #                    Verifications                         #
 #----------------------------------------------------------#
 
-check_args '1' "$#" 'USER'
+check_args '1' "$#" 'USER [RESTART]'
 is_format_valid 'user'
 is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM'
 is_object_valid 'user' 'USER' "$user"

+ 2 - 2
bin/v-delete-dns-on-web-alias

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: delete dns domain or dns record based on web domain alias
-# options: USER DOMAIN
+# options: USER DOMAIN ALIAS [RESTART]
 #
 # The function deletes dns domain or dns record based on web domain alias.
 
@@ -34,7 +34,7 @@ format_domain_idn
 #                    Verifications                         #
 #----------------------------------------------------------#
 
-check_args '3' "$#" 'USER DOMAIN ALIAS'
+check_args '3' "$#" 'USER DOMAIN ALIAS [RESTART]'
 is_format_valid 'user' 'domain'
 is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM'
 is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM'

+ 1 - 1
bin/v-delete-mail-domain-dkim

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: delete mail domain dkim support
-# options: USER DOMAIN [DKIM_SIZE]
+# options: USER DOMAIN
 #
 # The function delete DKIM domain pem.
 

+ 2 - 2
bin/v-delete-user

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: delete user
-# options: USER
+# options: USER [RESTART]
 #
 # This function deletes a certain user and all his resources such as domains,
 # databases, cron jobs, etc.
@@ -26,7 +26,7 @@ source $HESTIA/conf/hestia.conf
 #                    Verifications                         #
 #----------------------------------------------------------#
 
-check_args '1' "$#" 'USER'
+check_args '1' "$#" 'USER [RESTART]'
 is_format_valid 'user'
 is_object_valid 'user' 'USER' "$user"
 is_object_unsuspended 'user' 'USER' "$user"

+ 1 - 1
bin/v-delete-user-log

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: Delete log file for user
-# options: NONE
+# options: USER
 #
 # The function for deleting a users log file
 

+ 2 - 2
bin/v-delete-web-domain

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: delete web domain
-# options: USER DOMAIN
+# options: USER DOMAIN [RESTART]
 #
 # The call of function leads to the removal of domain and all its components
 # (statistics, folders contents, ssl certificates, etc.). This operation is
@@ -34,7 +34,7 @@ format_domain_idn
 #                    Verifications                         #
 #----------------------------------------------------------#
 
-check_args '2' "$#" 'USER DOMAIN'
+check_args '2' "$#" 'USER DOMAIN [RESTART]'
 is_format_valid 'user' 'domain'
 is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM'
 is_object_valid 'user' 'USER' "$user"

+ 2 - 1
bin/v-delete-web-domain-backend

@@ -13,6 +13,7 @@
 user=$1
 domain=$2
 domain_idn=$2
+restart=$3
 
 # Includes
 source $HESTIA/func/main.sh
@@ -29,7 +30,7 @@ format_domain_idn
 #                    Verifications                         #
 #----------------------------------------------------------#
 
-check_args '2' "$#" 'USER DOMAIN'
+check_args '2' "$#" 'USER DOMAIN [RESTART]'
 is_format_valid 'user' 'domain'
 is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM'
 is_object_valid 'user' 'USER' "$user"

+ 2 - 2
bin/v-delete-web-domain-proxy

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: deleting web domain proxy configuration
-# options: USER DOMAIN
+# options: USER DOMAIN [RESTART]
 #
 # The function of deleting the virtualhost proxy configuration.
 
@@ -30,7 +30,7 @@ format_domain_idn
 #                    Verifications                         #
 #----------------------------------------------------------#
 
-check_args '2' "$#" 'USER DOMAIN'
+check_args '2' "$#" 'USER DOMAIN [RESTART]'
 is_format_valid 'user' 'domain'
 is_system_enabled "$PROXY_SYSTEM" 'WEB_SYSTEM'
 is_object_valid 'user' 'USER' "$user"

+ 2 - 2
bin/v-delete-web-domain-ssl

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: delete web domain SSL support
-# options: USER DOMAIN
+# options: USER DOMAIN [RESTART]
 #
 # The function disable https support and deletes SSL certificates.
 
@@ -30,7 +30,7 @@ format_domain_idn
 #                    Verifications                         #
 #----------------------------------------------------------#
 
-check_args '2' "$#" 'USER DOMAIN'
+check_args '2' "$#" 'USER DOMAIN [RESTART]'
 is_format_valid 'user' 'domain'
 is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM'
 is_object_valid 'user' 'USER' "$user"

+ 1 - 1
bin/v-list-backup-host

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: list backup host
-# options: TYPE HOST [FORMAT]
+# options: TYPE [FORMAT]
 #
 # The function for obtaining the list of backup host parameters.
 

+ 1 - 1
bin/v-list-sys-themes

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: list web templates
-# options: USER [FORMAT]
+# options: [FORMAT]
 #
 # The function for obtaining the list of themes in the theme
 # library and displaying them in the backend or user interface.

+ 1 - 1
bin/v-list-user-ssh-key

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: add ssh key
-# options: USER 
+# options: USER [FORMAT]
 #
 # Lists $user/.ssh/authorized_keys
 

+ 1 - 1
bin/v-list-user-stats

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: list user stats
-# options: [FORMAT]
+# options: USER [FORMAT]
 #
 # The function for listing user statistics
 

+ 1 - 1
bin/v-list-web-templates

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: list web templates
-# options: USER [FORMAT]
+# options: [FORMAT]
 #
 # The function for obtaining the list of web templates available to a user.
 

+ 1 - 1
bin/v-rebuild-database

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: rebuild databases
-# options: USER
+# options: USER DATABASE
 #
 # The function for rebuilding a single database for a user
 

+ 1 - 1
bin/v-restart-system

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: restart operating system
-# options: RESTART
+# options: RESTART [DELAY]
 #
 # The function restarts operating system.
 

+ 1 - 1
bin/v-run-cli-cmd

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: run cli command
-# options: USER FILE
+# options: USER CMD [ARG...]
 #
 # The function runs a limited list of cli commands with dropped privileges as the specific hestia user
 

+ 1 - 1
bin/v-search-command

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: search for available commands
-# options: NONE
+# options: ARG1 [ARG...]
 #
 # This function searches for available Hestia Control Panel commands
 # and returns results based on the specified criteria.

+ 1 - 1
bin/v-suspend-web-domain

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: suspend web domain
-# options: USER DOMAIN
+# options: USER DOMAIN [RESTART]
 #
 # The function for suspending the site's operation. After blocking it all
 # visitors will be redirected to a web page explaining the reason of suspend.

+ 1 - 1
bin/v-unsuspend-web-domain

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: unsuspend web domain
-# options: USER DOMAIN
+# options: USER DOMAIN [RESTART]
 #
 # The function of unsuspending the domain.
 

+ 1 - 1
bin/v-update-sys-hestia

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: update hestia package/configs
-# options: PACKAGE [VERSION]
+# options: PACKAGE
 #
 # The function runs as rpm update trigger. It pulls shell script from hestia
 # server and runs it.

+ 1 - 1
bin/v-update-sys-hestia-all

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: update all hestia packages
-# options: USER [RESTART]
+# options: NONE
 #
 # The function of updating all hestia packages