1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/dotclear2_ynh.git synced 2024-09-03 18:26:29 +02:00

Install working. Some doc.

This commit is contained in:
root 2015-09-14 21:18:02 +00:00
parent 79e889f879
commit 6c5ab6ba22
2 changed files with 13 additions and 30 deletions

View file

@ -1,19 +1,23 @@
# DotClear 2 app for YunoHost # DotClear 2 app for YunoHost
Currently following [this guide](https://yunohost.org/#/packaging_apps_fr) to package DotClear2 blog for YunoHost, along with [the example](https://github.com/YunoHost/example_ynh). [DotClear2](http://dotclear.org/) package for [Yunohost](https://yunohost.org/#/)
# TODO # TODO
- Add a 'protected' value to 'public' argument, so admin interface is protected - Add a 'protected' value to 'public' argument, so admin interface is protected
- Replace 'password' argument by http_auth or ldap authent - Replace 'password' argument by http_auth or ldap authent
# Backup # Backup and restore
Here's the command which should be tested and included in a /etc/cron.daily/dotclear2 script. Until Yunohost do allow user to manage backup through WebUI. YunoHost backup & restore is not stable yet, you've to save your blog yourself and make sure you know how to restore it.
yunohost backup create --hooks dotclear2 ## Backup
There might be two bugs preventing this command to work. First one that you may fix asap. In a root:root 750 /etc/cron.daily/yunohost script.
yunohost backup create
Note, do not use --hooks option, archives produced can't seems to be restored? And there will be two bugs preventing this command to work on a brand new YunoHost installation as of 09/2015. First one that you may fix asap.
root@debian-jessie:~# yunohost backup create root@debian-jessie:~# yunohost backup create
Traceback (most recent call last): Traceback (most recent call last):
@ -31,7 +35,7 @@ There might be two bugs preventing this command to work. First one that you may
logging.info("unable to iterate over local archives: %s", str(e)) logging.info("unable to iterate over local archives: %s", str(e))
NameError: global name 'logging' is not defined NameError: global name 'logging' is not defined
The correction to be applied The fix
sed -i -e "302s/logging/logger/" /usr/lib/moulinette/yunohost/backup.py sed -i -e "302s/logging/logger/" /usr/lib/moulinette/yunohost/backup.py
@ -48,26 +52,6 @@ Then you can fix it
chown admin /etc/yunohost/hooks.d/backup/50-dotclear2 chown admin /etc/yunohost/hooks.d/backup/50-dotclear2
Here is an example of a proper backup ## Restore
root@debian-jessie:~/dotclear2_ynh# yunohost backup create --hooks dotclear2
Exécution des scripts de sauvegarde...
Exécution du script...
+ app=dotclear2
+ backup_dir=/home/yunohost.backup/tmp/1440164746/apps/dotclear2
+ sudo mkdir -p /home/yunohost.backup/tmp/1440164746/apps/dotclear2
+ sudo cp -a /var/www/dotclear2/. /home/yunohost.backup/tmp/1440164746/apps/dotclear2/sources
++ sudo yunohost app setting dotclear2 db_password
+ db_password=zLiS4XNmfYUk
+ sudo mysqldump -u dotclear2 -pzLiS4XNmfYUk dotclear2
50-dotclear2: ligne 16: /home/yunohost.backup/tmp/1440164746/apps/dotclear2/dump.sql: Permission non accordée
+ sudo cp -a /etc/yunohost/apps/dotclear2/. /home/yunohost.backup/tmp/1440164746/apps/dotclear2/yunohost
++ sudo yunohost app setting dotclear2 domain
+ domain=vagrant.test
+ sudo cp -a /etc/nginx/conf.d/vagrant.test.d/dotclear2.conf /home/yunohost.backup/tmp/1440164746/apps/dotclear2/nginx.conf
Création de l'archive de sauvegarde...
Succès ! Sauvegarde terminée
# Restore
Second bug and its fix also apply to restore script, /etc/yunohost/hooks.d/restore/50-dotclear. DotClear2 restore don't work so far.

View file

@ -74,9 +74,8 @@ fi
if [ `echo $success | grep -c success` -gt 0 ] if [ `echo $success | grep -c success` -gt 0 ]
then then
echo Installation OK, $app should be available here https://$domain$path/ echo Installation OK, $app should be available here https://$domain$path/
exit 0
else else
echo Using curl to finish setup failed, open https://$domain$path/admin/install/index.php and do it yourself echo Using curl to finish setup failed, open https://$domain$path/admin/install/index.php and do it yourself
exit 10
fi fi
exit 0