echo">> Modification de Yunohost pour la demo"| tee -a "$LOG_BUILD_LXC"
# App officielles
echo -e "> Installation des applications officielles"| tee -a "$LOG_BUILD_LXC"
echo -e "Installation de baikal"| tee -a "$LOG_BUILD_LXC"
ssh $ARG_SSH$LXC_NAME1"sudo yunohost app install baikal -a \"domain=$DOMAIN&path=/baikal&password=$PASSWORD_DEMO\""| tee -a "$LOG_BUILD_LXC"
echo -e "Installation d'agendav"| tee -a "$LOG_BUILD_LXC"
ssh $ARG_SSH$LXC_NAME1"sudo yunohost app install agendav -a \"domain=$DOMAIN&path=/agendav&language=en\""| tee -a "$LOG_BUILD_LXC"
echo -e "Installation de dokuwiki"| tee -a "$LOG_BUILD_LXC"
ssh $ARG_SSH$LXC_NAME1"sudo yunohost app install dokuwiki -a \"domain=$DOMAIN&path=/dokuwiki&admin=$USER_DEMO&is_public=Yes\""| tee -a "$LOG_BUILD_LXC"
echo -e "Installation de hextris"| tee -a "$LOG_BUILD_LXC"
ssh $ARG_SSH$LXC_NAME1"sudo yunohost app install hextris -a \"domain=$DOMAIN&path=/hextris&is_public=Yes\""| tee -a "$LOG_BUILD_LXC"
echo -e "Installation de jappix"| tee -a "$LOG_BUILD_LXC"
ssh $ARG_SSH$LXC_NAME1"sudo yunohost app install jappix -a \"domain=$DOMAIN&path=/jappix&name=YunoJappix&language=en\""| tee -a "$LOG_BUILD_LXC"
echo -e "Installation de jirafeau"| tee -a "$LOG_BUILD_LXC"
ssh $ARG_SSH$LXC_NAME1"sudo yunohost app install jirafeau -a \"domain=$DOMAIN&path=/jirafeau&admin_user=$USER_DEMO&upload_password=$PASSWORD_DEMO&is_public=Yes\""| tee -a "$LOG_BUILD_LXC"
echo -e "Installation de kanboard"| tee -a "$LOG_BUILD_LXC"
ssh $ARG_SSH$LXC_NAME1"sudo yunohost app install kanboard -a \"domain=$DOMAIN&path=/kanboard&admin=$USER_DEMO&is_public=Yes\""| tee -a "$LOG_BUILD_LXC"
echo -e "Installation de opensondage"| tee -a "$LOG_BUILD_LXC"
ssh $ARG_SSH$LXC_NAME1"sudo yunohost app install opensondage -a \"domain=$DOMAIN&path=/date&admin=$USER_DEMO&language=en_GB&is_public=1\""| tee -a "$LOG_BUILD_LXC"
echo -e "Installation de owncloud"| tee -a "$LOG_BUILD_LXC"
ssh $ARG_SSH$LXC_NAME1"sudo yunohost app install owncloud -a \"domain=$DOMAIN&path=/owncloud&admin=$USER_DEMO&user_home=0\""| tee -a "$LOG_BUILD_LXC"
echo -e "Installation de phpmyadmin"| tee -a "$LOG_BUILD_LXC"
ssh $ARG_SSH$LXC_NAME1"sudo yunohost app install phpmyadmin -a \"domain=$DOMAIN&path=/phpmyadmin&admin=$USER_DEMO\""| tee -a "$LOG_BUILD_LXC"
echo -e "Installation de roundcube"| tee -a "$LOG_BUILD_LXC"
ssh $ARG_SSH$LXC_NAME1"sudo yunohost app install roundcube -a \"domain=$DOMAIN&path=/webmail&with_carddav=0\""| tee -a "$LOG_BUILD_LXC"
echo -e "Installation de searx"| tee -a "$LOG_BUILD_LXC"
ssh $ARG_SSH$LXC_NAME1"sudo yunohost app install searx -a \"domain=$DOMAIN&path=/searx&is_public=Yes\""| tee -a "$LOG_BUILD_LXC"
echo -e "Installation de shellinabox"| tee -a "$LOG_BUILD_LXC"
ssh $ARG_SSH$LXC_NAME1"sudo yunohost app install shellinabox -a \"domain=$DOMAIN&path=/ssh\""| tee -a "$LOG_BUILD_LXC"
echo -e "Installation de strut"| tee -a "$LOG_BUILD_LXC"
ssh $ARG_SSH$LXC_NAME1"sudo yunohost app install strut -a \"domain=$DOMAIN&path=/strut&public_site=Yes\""| tee -a "$LOG_BUILD_LXC"
echo -e "Installation de transmission"| tee -a "$LOG_BUILD_LXC"
ssh $ARG_SSH$LXC_NAME1"sudo yunohost app install transmission -a \"domain=$DOMAIN&path=/torrent\""| tee -a "$LOG_BUILD_LXC"
echo -e "Installation de ttrss"| tee -a "$LOG_BUILD_LXC"
ssh $ARG_SSH$LXC_NAME1"sudo yunohost app install ttrss -a \"domain=$DOMAIN&path=/ttrss\""| tee -a "$LOG_BUILD_LXC"
echo -e "Installation de wallabag"| tee -a "$LOG_BUILD_LXC"
ssh $ARG_SSH$LXC_NAME1"sudo yunohost app install wallabag -a \"domain=$DOMAIN&path=/wallabag\""| tee -a "$LOG_BUILD_LXC"
echo -e "Installation de wordpress"| tee -a "$LOG_BUILD_LXC"
ssh $ARG_SSH$LXC_NAME1"sudo yunohost app install wordpress -a \"domain=$DOMAIN&path=/blog&admin=$USER_DEMO&language=en_EN&multisite=No&is_public=Yes\""| tee -a "$LOG_BUILD_LXC"
echo -e "Installation de zerobin"| tee -a "$LOG_BUILD_LXC"
ssh $ARG_SSH$LXC_NAME1"sudo yunohost app install zerobin -a \"domain=$DOMAIN&path=/zerobin&is_public=Yes\""| tee -a "$LOG_BUILD_LXC"
sudo rm "/var/lib/lxc/$LXC_NAME1/rootfs/etc/nginx/conf.d/$DOMAIN.d/shellinabox.conf"# Supprime le fichier de conf nginx de shellinabox pour empêcher d'y accéder.
sed -i "3i\<center>Login: demo / Password: demo</center>" /var/lib/lxc/yunohost_demo1/rootfs/usr/share/ssowat/portal/login.html # Sur le login du portail
sed -i "17i\   Password: demo" /var/lib/lxc/yunohost_demo1/rootfs/usr/share/yunohost/admin/views/login.ms # Et sur le login admin
# Vérifie les mises à jour des conteneurs de demo, lorsqu'ils ne sont pas utilisés, à partir de 3h2minutes chaque nuit. Attention à rester sur un multiple du temps de switch.