Fixes on the list users
parent
1e9c38673c
commit
dbe5bd5c28
27
manifest.jps
27
manifest.jps
|
@ -1,7 +1,7 @@
|
|||
version: 0.1
|
||||
version: 0.2
|
||||
id: addsftp
|
||||
type: update
|
||||
description: An addon to add new SFTP users. It can also manage created user accounts.
|
||||
description: An addon to add new SFTP users. It can also manage created user accounts. If SSH is enabled, WP-CLI will attempt to be installed if it is not yet installed.
|
||||
name: Add SFTP User
|
||||
|
||||
targetNodes:
|
||||
|
@ -10,17 +10,21 @@ targetNodes:
|
|||
settings:
|
||||
sfpform:
|
||||
fields:
|
||||
- type: string
|
||||
inputType: text
|
||||
name: root_directory
|
||||
caption: Root Directory
|
||||
default: "/var/www/webroot/ROOT/"
|
||||
description: "A user-specific directory will be created under this path."
|
||||
- type: displayfield
|
||||
name: infoField
|
||||
caption: Root Directory /var/www/webroot/ROOT/
|
||||
description: "A user-specific directory will be created under /home/username"
|
||||
required: false
|
||||
- type: checkbox
|
||||
name: allow
|
||||
caption: Accept User Creation
|
||||
default: ${globals.defaultCheckbox}
|
||||
required: true
|
||||
- type: checkbox
|
||||
name: enable_ssh
|
||||
caption: Also enable SSH access
|
||||
default: false
|
||||
required: false
|
||||
manageUserForm:
|
||||
fields:
|
||||
- type: string
|
||||
|
@ -64,7 +68,6 @@ menu:
|
|||
action: "list_users"
|
||||
caption: "List Users"
|
||||
successText: "Users listed successfully!"
|
||||
logsPath: "/home/jelastic/add-sftp-user-addon/logs/sftp-users.log"
|
||||
logsNodeGroup: cp
|
||||
|
||||
actions:
|
||||
|
@ -105,7 +108,7 @@ actions:
|
|||
list_users:
|
||||
- cmd[cp]:
|
||||
user: root
|
||||
commands: "grep -oP '^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2} - user\\d{5}' /home/litespeed/add-sftp-user-addon/logs/script_output.log | while read line; do printf \"%s\\n\" \"$line\"; done"
|
||||
commands: ls -ld /home/sftpusers/* | awk '{printf "Username %s - Created %s %s %s\n", substr($9, 17), $6, $7, $8}'
|
||||
- return: listUsers
|
||||
|
||||
responses:
|
||||
|
@ -130,6 +133,9 @@ responses:
|
|||
deleteUserSuccess:
|
||||
type: success
|
||||
message: "User ${settings.manage_username} deleted successfully."
|
||||
noUsersFound:
|
||||
type: error
|
||||
message: "No SFTP users have been created yet."
|
||||
listUsers:
|
||||
type: info
|
||||
message: "${response.out}"
|
||||
|
@ -139,6 +145,7 @@ buttons:
|
|||
action: add_sftp_user
|
||||
caption: Add SFTP/SSH User
|
||||
confirmText: "Are you sure you want to add this SFTP user?"
|
||||
submitButtonText: Add User
|
||||
- settings: manageUserForm
|
||||
action: change_password
|
||||
caption: Change Password
|
||||
|
|
Loading…
Reference in New Issue