File tree Expand file tree Collapse file tree 3 files changed +15
-15
lines changed
Expand file tree Collapse file tree 3 files changed +15
-15
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22# info: list all API access keys
3- # options: [FORMAT]
3+ # options: [USER] [ FORMAT]
44#
55# example: v-list-access-keys json
66
77# ----------------------------------------------------------#
88# Variables & Functions #
99# ----------------------------------------------------------#
1010
11- # Argument definition
12- user=" $1 "
13- format=" ${2:- shell} "
14-
1511# Includes
1612# shellcheck source=/etc/hestiacp/hestia.conf
1713source /etc/hestiacp/hestia.conf
@@ -20,6 +16,10 @@ source $HESTIA/func/main.sh
2016# load config file
2117source_conf " $HESTIA /conf/hestia.conf"
2218
19+ # Argument definition
20+ user=" $1 "
21+ format=" ${2:- shell} "
22+
2323# JSON list function
2424json_list () {
2525 echo -n ' {'
Original file line number Diff line number Diff line change 11#! /bin/bash
22# info: update user usage counters
3- # options: USER
3+ # options: [ USER]
44#
55# example: v-update-user-counters admin
66#
1010# Variables & Functions #
1111# ----------------------------------------------------------#
1212
13- # Argument definition
14- user=$1
15-
1613# Includes
1714# shellcheck source=/etc/hestiacp/hestia.conf
1815source /etc/hestiacp/hestia.conf
@@ -21,11 +18,14 @@ source $HESTIA/func/main.sh
2118# load config file
2219source_conf " $HESTIA /conf/hestia.conf"
2320
21+ # Argument definition
22+ user=$1
23+
2424# ----------------------------------------------------------#
2525# Verifications #
2626# ----------------------------------------------------------#
2727
28- check_args ' 0' " $# " ' USER'
28+ check_args ' 0' " $# " ' [ USER] '
2929if [ -n " $user " ]; then
3030 is_format_valid ' user'
3131 is_object_valid ' user' ' USER' " $user "
Original file line number Diff line number Diff line change 11#! /bin/bash
22# info: update user statistics
3- # options: USER
3+ # options: [ USER]
44#
55# example: v-update-user-stats admin
66#
1010# Variables & Functions #
1111# ----------------------------------------------------------#
1212
13- # Argument definition
14- user=$1
15-
1613# Importing system environment as we run this script
1714# mostly by cron wich not read it by itself
1815source /etc/profile.d/hestia.sh
@@ -27,11 +24,14 @@ source $HESTIA/func/domain.sh
2724# load config file
2825source_conf " $HESTIA /conf/hestia.conf"
2926
27+ # Argument definition
28+ user=$1
29+
3030# ----------------------------------------------------------#
3131# Verifications #
3232# ----------------------------------------------------------#
3333
34- check_args ' 0' " $# " ' USER'
34+ check_args ' 0' " $# " ' [ USER] '
3535if [ ! -z " $user " ]; then
3636 is_format_valid ' user'
3737 is_object_valid ' user' ' USER' " $user "
You can’t perform that action at this time.
0 commit comments