1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/codimd_ynh.git synced 2024-09-03 18:16:32 +02:00

Update install

This commit is contained in:
frju365 2018-11-21 19:24:30 +01:00 committed by GitHub
parent 10aedbff66
commit 144205400b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -107,12 +107,30 @@ ynh_psql_create_user $db_user $db_pass
ynh_psql_execute_as_root \ ynh_psql_execute_as_root \
"CREATE DATABASE $db_name ENCODING 'UTF8' LC_COLLATE='C' LC_CTYPE='C' template=template0 OWNER $db_user;" "CREATE DATABASE $db_name ENCODING 'UTF8' LC_COLLATE='C' LC_CTYPE='C' template=template0 OWNER $db_user;"
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_app_setting_set $app final_path $final_path
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source "$final_path"
#=================================================
# MODIFY A CONFIG FILE
#=================================================
#cp -a ../conf/onlyoffice-documentserver.conf /etc/onlyoffice/documentserver/nginx/onlyoffice-documentserver.conf
ynh_replace_string "__DB_USER__" "$db_user" "../conf/config.json.exemple"
ynh_replace_string "__DB_NAME__" "$db_name" "../conf/config.json.exemple"
ynh_replace_string "__DB_PASS__" "$db_pass" "../conf/config.json.exemple"
cp ../conf/config.json.exemple $final_path/config.json
#============================================== #==============================================
# INSTALL CODIMD # INSTALL CODIMD
#============================================== #==============================================
wget --no-verbose 'https://github.com/hackmdio/codimd/archive/1.2.1.tar.gz' pushd $final_path
tar -xvf codimd-1.2.1.tar.gz bin/setup
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION
@ -128,16 +146,6 @@ ynh_add_nginx_config
# Create a system user # Create a system user
ynh_system_user_create $app ynh_system_user_create $app
#=================================================
# MODIFY A CONFIG FILE
#=================================================
#cp -a ../conf/onlyoffice-documentserver.conf /etc/onlyoffice/documentserver/nginx/onlyoffice-documentserver.conf
ynh_replace_string "__DB_USER__" "$db_user" "../conf/config.json.exemple"
ynh_replace_string "__DB_NAME__" "$db_name" "../conf/config.json.exemple"
ynh_replace_string "__DB_PASS__" "$db_pass" "../conf/config.json.exemple"
cp ../conf/config.json.exemple $final_path/config.json
#================================================= #=================================================
# STORE THE CONFIG FILE CHECKSUM # STORE THE CONFIG FILE CHECKSUM
#================================================= #=================================================