1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ghost_ynh.git synced 2024-09-03 19:16:02 +02:00

check password length and path before real install

This commit is contained in:
Julien Malik 2014-03-24 23:21:45 +01:00
parent 4e872c43df
commit 2a8b440880
2 changed files with 21 additions and 9 deletions

View file

@ -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

View file

@ -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