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:
parent
4e872c43df
commit
2a8b440880
2 changed files with 21 additions and 9 deletions
12
TODO.org
12
TODO.org
|
@ -3,7 +3,7 @@
|
||||||
* DONE logs
|
* DONE logs
|
||||||
* DONE logrotate config
|
* DONE logrotate config
|
||||||
* DONE is_public
|
* 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 ?)
|
** curl call seems ok but I get a 403 (XSRF ?)
|
||||||
* DONE mail in config.js : what's this ?
|
* DONE mail in config.js : what's this ?
|
||||||
** mails are working
|
** mails are working
|
||||||
|
@ -26,20 +26,20 @@ admin@yunohost:/home/yunohost.app/ghostblog$ du -sh ghost/*
|
||||||
4.0K ghost/package.json
|
4.0K ghost/package.json
|
||||||
8.0K ghost/README.md
|
8.0K ghost/README.md
|
||||||
|
|
||||||
* TODO check if path contains "ghost", refused by ghost
|
* DONE 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 mysql instead of sqlite
|
* DONE mysql instead of sqlite
|
||||||
** http://docs.ghost.org/usage/configuration/
|
** http://docs.ghost.org/usage/configuration/
|
||||||
* DONE change installation path
|
* DONE change installation path
|
||||||
* DONE change pid file path
|
* DONE change pid file path
|
||||||
** let's stay with /var/run/yunohost/ghostblog for the moment
|
** let's stay with /var/run/yunohost/ghostblog for the moment
|
||||||
* DONE cleanup pid file
|
* DONE cleanup pid file
|
||||||
|
* DONE check password length (>=8)
|
||||||
* TODO download theme police, install locally to avoid google requests
|
* TODO download theme police, install locally to avoid google requests
|
||||||
** download theme police
|
** download theme police
|
||||||
//fonts.googleapis.com/css?family=Noto+Serif:400,700,400italic|Open+Sans:700,400"
|
//fonts.googleapis.com/css?family=Noto+Serif:400,700,400italic|Open+Sans:700,400"
|
||||||
** install locally in themes/casper/assets/fonts ?
|
** install locally in themes/casper/assets/fonts ?
|
||||||
** modify assets/css ?
|
** modify assets/css ?
|
||||||
** modify default.hbs
|
** 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
|
||||||
|
|
|
@ -7,9 +7,9 @@ is_public=$3
|
||||||
admin=$4
|
admin=$4
|
||||||
password=$5
|
password=$5
|
||||||
|
|
||||||
# Check domain/path availability
|
# '/ghost' is refused by the application itself. This is used as the route to the admin section
|
||||||
sudo yunohost app checkurl $domain$path -a ghostblog
|
if [[ "$path" = "/ghost" ]]; then
|
||||||
if [[ ! $? -eq 0 ]]; then
|
echo "Error : the path cannot be '/ghost', please choose another location"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -20,6 +20,18 @@ if [[ ! $? -eq 0 ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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..."
|
echo "Install dependencies..."
|
||||||
sudo apt-get install nodejs-legacy npm -y
|
sudo apt-get install nodejs-legacy npm -y
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue