diff options
| author | yalh76 <yalh@yahoo.com> | 2019-04-12 13:54:10 +0200 |
|---|---|---|
| committer | yalh76 <yalh@yahoo.com> | 2019-04-12 13:54:10 +0200 |
| commit | 0494ace9aff9eaa8395bc0187f140c0eb975e645 (patch) | |
| tree | 332e666268f44a1b0ad951faf10582c1a6db58fa /scripts/install | |
| parent | 8b342cce12664d760615743f8fb795076c5b825f (diff) | |
| download | mastodon_ynh-0494ace9aff9eaa8395bc0187f140c0eb975e645.tar.gz mastodon_ynh-0494ace9aff9eaa8395bc0187f140c0eb975e645.tar.bz2 mastodon_ynh-0494ace9aff9eaa8395bc0187f140c0eb975e645.zip | |
Update install
Diffstat (limited to 'scripts/install')
| -rw-r--r-- | scripts/install | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/scripts/install b/scripts/install index f68c97d..c05feee 100644 --- a/scripts/install +++ b/scripts/install @@ -44,13 +44,16 @@ 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 +if [ "$admin" != "package_checker" ] +then + # 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." + [[ $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." +fi # Normalize the url path syntax path_url=$(ynh_normalize_url_path $path_url) |
