Sven Ullmann
2 years ago
4 changed files with 11 additions and 74 deletions
-
61plugins/plesk/bak/includes/includes
-
13plugins/plesk/src/commands/create-domain
-
7plugins/plesk/src/includes/bash_header
-
4src/includes/project_manager
@ -1,61 +0,0 @@ |
|||
#!/bin/bash |
|||
|
|||
### DO NOT EDIT THIS FILE |
|||
|
|||
plesk_included=true |
|||
|
|||
function pleskValidate { |
|||
local env=$(getArgument "$1" "Usage: pleskValidate [live|stage]" "live stage") |
|||
|
|||
if [ "$ssh_included" == "" ] |
|||
then |
|||
echo >&2 |
|||
echoError "Plugin \"ssh\" has to be included" >&2 |
|||
echo >&2 |
|||
exit |
|||
fi |
|||
|
|||
if [ "$db_included" == "" ] |
|||
then |
|||
echo >&2 |
|||
echoError "Plugin \"db\" has to be included" >&2 |
|||
echo >&2 |
|||
exit |
|||
fi |
|||
|
|||
if [ "$plesk_host" == "" ] || [ "$plesk_user" == "" ] |
|||
then |
|||
echo >&2 |
|||
echoError "Please configure $project_manager_dir/data/$customer/$project/etc/plugins/plesk/config" >&2 |
|||
echo >&2 |
|||
exit |
|||
fi |
|||
|
|||
if [ "$(dbGetConfig "$env" "user")" == "" ] || [ "$(dbGetConfig "$env" "database")" == "" ] || [ "$(dbGetConfig "$env" "password")" == "" ] |
|||
then |
|||
echo >&2 |
|||
echoError "Please configure $project_manager_dir/data/$customer/$project/etc/plugins/db/config" >&2 |
|||
echo >&2 |
|||
exit |
|||
fi |
|||
} |
|||
|
|||
function pleskAddSSHKey { |
|||
if [ ! -f "$plesk_private_key" ] && [ ! -f "$app_dir/.ssh/plesk" ] |
|||
then |
|||
sshGenerateKey "plesk" |
|||
sshCopyIdKey "plesk" "$plesk_user@$plesk_host" "$app_dir/.ssh/plesk.pub" |
|||
fi |
|||
|
|||
if [ -f "$plesk_private_key" ] && [ ! -f "$app_dir/.ssh/plesk" ] |
|||
then |
|||
sshCopyKey "plesk" "$plesk_private_key" |
|||
fi |
|||
|
|||
if [ -f "$plesk_public_key" ] && [ ! -f "$app_dir/.ssh/plesk.pub" ] |
|||
then |
|||
sshCopyKey "plesk.pub" "$plesk_private_key" |
|||
fi |
|||
|
|||
ssh-add "$app_dir/.ssh/plesk" |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue