1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/hedgedoc_ynh.git synced 2024-09-03 19:25:52 +02:00
This commit is contained in:
Éric Gaspar 2022-07-10 23:16:13 +02:00
parent 8f04a2db6c
commit bc18fc231e
No known key found for this signature in database
GPG key ID: 574F281483054D44
7 changed files with 34 additions and 38 deletions

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/hedgedoc/hedgedoc/releases/download/1.9.3/hedgedoc-1.9.3.tar.gz
SOURCE_SUM=0115278fc5ae048e3629cc0beba98046cb19460ba66108b3eba45ea5e22e8548
SOURCE_URL=https://github.com/hedgedoc/hedgedoc/releases/download/1.9.4/hedgedoc-1.9.4.tar.gz
SOURCE_SUM=f8ed595cb3b47eb71f22518e0a1e93ed120c44dcf1eb30136c16f530c4aaf0a7
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true

View file

@ -8,7 +8,7 @@ Type=simple
User=__APP__
Group=__APP__
WorkingDirectory=__FINALPATH__
Environment="PATH=__ENV_PATH__"
Environment="__YNH_NODE_LOAD_PATH__"
Environment="NODE_ENV=production"
ExecStart=__YNH_NPM__ start --production
Restart=always

12
doc/DESCRIPTION.md Normal file
View file

@ -0,0 +1,12 @@
HedgeDoc (formerly known as CodiMD) is an open-source, web-based, self-hosted, collaborative markdown editor.
You can use it to easily collaborate on notes, graphs and even presentations in real-time. All you need to do is to share your note-link to your co-workers and theyre ready to go.
### Features
- Real-time collaboration
- Graphs & diagrams
- Revisions
- Presentation mode
- Easy to use permission system
- Low system requirements

View file

@ -6,7 +6,7 @@
"en": "Collaborative editor to work on notes written in Markdown",
"fr": "Éditeur collaboratif pour travailler sur des notes en Markdown"
},
"version": "1.9.3~ynh1",
"version": "1.9.4~ynh1",
"url": "https://hedgedoc.org",
"upstream": {
"license": "free",

View file

@ -100,6 +100,10 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir=$final_path
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#=================================================
# NGINX CONFIGURATION
#=================================================
@ -125,8 +129,7 @@ popd
#=================================================
ynh_script_progression --message="Configuring a systemd service..." --weight=1
env_path="$PATH"
# Create a dedicated systemd config
ynh_add_systemd_config
#=================================================
@ -137,21 +140,9 @@ ynh_script_progression --message="Modifying a config file..." --weight=1
url_path=${path_url#/}
ynh_add_config --template="../conf/config.json.example" --destination="$final_path/config.json"
chmod 400 "$final_path/config.json"
chmod 600 "$final_path/config.json"
chown $app:$app "$final_path/config.json"
#=================================================
# GENERIC FINALIZATION
#=================================================
# SECURE FILES AND DIRECTORIES
#=================================================
ynh_script_progression --message="Securing files and directories..." --weight=1
# Set permissions to app files
chown -R $app:$app $final_path
chmod o-rwx $final_path
chmod 600 $final_path/config.json
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================

View file

@ -38,7 +38,8 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd)
#=================================================
ynh_script_progression --message="Validating restoration parameters..." --weight=2
test ! -d $final_path || ynh_die --message="There is already a directory: $final_path "
test ! -d $final_path \
|| ynh_die --message="There is already a directory: $final_path "
#=================================================
# STANDARD RESTORATION STEPS
@ -64,9 +65,9 @@ ynh_script_progression --message="Restoring HedgeDoc main directory..." --weight
ynh_restore_file --origin_path="$final_path"
chown -R $app:$app $final_path
chmod o-rwx $final_path
chmod 600 $final_path/config.json
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#=================================================
# SPECIFIC RESTORATION

View file

@ -85,6 +85,10 @@ then
ynh_setup_source --dest_dir=$final_path --keep="$final_path/config.json"
fi
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#=================================================
# NGINX CONFIGURATION
#=================================================
@ -108,9 +112,10 @@ ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ st
#=================================================
# SPECIFIC UPGRADE
#==============================================
#=================================================
# INSTALL HEDGEDOC
#==============================================
#=================================================
if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Building HedgeDoc... (this will take some time and resources!)" --weight=20
@ -126,22 +131,9 @@ fi
#=================================================
ynh_script_progression --message="Configuring a systemd service..." --weight=2
env_path="$PATH"
# Create a dedicated systemd config
ynh_add_systemd_config
#=================================================
# GENERIC FINALIZATION
#=================================================
# SECURE FILES AND DIRECTORIES
#=================================================
ynh_script_progression --message="Securing files and directories..." --weight=1
# Set permissions on app files
chown -R $app:$app $final_path
chmod o-rwx $final_path
chmod 600 $final_path/config.json
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================