mirror of
https://github.com/YunoHost-Apps/movim_ynh.git
synced 2024-09-03 19:46:19 +02:00
Add support for upgrade
This commit is contained in:
parent
958dffbcc5
commit
0795c26631
2 changed files with 20 additions and 0 deletions
|
@ -23,6 +23,7 @@ fi
|
||||||
|
|
||||||
sudo yunohost app setting movim admin -v $admin
|
sudo yunohost app setting movim admin -v $admin
|
||||||
sudo yunohost app setting movim public_site -v $public_site
|
sudo yunohost app setting movim public_site -v $public_site
|
||||||
|
sudo yunohost app setting movim port -v $port
|
||||||
|
|
||||||
# Generate random password
|
# Generate random password
|
||||||
db_pwd=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{24\}\).*/\1/p')
|
db_pwd=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{24\}\).*/\1/p')
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Retrieve arguments
|
||||||
|
path=$(sudo yunohost app setting movim path)
|
||||||
|
|
||||||
|
# Install Movim files
|
||||||
|
final_path=/var/www/movim
|
||||||
|
sudo cp -a ../sources/* $final_path
|
||||||
|
sudo chown -R www-data: $final_path
|
||||||
|
|
||||||
|
# Upgrade PHP dependencies
|
||||||
|
#sudo su -c "curl -sS https://getcomposer.org/installer | php -- --install-dir=$final_path" -s /bin/sh www-data
|
||||||
|
#sudo su -c "cd $final_path && php composer.phar install" -s /bin/sh www-data
|
||||||
|
|
||||||
|
# Movim configuration
|
||||||
|
sudo sed -i "s@/ws/@$path/ws/@g" $final_path/app/assets/js/movim_websocket.js
|
||||||
|
|
||||||
|
# Reload
|
||||||
|
sudo yunohost app ssowatconf
|
Loading…
Reference in a new issue