Added log helper
parent
7d6eb40d13
commit
af8889bd3e
|
@ -0,0 +1,24 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Simple logging function for SFTP User Addon
|
||||||
|
log_message() {
|
||||||
|
local level="$1"
|
||||||
|
local message="$2"
|
||||||
|
local logfile="$3"
|
||||||
|
local timestamp=$(date +"%Y-%m-%d %H:%M:%S")
|
||||||
|
|
||||||
|
echo "[$timestamp][$level] $message" >> "/home/jelastic/add-sftp-user-addon/logs/$logfile"
|
||||||
|
|
||||||
|
# Also log to main log
|
||||||
|
echo "[$timestamp][$level] $message" >> "/home/jelastic/add-sftp-user-addon/logs/script_output.log"
|
||||||
|
|
||||||
|
# Log errors/warnings
|
||||||
|
if [[ "$level" == "ERROR" || "$level" == "WARNING" ]]; then
|
||||||
|
echo "[$timestamp][$level] $message" >> "/home/jelastic/add-sftp-user-addon/logs/errors.log"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Log success/info
|
||||||
|
if [[ "$level" == "INFO" || "$level" == "SUCCESS" ]]; then
|
||||||
|
echo "[$timestamp][$level] $message" >> "/home/jelastic/add-sftp-user-addon/logs/operations.log"
|
||||||
|
fi
|
||||||
|
}
|
329
manifest.jps
329
manifest.jps
|
@ -11,52 +11,52 @@ settings:
|
||||||
sfpform:
|
sfpform:
|
||||||
submitUnchanged: true
|
submitUnchanged: true
|
||||||
fields:
|
fields:
|
||||||
- type: displayfield
|
- type: displayfield
|
||||||
name: infoField
|
name: infoField
|
||||||
caption: Root Directory /var/www/webroot/ROOT/
|
caption: Root Directory /var/www/webroot/ROOT/
|
||||||
description: "Files will be accessible in a data/ROOT directory within the user's home"
|
description: "Files will be accessible in a data/ROOT directory within the user's home"
|
||||||
required: false
|
required: false
|
||||||
- type: string
|
- type: string
|
||||||
name: custom_username
|
name: custom_username
|
||||||
caption: Custom Username
|
caption: Custom Username
|
||||||
description: "Enter a custom username (3-32 characters, alphanumeric + underscore only)"
|
description: "Enter a custom username (3-32 characters, alphanumeric + underscore only)"
|
||||||
required: true
|
required: true
|
||||||
regex: ^[a-zA-Z0-9_]{3,32}$
|
regex: ^[a-zA-Z0-9_]{3,32}$
|
||||||
regexText: "Username must be 3-32 characters long and contain only letters, numbers, and underscores"
|
regexText: "Username must be 3-32 characters long and contain only letters, numbers, and underscores"
|
||||||
- type: checkbox
|
- type: checkbox
|
||||||
name: allow
|
name: allow
|
||||||
caption: Accept User Creation
|
caption: Accept User Creation
|
||||||
default: false
|
default: false
|
||||||
required: false
|
required: false
|
||||||
- type: checkbox
|
- type: checkbox
|
||||||
name: enable_ssh
|
name: enable_ssh
|
||||||
caption: Also enable SSH access
|
caption: Also enable SSH access
|
||||||
default: false
|
default: false
|
||||||
required: false
|
required: false
|
||||||
tip: "If enabled, the user will have both SFTP and SSH access. Otherwise, only SFTP access will be granted."
|
tip: "If enabled, the user will have both SFTP and SSH access. Otherwise, only SFTP access will be granted."
|
||||||
manageUserForm:
|
manageUserForm:
|
||||||
fields:
|
fields:
|
||||||
- type: string
|
- type: string
|
||||||
name: manage_username
|
name: manage_username
|
||||||
caption: Username to Manage
|
caption: Username to Manage
|
||||||
description: "Enter the username you want to manage."
|
description: "Enter the username you want to manage."
|
||||||
required: true
|
required: true
|
||||||
regex: ^[a-zA-Z0-9_]{3,32}$
|
regex: ^[a-zA-Z0-9_]{3,32}$
|
||||||
regexText: "Username must be 3-32 characters long and contain only letters, numbers, and underscores"
|
regexText: "Username must be 3-32 characters long and contain only letters, numbers, and underscores"
|
||||||
- type: string
|
- type: string
|
||||||
name: custom_password
|
name: custom_password
|
||||||
caption: New Password
|
caption: New Password
|
||||||
description: "Enter a new password for the user (leave empty to generate random password)"
|
description: "Enter a new password for the user (leave empty to generate random password)"
|
||||||
required: false
|
required: false
|
||||||
deleteUserForm:
|
deleteUserForm:
|
||||||
fields:
|
fields:
|
||||||
- type: string
|
- type: string
|
||||||
name: manage_username
|
name: manage_username
|
||||||
caption: Username to Delete
|
caption: Username to Delete
|
||||||
description: "Enter the username you want to delete."
|
description: "Enter the username you want to delete."
|
||||||
required: true
|
required: true
|
||||||
regex: ^[a-zA-Z0-9_]{3,32}$
|
regex: ^[a-zA-Z0-9_]{3,32}$
|
||||||
regexText: "Username must be 3-32 characters long and contain only letters, numbers, and underscores"
|
regexText: "Username must be 3-32 characters long and contain only letters, numbers, and underscores"
|
||||||
|
|
||||||
globals:
|
globals:
|
||||||
username: ${settings.custom_username}
|
username: ${settings.custom_username}
|
||||||
|
@ -65,7 +65,7 @@ globals:
|
||||||
sftpPort: 22
|
sftpPort: 22
|
||||||
|
|
||||||
onInstall:
|
onInstall:
|
||||||
- cmd [cp]:
|
- cmd[cp]:
|
||||||
user: root
|
user: root
|
||||||
commands: |-
|
commands: |-
|
||||||
# Create required directories and files
|
# Create required directories and files
|
||||||
|
@ -76,7 +76,10 @@ onInstall:
|
||||||
|
|
||||||
# Download scripts
|
# Download scripts
|
||||||
wget https://deploy-proxy.mightybox.io/addons/add-sftp-user/raw/branch/main/add-sftp.sh -O /home/jelastic/add-sftp-user-addon/add-sftp.sh
|
wget https://deploy-proxy.mightybox.io/addons/add-sftp-user/raw/branch/main/add-sftp.sh -O /home/jelastic/add-sftp-user-addon/add-sftp.sh
|
||||||
|
wget https://deploy-proxy.mightybox.io/addons/add-sftp-user/raw/branch/main/log_helper.sh -O /home/jelastic/add-sftp-user-addon/log_helper.sh
|
||||||
|
|
||||||
chmod +x /home/jelastic/add-sftp-user-addon/add-sftp.sh
|
chmod +x /home/jelastic/add-sftp-user-addon/add-sftp.sh
|
||||||
|
chmod +x /home/jelastic/add-sftp-user-addon/log_helper.sh
|
||||||
|
|
||||||
# Very important - fix /home directory permissions for SFTP chroot
|
# Very important - fix /home directory permissions for SFTP chroot
|
||||||
echo "$(date) - Checking and fixing /home directory permissions for SFTP chroot" >> /home/jelastic/add-sftp-user-addon/logs/script_output.log
|
echo "$(date) - Checking and fixing /home directory permissions for SFTP chroot" >> /home/jelastic/add-sftp-user-addon/logs/script_output.log
|
||||||
|
@ -91,16 +94,6 @@ onInstall:
|
||||||
chmod 755 /home
|
chmod 755 /home
|
||||||
|
|
||||||
echo "Fixed /home ownership to root:root with 755 permissions" >> /home/jelastic/add-sftp-user-addon/logs/script_output.log
|
echo "Fixed /home ownership to root:root with 755 permissions" >> /home/jelastic/add-sftp-user-addon/logs/script_output.log
|
||||||
|
|
||||||
# Create standard SFTP config helper
|
|
||||||
cat > /home/jelastic/add-sftp-user-addon/log_helper.sh << 'EOF'
|
|
||||||
#!/bin/bash
|
|
||||||
# Logging helper script
|
|
||||||
# ... content of log_helper.sh ...
|
|
||||||
EOF
|
|
||||||
|
|
||||||
chmod +x /home/jelastic/add-sftp-user-addon/log_helper.sh
|
|
||||||
|
|
||||||
echo "$(date) - Installing SFTP addon on Jelastic environment" >> /home/jelastic/add-sftp-user-addon/logs/script_output.log
|
echo "$(date) - Installing SFTP addon on Jelastic environment" >> /home/jelastic/add-sftp-user-addon/logs/script_output.log
|
||||||
|
|
||||||
- cmd[cp]:
|
- cmd[cp]:
|
||||||
|
@ -216,24 +209,22 @@ actions:
|
||||||
LOG_FILE="/home/jelastic/add-sftp-user-addon/logs/password_change.log"
|
LOG_FILE="/home/jelastic/add-sftp-user-addon/logs/password_change.log"
|
||||||
touch "$LOG_FILE"
|
touch "$LOG_FILE"
|
||||||
|
|
||||||
# Silent source and redirect all logging
|
# Source the logging helper
|
||||||
{
|
source /home/jelastic/add-sftp-user-addon/log_helper.sh
|
||||||
source /home/jelastic/add-sftp-user-addon/log_helper.sh &>/dev/null
|
|
||||||
|
# Log start of process
|
||||||
jps_log "INFO" "======== STARTING PASSWORD CHANGE ========" "password_change.log"
|
log_message "INFO" "======== STARTING PASSWORD CHANGE ========" "password_change.log"
|
||||||
jps_log "INFO" "Verifying user exists: ${settings.manage_username}" "password_change.log"
|
log_message "INFO" "Verifying user exists: ${settings.manage_username}" "password_change.log"
|
||||||
|
|
||||||
# Check if user exists without logging to stdout
|
# Check if user exists
|
||||||
if id ${settings.manage_username} &>/dev/null; then
|
if id ${settings.manage_username} &>/dev/null; then
|
||||||
jps_log "INFO" "User ${settings.manage_username} exists" "password_change.log"
|
log_message "INFO" "User ${settings.manage_username} exists" "password_change.log"
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
jps_log "ERROR" "User ${settings.manage_username} does not exist" "password_change.log"
|
log_message "ERROR" "User ${settings.manage_username} does not exist" "password_change.log"
|
||||||
# Only output the error message
|
echo "User does not exist"
|
||||||
echo "User does not exist"
|
exit 1
|
||||||
exit 1
|
fi
|
||||||
fi
|
|
||||||
} &>> "$LOG_FILE"
|
|
||||||
- if ("${response.exitStatus}" != "0"):
|
- if ("${response.exitStatus}" != "0"):
|
||||||
return:
|
return:
|
||||||
type: error
|
type: error
|
||||||
|
@ -251,24 +242,22 @@ actions:
|
||||||
- cmd[cp]:
|
- cmd[cp]:
|
||||||
user: root
|
user: root
|
||||||
commands: |-
|
commands: |-
|
||||||
# Redirect all logging
|
# Source the logging helper
|
||||||
{
|
source /home/jelastic/add-sftp-user-addon/log_helper.sh
|
||||||
source /home/jelastic/add-sftp-user-addon/log_helper.sh &>/dev/null
|
|
||||||
|
log_message "INFO" "Changing password for user: ${settings.manage_username}" "password_change.log"
|
||||||
jps_log "INFO" "Changing password for user: ${settings.manage_username}" "password_change.log"
|
|
||||||
|
# Change password using echo and chpasswd
|
||||||
# Change password using echo and chpasswd
|
if echo "${settings.manage_username}:${globals.password}" | /usr/sbin/chpasswd; then
|
||||||
if echo "${settings.manage_username}:${globals.password}" | /usr/sbin/chpasswd; then
|
log_message "SUCCESS" "Password changed successfully for ${settings.manage_username}" "password_change.log"
|
||||||
jps_log "SUCCESS" "Password changed successfully for ${settings.manage_username}" "password_change.log"
|
echo "Password changed for ${settings.manage_username} at $(date)" >> /home/jelastic/add-sftp-user-addon/logs/script_output.log
|
||||||
echo "Password changed for ${settings.manage_username} at $(date)" >> /home/jelastic/add-sftp-user-addon/logs/script_output.log
|
exit 0
|
||||||
exit 0
|
else
|
||||||
else
|
log_message "ERROR" "Failed to change password for ${settings.manage_username}" "password_change.log"
|
||||||
jps_log "ERROR" "Failed to change password for ${settings.manage_username}" "password_change.log"
|
exit 1
|
||||||
exit 1
|
fi
|
||||||
fi
|
|
||||||
|
log_message "SUCCESS" "======== PASSWORD CHANGE COMPLETED ========" "password_change.log"
|
||||||
jps_log "SUCCESS" "======== PASSWORD CHANGE COMPLETED ========" "password_change.log"
|
|
||||||
} &>> /home/jelastic/add-sftp-user-addon/logs/password_change.log
|
|
||||||
- if ("${response.exitStatus}" != "0"):
|
- if ("${response.exitStatus}" != "0"):
|
||||||
return: passwordChangeError
|
return: passwordChangeError
|
||||||
- return: passwordChangeSuccess
|
- return: passwordChangeSuccess
|
||||||
|
@ -281,23 +270,22 @@ actions:
|
||||||
LOG_FILE="/home/jelastic/add-sftp-user-addon/logs/user_deletion.log"
|
LOG_FILE="/home/jelastic/add-sftp-user-addon/logs/user_deletion.log"
|
||||||
touch "$LOG_FILE"
|
touch "$LOG_FILE"
|
||||||
|
|
||||||
# Silent source and redirect all logging
|
# Source the logging helper
|
||||||
{
|
source /home/jelastic/add-sftp-user-addon/log_helper.sh
|
||||||
source /home/jelastic/add-sftp-user-addon/log_helper.sh &>/dev/null
|
|
||||||
|
# Log start of process
|
||||||
jps_log "INFO" "======== STARTING USER DELETION ========" "user_deletion.log"
|
log_message "INFO" "======== STARTING USER DELETION ========" "user_deletion.log"
|
||||||
jps_log "INFO" "Verifying user exists: ${settings.manage_username}" "user_deletion.log"
|
log_message "INFO" "Verifying user exists: ${settings.manage_username}" "user_deletion.log"
|
||||||
|
|
||||||
# Check if user exists without logging to stdout
|
# Check if user exists
|
||||||
if id ${settings.manage_username} &>/dev/null; then
|
if id ${settings.manage_username} &>/dev/null; then
|
||||||
jps_log "INFO" "User ${settings.manage_username} exists" "user_deletion.log"
|
log_message "INFO" "User ${settings.manage_username} exists" "user_deletion.log"
|
||||||
else
|
exit 0
|
||||||
jps_log "ERROR" "User ${settings.manage_username} does not exist" "user_deletion.log"
|
else
|
||||||
# Only output the error message
|
log_message "ERROR" "User ${settings.manage_username} does not exist" "user_deletion.log"
|
||||||
echo "User does not exist"
|
echo "User does not exist"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
} &>> "$LOG_FILE"
|
|
||||||
- if ("${response.exitStatus}" != "0"):
|
- if ("${response.exitStatus}" != "0"):
|
||||||
return:
|
return:
|
||||||
type: error
|
type: error
|
||||||
|
@ -307,21 +295,19 @@ actions:
|
||||||
- cmd[cp]:
|
- cmd[cp]:
|
||||||
user: root
|
user: root
|
||||||
commands: |-
|
commands: |-
|
||||||
# Redirect all logging
|
# Source the logging helper
|
||||||
{
|
source /home/jelastic/add-sftp-user-addon/log_helper.sh
|
||||||
source /home/jelastic/add-sftp-user-addon/log_helper.sh &>/dev/null
|
|
||||||
|
log_message "INFO" "Checking home directory for: ${settings.manage_username}" "user_deletion.log"
|
||||||
jps_log "INFO" "Checking home directory for: ${settings.manage_username}" "user_deletion.log"
|
|
||||||
|
if test -d /home/sftpusers/${settings.manage_username}; then
|
||||||
if test -d /home/sftpusers/${settings.manage_username}; then
|
log_message "INFO" "Home directory found: /home/sftpusers/${settings.manage_username}" "user_deletion.log"
|
||||||
jps_log "INFO" "Home directory found: /home/sftpusers/${settings.manage_username}" "user_deletion.log"
|
exit 0
|
||||||
else
|
else
|
||||||
jps_log "ERROR" "Home directory not found for user: ${settings.manage_username}" "user_deletion.log"
|
log_message "ERROR" "Home directory not found for user: ${settings.manage_username}" "user_deletion.log"
|
||||||
# Only output the error message
|
echo "User home directory not found"
|
||||||
echo "User home directory not found"
|
exit 1
|
||||||
exit 1
|
fi
|
||||||
fi
|
|
||||||
} &>> /home/jelastic/add-sftp-user-addon/logs/user_deletion.log
|
|
||||||
- if ("${response.exitStatus}" != "0"):
|
- if ("${response.exitStatus}" != "0"):
|
||||||
return:
|
return:
|
||||||
type: error
|
type: error
|
||||||
|
@ -331,44 +317,40 @@ actions:
|
||||||
- cmd[cp]:
|
- cmd[cp]:
|
||||||
user: root
|
user: root
|
||||||
commands: |-
|
commands: |-
|
||||||
# Redirect all logging
|
# Source the logging helper
|
||||||
{
|
source /home/jelastic/add-sftp-user-addon/log_helper.sh
|
||||||
source /home/jelastic/add-sftp-user-addon/log_helper.sh &>/dev/null
|
|
||||||
|
log_message "INFO" "Starting deletion of user: ${settings.manage_username}" "user_deletion.log"
|
||||||
jps_log "INFO" "Starting deletion of user: ${settings.manage_username}" "user_deletion.log"
|
|
||||||
|
# First unmount any bind mounts
|
||||||
# First unmount any bind mounts
|
if mount | grep -q "/home/sftpusers/${settings.manage_username}/data/ROOT"; then
|
||||||
if mount | grep -q "/home/sftpusers/${settings.manage_username}/data/ROOT"; then
|
log_message "INFO" "Unmounting bind mount for user: ${settings.manage_username}" "user_deletion.log"
|
||||||
jps_log "INFO" "Unmounting bind mount for user: ${settings.manage_username}" "user_deletion.log"
|
umount /home/sftpusers/${settings.manage_username}/data/ROOT
|
||||||
umount /home/sftpusers/${settings.manage_username}/data/ROOT
|
fi
|
||||||
fi
|
|
||||||
|
# Remove from fstab
|
||||||
# Remove from fstab
|
if grep -q "/home/sftpusers/${settings.manage_username}/data/ROOT" /etc/fstab; then
|
||||||
if grep -q "/home/sftpusers/${settings.manage_username}/data/ROOT" /etc/fstab; then
|
log_message "INFO" "Removing bind mount from fstab for user: ${settings.manage_username}" "user_deletion.log"
|
||||||
jps_log "INFO" "Removing bind mount from fstab for user: ${settings.manage_username}" "user_deletion.log"
|
sed -i "\|/home/sftpusers/${settings.manage_username}/data/ROOT|d" /etc/fstab
|
||||||
sed -i "\|/home/sftpusers/${settings.manage_username}/data/ROOT|d" /etc/fstab
|
fi
|
||||||
fi
|
|
||||||
|
# Delete user account
|
||||||
# Delete user account
|
if userdel ${settings.manage_username}; then
|
||||||
if userdel ${settings.manage_username}; then
|
log_message "SUCCESS" "User account deleted: ${settings.manage_username}" "user_deletion.log"
|
||||||
jps_log "SUCCESS" "User account deleted: ${settings.manage_username}" "user_deletion.log"
|
else
|
||||||
else
|
log_message "ERROR" "Failed to delete user account: ${settings.manage_username}" "user_deletion.log"
|
||||||
jps_log "ERROR" "Failed to delete user account: ${settings.manage_username}" "user_deletion.log"
|
exit 1
|
||||||
exit 1
|
fi
|
||||||
fi
|
|
||||||
|
# Remove home directory
|
||||||
# Remove home directory
|
if rm -rf /home/sftpusers/${settings.manage_username}; then
|
||||||
if rm -rf /home/sftpusers/${settings.manage_username}; then
|
log_message "SUCCESS" "Home directory removed: /home/sftpusers/${settings.manage_username}" "user_deletion.log"
|
||||||
jps_log "SUCCESS" "Home directory removed: /home/sftpusers/${settings.manage_username}" "user_deletion.log"
|
else
|
||||||
else
|
log_message "WARNING" "Failed to remove home directory for: ${settings.manage_username}" "user_deletion.log"
|
||||||
jps_log "WARNING" "Failed to remove home directory for: ${settings.manage_username}" "user_deletion.log"
|
fi
|
||||||
fi
|
|
||||||
|
log_message "SUCCESS" "======== USER DELETION COMPLETED ========" "user_deletion.log"
|
||||||
# Log to main log file
|
exit 0
|
||||||
echo "User ${settings.manage_username} deleted at $(date)" >> /home/jelastic/add-sftp-user-addon/logs/script_output.log
|
|
||||||
|
|
||||||
jps_log "SUCCESS" "======== USER DELETION COMPLETED ========" "user_deletion.log"
|
|
||||||
} &>> /home/jelastic/add-sftp-user-addon/logs/user_deletion.log
|
|
||||||
- if ("${response.exitStatus}" != "0"):
|
- if ("${response.exitStatus}" != "0"):
|
||||||
return: deleteUserError
|
return: deleteUserError
|
||||||
- return: deleteUserSuccess
|
- return: deleteUserSuccess
|
||||||
|
@ -380,32 +362,25 @@ actions:
|
||||||
LOG_FILE="/home/jelastic/add-sftp-user-addon/logs/list_users.log"
|
LOG_FILE="/home/jelastic/add-sftp-user-addon/logs/list_users.log"
|
||||||
touch "$LOG_FILE"
|
touch "$LOG_FILE"
|
||||||
|
|
||||||
# For list_users, log only to file, return clean output to response
|
# Source the logging helper
|
||||||
{
|
source /home/jelastic/add-sftp-user-addon/log_helper.sh
|
||||||
source /home/jelastic/add-sftp-user-addon/log_helper.sh &>/dev/null
|
|
||||||
|
# Log start of process
|
||||||
jps_log "INFO" "======== LISTING SFTP USERS ========" "list_users.log"
|
log_message "INFO" "======== LISTING SFTP USERS ========" "list_users.log"
|
||||||
jps_log "INFO" "Retrieving list of SFTP users" "list_users.log"
|
log_message "INFO" "Retrieving list of SFTP users" "list_users.log"
|
||||||
} &>> "$LOG_FILE"
|
|
||||||
|
|
||||||
# List users without logging to stdout - only return the clean list
|
# List users without logging to stdout - only return the clean list
|
||||||
USERS_LIST=$(ls -ld /home/sftpusers/* 2>/dev/null | grep -v "total" | awk '{printf "Username: %s - Created: %s %s %s\n", substr($9, 17), $6, $7, $8}')
|
USERS_LIST=$(ls -ld /home/sftpusers/* 2>/dev/null | grep -v "total" | awk '{printf "Username: %s - Created: %s %s %s\n", substr($9, 17), $6, $7, $8}')
|
||||||
|
|
||||||
# Check if any users were found
|
# Check if any users were found
|
||||||
if [ -z "$USERS_LIST" ]; then
|
if [ -z "$USERS_LIST" ]; then
|
||||||
{
|
log_message "WARNING" "No SFTP users found" "list_users.log"
|
||||||
source /home/jelastic/add-sftp-user-addon/log_helper.sh &>/dev/null
|
log_message "INFO" "======== USER LISTING COMPLETED ========" "list_users.log"
|
||||||
jps_log "WARNING" "No SFTP users found" "list_users.log"
|
|
||||||
jps_log "INFO" "======== USER LISTING COMPLETED ========" "list_users.log"
|
|
||||||
} &>> "$LOG_FILE"
|
|
||||||
echo ""
|
echo ""
|
||||||
else
|
else
|
||||||
{
|
log_message "SUCCESS" "Retrieved list of SFTP users" "list_users.log"
|
||||||
source /home/jelastic/add-sftp-user-addon/log_helper.sh &>/dev/null
|
log_message "DEBUG" "Found users: $(echo "$USERS_LIST" | wc -l)" "list_users.log"
|
||||||
jps_log "SUCCESS" "Retrieved list of SFTP users" "list_users.log"
|
log_message "INFO" "======== USER LISTING COMPLETED ========" "list_users.log"
|
||||||
jps_log "DEBUG" "Found users: $(echo "$USERS_LIST" | wc -l)" "list_users.log"
|
|
||||||
jps_log "INFO" "======== USER LISTING COMPLETED ========" "list_users.log"
|
|
||||||
} &>> "$LOG_FILE"
|
|
||||||
echo "$USERS_LIST"
|
echo "$USERS_LIST"
|
||||||
fi
|
fi
|
||||||
- if ("${response.exitStatus}" != "0" || "${response.out}" == ""):
|
- if ("${response.exitStatus}" != "0" || "${response.out}" == ""):
|
||||||
|
|
Loading…
Reference in New Issue