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
|
id: addsftp
|
||||||
type: update
|
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
|
name: Add SFTP User
|
||||||
|
|
||||||
targetNodes:
|
targetNodes:
|
||||||
|
@ -10,17 +10,21 @@ targetNodes:
|
||||||
settings:
|
settings:
|
||||||
sfpform:
|
sfpform:
|
||||||
fields:
|
fields:
|
||||||
- type: string
|
- type: displayfield
|
||||||
inputType: text
|
name: infoField
|
||||||
name: root_directory
|
caption: Root Directory /var/www/webroot/ROOT/
|
||||||
caption: Root Directory
|
description: "A user-specific directory will be created under /home/username"
|
||||||
default: "/var/www/webroot/ROOT/"
|
|
||||||
description: "A user-specific directory will be created under this path."
|
|
||||||
required: false
|
required: false
|
||||||
|
- type: checkbox
|
||||||
|
name: allow
|
||||||
|
caption: Accept User Creation
|
||||||
|
default: ${globals.defaultCheckbox}
|
||||||
|
required: true
|
||||||
- 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
|
||||||
manageUserForm:
|
manageUserForm:
|
||||||
fields:
|
fields:
|
||||||
- type: string
|
- type: string
|
||||||
|
@ -64,7 +68,6 @@ menu:
|
||||||
action: "list_users"
|
action: "list_users"
|
||||||
caption: "List Users"
|
caption: "List Users"
|
||||||
successText: "Users listed successfully!"
|
successText: "Users listed successfully!"
|
||||||
logsPath: "/home/jelastic/add-sftp-user-addon/logs/sftp-users.log"
|
|
||||||
logsNodeGroup: cp
|
logsNodeGroup: cp
|
||||||
|
|
||||||
actions:
|
actions:
|
||||||
|
@ -105,7 +108,7 @@ actions:
|
||||||
list_users:
|
list_users:
|
||||||
- cmd[cp]:
|
- cmd[cp]:
|
||||||
user: root
|
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
|
- return: listUsers
|
||||||
|
|
||||||
responses:
|
responses:
|
||||||
|
@ -130,6 +133,9 @@ responses:
|
||||||
deleteUserSuccess:
|
deleteUserSuccess:
|
||||||
type: success
|
type: success
|
||||||
message: "User ${settings.manage_username} deleted successfully."
|
message: "User ${settings.manage_username} deleted successfully."
|
||||||
|
noUsersFound:
|
||||||
|
type: error
|
||||||
|
message: "No SFTP users have been created yet."
|
||||||
listUsers:
|
listUsers:
|
||||||
type: info
|
type: info
|
||||||
message: "${response.out}"
|
message: "${response.out}"
|
||||||
|
@ -139,6 +145,7 @@ buttons:
|
||||||
action: add_sftp_user
|
action: add_sftp_user
|
||||||
caption: Add SFTP/SSH User
|
caption: Add SFTP/SSH User
|
||||||
confirmText: "Are you sure you want to add this SFTP user?"
|
confirmText: "Are you sure you want to add this SFTP user?"
|
||||||
|
submitButtonText: Add User
|
||||||
- settings: manageUserForm
|
- settings: manageUserForm
|
||||||
action: change_password
|
action: change_password
|
||||||
caption: Change Password
|
caption: Change Password
|
||||||
|
|
Loading…
Reference in New Issue