diff --git a/manifest.jps b/manifest.jps index 5ca56f7..340caf5 100644 --- a/manifest.jps +++ b/manifest.jps @@ -70,21 +70,9 @@ menu: actions: add_sftp_user: - - cmd[cp]: # Use cmd action to check if user exists - commands: id ${globals.username} || echo "User not found" - - if ("${response.out}" == "User not found"): # If user doesn't exist - - cmd[cp]: - user: root - commands: bash /home/jelastic/add-sftp-user-addon/add-sftp.sh ${globals.username} ${globals.password} - - if ("${response.exitStatus}" != "0"): - return: createUserError - - else: - - setGlobals: - username: "user${fn.random(10000,99999)}" - - cmd[cp]: # Check again with the new username - commands: id ${globals.username} || echo "User not found" - - if ("${response.out}" != "User not found"): - return: userExistsError + - cmd[cp]: + user: root + commands: bash /home/jelastic/add-sftp-user-addon/add-sftp.sh ${globals.username} ${globals.password} - return: sftpSuccess change_password: - cmd[cp]: