Jelajahi Sumber

Fix script comments for consistency

bisubus 5 tahun lalu
induk
melakukan
e9354b3361

+ 1 - 1
bin/v-add-cron-reports

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: add cron reports
-# options: user
+# options: USER
 #
 # The script for enabling reports on cron tasks and administrative
 # notifications.

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

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: add letsencrypt for host and backend
-# options:
+# options: NONE
 #
 # The function check and validates the backend certificate and generate
 # a new let's encrypt certificate.

+ 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: NONE
 #
 # The function installs the File Manager on the server
 # for access through the Web interface.

+ 2 - 2
bin/v-add-sys-theme

@@ -1,7 +1,7 @@
 #!/bin/bash
 # info: install theme from local source or GitHub.
-# options: theme [MODE] [ACTIVE]
-
+# options: THEME [MODE] [ACTIVE]
+#
 # The function for installing a custom theme or downloading one
 # from the HestiaCP theme repository.
 

+ 2 - 2
bin/v-add-user-ssh-key

@@ -1,8 +1,8 @@
 #!/bin/bash
 # info: add ssh key
-# options: USER key
+# options: USER KEY
 #
-# Function check if $user/.ssh/authorized_keys exists and create it
+# Function check if $user/.ssh/authorized_keys exists and create it.
 # After that it append the new key(s)
 
 #----------------------------------------------------------#

+ 6 - 5
bin/v-change-sys-db-alias

@@ -1,11 +1,12 @@
 #!/bin/bash
 # info: change phpmyadmin/phppgadmin alias url
-# options: type alias
-# example:  v-change-sys-db-alias pma phpmyadmin
-#           Sets phpMyAdmin alias to phpmyadmin
+# options: TYPE ALIAS
 #
-# example:  v-change-sys-db-alias pga phppgadmin
-#           Sets phpPgAdmin alias to phppgadmin
+# example: v-change-sys-db-alias pma phpmyadmin
+#          # Sets phpMyAdmin alias to phpmyadmin
+#
+# example: v-change-sys-db-alias pga phppgadmin
+#          # Sets phpPgAdmin alias to phppgadmin
 #
 # This function changes the database editor url in
 # apache2 or nginx configuration.

+ 1 - 1
bin/v-change-sys-demo-mode

@@ -1,10 +1,10 @@
 #!/bin/bash
 # info: enable or disable demo mode
 # options: ACTIVE
+#
 # This function will set the demo mode variable,
 # which will prevent usage of certain v-scripts in the backend
 # and prevent modification of objects in the control panel.
-#
 # It will also disable virtual hosts for Apache and NGINX
 # for domains which have been created.
 

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

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

+ 1 - 1
bin/v-change-user-php-cli

@@ -1,7 +1,7 @@
 #!/bin/bash
 # info: add php version to .bash_aliases
 # options: USER VERSION
-
+#
 #  add line to .bash_aliases to set default php incase of multiPHP
 
 

+ 2 - 0
bin/v-change-user-role

@@ -1,6 +1,8 @@
 #!/bin/bash
 # info: updates user role
 # options: USER ROLE
+#
+# The function changes user's role.
 
 #----------------------------------------------------------#
 #                    Variable&Function                     #

+ 8 - 7
bin/v-change-web-domain-docroot

@@ -1,14 +1,15 @@
 #!/bin/bash
 # info: Changes the document root for an existing web domain
-
 # options: USER DOMAIN TARGET_DOMAIN [DIRECTORY] [PHP]
-# example usage:
-# add custom docroot:    v-change-web-domain-docroot admin domain.tld otherdomain.tld
-#                        points domain.tld to otherdomain.tld's document root.
 #
-# remove custom docroot: v-change-web-domain-docroot admin test.local default
-#                        returns document root to default value for domain.
-
+# example: v-change-web-domain-docroot admin domain.tld otherdomain.tld
+#          # add custom docroot
+#          # points domain.tld to otherdomain.tld's document root.
+#
+# example: v-change-web-domain-docroot admin test.local default
+#          # remove custom docroot
+#          # returns document root to default value for domain.
+#
 # This call changes the document root of a chosen web domain
 # to another available domain under the user context.
 

+ 3 - 0
bin/v-change-web-domain-sslhome

@@ -1,5 +1,8 @@
 #!/bin/bash
 # info: changing domain ssl home
