diff --git a/TODO.org b/TODO.org index 5eb5952..cc3bd85 100644 --- a/TODO.org +++ b/TODO.org @@ -3,7 +3,7 @@ * DONE logs * DONE logrotate config * DONE is_public -* BLOCKED auto set up admin section +* DONE auto set up admin section ** curl call seems ok but I get a 403 (XSRF ?) * DONE mail in config.js : what's this ? ** mails are working @@ -26,20 +26,20 @@ admin@yunohost:/home/yunohost.app/ghostblog$ du -sh ghost/* 4.0K ghost/package.json 8.0K ghost/README.md -* TODO check if path contains "ghost", refused by ghost -* TODO go multi-instance ? -* TODO use shrink to fix dependencies version. cf. https://www.npmjs.org/doc/shrinkwrap.html -* TODO implement upgrade +* DONE check if path contains "ghost", refused by ghost * DONE mysql instead of sqlite ** http://docs.ghost.org/usage/configuration/ * DONE change installation path * DONE change pid file path ** let's stay with /var/run/yunohost/ghostblog for the moment * DONE cleanup pid file +* DONE check password length (>=8) * TODO download theme police, install locally to avoid google requests ** download theme police //fonts.googleapis.com/css?family=Noto+Serif:400,700,400italic|Open+Sans:700,400" ** install locally in themes/casper/assets/fonts ? ** modify assets/css ? ** modify default.hbs -* TODO check password length (>=8) +* TODO go multi-instance ? +* TODO use shrink to fix dependencies version. cf. https://www.npmjs.org/doc/shrinkwrap.html +* TODO implement upgrade diff --git a/scripts/install b/scripts/install index 7f99233..4d54575 100644 --- a/scripts/install +++ b/scripts/install @@ -7,9 +7,9 @@ is_public=$3 admin=$4 password=$5 -# Check domain/path availability -sudo yunohost app checkurl $domain$path -a ghostblog -if [[ ! $? -eq 0 ]]; then +# '/ghost' is refused by the application itself. This is used as the route to the admin section +if [[ "$path" = "/ghost" ]]; then + echo "Error : the path cannot be '/ghost', please choose another location" exit 1 fi @@ -20,6 +20,18 @@ if [[ ! $? -eq 0 ]]; then exit 1 fi +# 'password' must be >= 8 characters +if [[ $(expr length $password) -lt "8" ]]; then + echo "Error : the password must be >= 8 characters" + exit 1 +fi + +# Check domain/path availability +sudo yunohost app checkurl $domain$path -a ghostblog +if [[ ! $? -eq 0 ]]; then + exit 1 +fi + echo "Install dependencies..." sudo apt-get install nodejs-legacy npm -y