diff options
| author | yalh76 <yalh@yahoo.com> | 2019-04-12 13:51:19 +0200 |
|---|---|---|
| committer | yalh76 <yalh@yahoo.com> | 2019-04-12 13:51:19 +0200 |
| commit | 8b342cce12664d760615743f8fb795076c5b825f (patch) | |
| tree | 869b89a0bbf1a13e8b4553a38cfa7a8f2eb10ebd /scripts | |
| parent | ea966973f58b2cd991335c6bc7e7eaec07e7fabc (diff) | |
| download | mastodon_ynh-8b342cce12664d760615743f8fb795076c5b825f.tar.gz mastodon_ynh-8b342cce12664d760615743f8fb795076c5b825f.tar.bz2 mastodon_ynh-8b342cce12664d760615743f8fb795076c5b825f.zip | |
Revert "Revert "Merge pull request #3 from alexAubin/patch-1""
This reverts commit ea966973f58b2cd991335c6bc7e7eaec07e7fabc.
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/install | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/install b/scripts/install index e62b078..f68c97d 100644 --- a/scripts/install +++ b/scripts/install @@ -44,6 +44,13 @@ ynh_print_info "Validating installation parameters..." final_path=/var/www/$app test ! -e "$final_path" || ynh_die "This path already contains a folder" +# TODO : to be factorized into a helper someday ? ;) +MEM=$(free | grep "^Mem" | awk '{print $2}') +SWAP=$(free | grep "^Swap" | awk '{print $2}') +TOTAL_MEM_AND_SWAP=$(( ( $MEM+$SWAP ) / 1024 )) # In MB + +[[ $TOTAL_MEM_AND_SWAP -gt 2500 ]] || ynh_die "You need at least 2500 Mo of RAM+Swap to install Mastodon. Please consult the README to learn how to add swap." + # Normalize the url path syntax path_url=$(ynh_normalize_url_path $path_url) |