+# options: NONE
+#
+# The function changes SSL home directory.
 
 #----------------------------------------------------------#
 #                    Variable&Function                     #

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

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

+ 3 - 1
bin/v-delete-sys-theme

@@ -1,6 +1,8 @@
 #!/bin/bash
-# info: removes a theme from the custom theme library.
+# info: removes a theme from the custom theme library
 # options: [RESTART]
+#
+# The function removes a theme from the custom theme library.
 
 
 #----------------------------------------------------------#

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

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

+ 2 - 2
bin/v-delete-user-ssh-key

@@ -1,8 +1,8 @@
 #!/bin/bash
 # info: add ssh key
-# options: USER key
+# options: USER KEY
 #
-# Function check if $user/.ssh/authorized_keys exists and create it
+# Function check if $user/.ssh/authorized_keys exists and create it.
 # After that it append the new key(s)
 
 #----------------------------------------------------------#

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

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: generate api key
-# options: none
+# options: NONE
 #
 # The function creates a key file in $HESTIA/data/keys/
 

+ 4 - 4
bin/v-generate-password-hash

@@ -1,14 +1,14 @@
 #!/usr/local/hestia/php/bin/php
 <?php
-//# info: generate password  hash
-//# options: HASH-METHOD SALT PASSWORD
-//
+//# info: generate password hash
+//# options: HASH_METHOD SALT PASSWORD
+//#
 //# The function generates password hash
 
 // Checking arguments
 if ((empty($argv[1])) || (empty($argv[2]))) {
     echo "Error: not enought arguments\n";
-    echo "Usage: " . $argv[0] ." HASH-METHOD SALT PASSWORD\n";
+    echo "Usage: " . $argv[0] ." HASH_METHOD SALT PASSWORD\n";
     exit(1);
 }
 

+ 3 - 0
bin/v-refresh-sys-theme

@@ -1,4 +1,7 @@
 #!/bin/bash
+# info: change active system theme
+# options: NONE
+#
 # The function for changing the currently active system theme.
 
 #----------------------------------------------------------#

+ 1 - 1
bin/v-restart-service

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

+ 1 - 1
bin/v-restart-system

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

+ 3 - 2
bin/v-search-command

@@ -1,13 +1,14 @@
 #!/bin/bash
-
 # info: search for available commands
+# options: NONE
 #
 # This function searches for available Hestia Control Panel commands
 # and returns results based on the specified criteria.
-#
+
 # Originally developed for VestaCP by Federico Krum
 # https://github.com/FastDigitalOceanDroplets/VestaCP/blob/master/files/v-search-command
 
+
 #----------------------------------------------------------#
 #                    Variable&Function                     #
 #----------------------------------------------------------#

+ 1 - 1
bin/v-start-service

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: start service
-# options: service
+# options: SERVICE
 #
 # The function starts system service.
 

+ 1 - 1
bin/v-stop-service

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: stop service
-# options: service
+# options: SERVICE
 #
 # The function stops system service.
 

+ 11 - 10
bin/v-update-sys-hestia-git

@@ -1,15 +1,16 @@
 #!/bin/bash
-
-# v-update-sys-hestia-git
+# info: Delete log file for user
+# options: REPOSITORY BRANCH INSTALL [PACKAGES]
+#
+# example: v-update-sys-hestia-git hestiacp staging/beta install all
+#          # Will download from the hestiacp repository
+#          # Pulls code from staging/beta branch
+#          # install: installs package immediately
+#          # install-auto: installs package and schedules automatic updates from Git
+#          # 'all': (optional) - compiles nginx and php alongside panel.
+#          #                     this option takes a long time, only use when needed
+#
 # Downloads and compiles/installs packages from GitHub repositories
-# Options:  REPOSITORY BRANCH INSTALL [PACKAGES]
-# Example:  v-update-sys-hestia-git hestiacp staging/beta install all
-#           - Will download from the hestiacp repository
-#           - Pulls code from staging/beta branch
-#           - install: installs package immediately
-#           - install-auto: installs package and schedules automatic updates from Git
-#           - 'all': (optional) - compiles nginx and php alongside panel.
-#                                 this option takes a long time, only use when needed
 
 
 # Define download function

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

@@ -1,6 +1,6 @@
 #!/bin/bash
 # info: update system ip
-# options: [NONE]
+# options: NONE
 #
 # The function scans configured ip in the system and register them with hestia
 # internal database. This call is intended for use on vps servers, where ip is