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 {
|
||||
default_type text/javascript;
|
||||
rewrite ^.*$ /customize/api/config break;
|
||||
}
|
||||
# location = /api/config {
|
||||
# default_type text/javascript;
|
||||
# rewrite ^.*$ /customize/api/config break;
|
||||
#}
|
||||
|
||||
if ($uri = /pad/inner.html) {
|
||||
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;
|
||||
}
|
||||
|
||||
try_files /www/$uri /www/$uri/index.html /customize/$uri;
|
||||
try_files $uri $uri/index.html;
|
||||
# Include SSOWAT user panel.
|
||||
include conf.d/yunohost_panel.conf.inc;
|
||||
|
|
|
@ -78,7 +78,8 @@ sudo apt-get install -yy -qq nodejs
|
|||
|
||||
final_path=/var/www/$app
|
||||
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
|
||||
|
@ -129,15 +130,18 @@ sudo chown admin -R $install_log
|
|||
ynh_use_logrotate
|
||||
|
||||
#=================================================
|
||||
# INSTALL ETHERPAD
|
||||
# INSTALL CRYPTPAD
|
||||
#=================================================
|
||||
|
||||
script_dir="$PWD"
|
||||
pushd "$final_path"
|
||||
sudo chown -R $app: $final_path
|
||||
sudo su $app -c "cd $final_path && npm install"
|
||||
sudo npm install -g bower
|
||||
sudo su $app -c "cd $final_path && bower install && bower install chainpad#^0.4.0"
|
||||
pushd "${final_path}"
|
||||
sudo chown -R $app: "${final_path}"
|
||||
#sudo su admin -c "cd $final_path && npm install && npm install bower"
|
||||
# sudo npm install -g bower
|
||||
# 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
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -5,7 +5,7 @@ source /usr/share/yunohost/helpers
|
|||
|
||||
# Exit on command errors and treat unset variables as an error
|
||||
set -u
|
||||
set -eu
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
# Retrieve app settings
|
||||
|
@ -14,13 +14,13 @@ domain=$(ynh_app_setting_get $app domain)
|
|||
sudo systemctl stop $app.service
|
||||
|
||||
# Remove sources
|
||||
sudo rm -rf /var/www/$app
|
||||
ynh_secure_remove /var/www/$app
|
||||
|
||||
# Remove nginx configuration file
|
||||
[[ -n $domain ]] && sudo rm -f /etc/nginx/conf.d/${domain}.d/${app}.conf
|
||||
|
||||
# Remove haste user and data
|
||||
sudo userdel -r $app
|
||||
# Delete system user dedicace for this app
|
||||
ynh_system_user_delete $app
|
||||
|
||||
# Remove init script
|
||||
sudo systemctl disable $app.service
|
||||
|
|
Loading…
Add table
Reference in a new issue