mirror of
https://github.com/YunoHost-Apps/cryptpad_ynh.git
synced 2024-09-03 18:26:14 +02:00
[fix] install use repo github not release
This commit is contained in:
parent
48506eb9a3
commit
c054fa54c8
3 changed files with 20 additions and 16 deletions
|
@ -11,10 +11,10 @@ location / {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
location = /api/config {
|
# location = /api/config {
|
||||||
default_type text/javascript;
|
# default_type text/javascript;
|
||||||
rewrite ^.*$ /customize/api/config break;
|
# rewrite ^.*$ /customize/api/config break;
|
||||||
}
|
#}
|
||||||
|
|
||||||
if ($uri = /pad/inner.html) {
|
if ($uri = /pad/inner.html) {
|
||||||
set $scriptSrc "'self' 'unsafe-eval' 'unsafe-inline'";
|
set $scriptSrc "'self' 'unsafe-eval' 'unsafe-inline'";
|
||||||
|
@ -25,6 +25,6 @@ location ~ ^/(register|login|settings|user|pad|drive|poll|slide|code|whiteboard)
|
||||||
rewrite ^(.*)$ $1/ redirect;
|
rewrite ^(.*)$ $1/ redirect;
|
||||||
}
|
}
|
||||||
|
|
||||||
try_files /www/$uri /www/$uri/index.html /customize/$uri;
|
try_files $uri $uri/index.html;
|
||||||
# Include SSOWAT user panel.
|
# Include SSOWAT user panel.
|
||||||
include conf.d/yunohost_panel.conf.inc;
|
include conf.d/yunohost_panel.conf.inc;
|
||||||
|
|
|
@ -78,7 +78,8 @@ sudo apt-get install -yy -qq nodejs
|
||||||
|
|
||||||
final_path=/var/www/$app
|
final_path=/var/www/$app
|
||||||
ynh_app_setting_set $app final_path $final_path
|
ynh_app_setting_set $app final_path $final_path
|
||||||
SETUP_SOURCE # Télécharge la source, décompresse et copie dans $final_path
|
# SETUP_SOURCE # Télécharge la source, décompresse et copie dans $final_path
|
||||||
|
sudo git clone https://github.com/xwiki-labs/cryptpad.git $final_path
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE A SQL BDD
|
# CREATE A SQL BDD
|
||||||
|
@ -129,15 +130,18 @@ sudo chown admin -R $install_log
|
||||||
ynh_use_logrotate
|
ynh_use_logrotate
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# INSTALL ETHERPAD
|
# INSTALL CRYPTPAD
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
script_dir="$PWD"
|
script_dir="$PWD"
|
||||||
pushd "$final_path"
|
pushd "${final_path}"
|
||||||
sudo chown -R $app: $final_path
|
sudo chown -R $app: "${final_path}"
|
||||||
sudo su $app -c "cd $final_path && npm install"
|
#sudo su admin -c "cd $final_path && npm install && npm install bower"
|
||||||
sudo npm install -g bower
|
# sudo npm install -g bower
|
||||||
sudo su $app -c "cd $final_path && bower install && bower install chainpad#^0.4.0"
|
# sudo su admin -c "cd $final_path && bower install && bower install chainpad#^0.4.0"
|
||||||
|
sudo su $app -c "npm install"
|
||||||
|
sudo su $app -c "npm install bower"
|
||||||
|
sudo su $app -c "bower install"
|
||||||
popd
|
popd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -5,7 +5,7 @@ source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
# Exit on command errors and treat unset variables as an error
|
# Exit on command errors and treat unset variables as an error
|
||||||
set -u
|
set -u
|
||||||
set -eu
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
# Retrieve app settings
|
# Retrieve app settings
|
||||||
|
@ -14,13 +14,13 @@ domain=$(ynh_app_setting_get $app domain)
|
||||||
sudo systemctl stop $app.service
|
sudo systemctl stop $app.service
|
||||||
|
|
||||||
# Remove sources
|
# Remove sources
|
||||||
sudo rm -rf /var/www/$app
|
ynh_secure_remove /var/www/$app
|
||||||
|
|
||||||
# Remove nginx configuration file
|
# Remove nginx configuration file
|
||||||
[[ -n $domain ]] && sudo rm -f /etc/nginx/conf.d/${domain}.d/${app}.conf
|
[[ -n $domain ]] && sudo rm -f /etc/nginx/conf.d/${domain}.d/${app}.conf
|
||||||
|
|
||||||
# Remove haste user and data
|
# Delete system user dedicace for this app
|
||||||
sudo userdel -r $app
|
ynh_system_user_delete $app
|
||||||
|
|
||||||
# Remove init script
|
# Remove init script
|
||||||
sudo systemctl disable $app.service
|
sudo systemctl disable $app.service
|
||||||
|
|
Loading…
Add table
Reference in a new issue