1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mstream_ynh.git synced 2024-09-03 19:46:17 +02:00
This commit is contained in:
Éric Gaspar 2023-01-10 19:14:27 +01:00
parent 3409cbe442
commit cc0bf28289
5 changed files with 7 additions and 32 deletions

View file

@ -1,7 +1,6 @@
SOURCE_URL=https://github.com/IrosTheBeggar/mStream/archive/refs/tags/v5.11.4.tar.gz SOURCE_URL=https://github.com/IrosTheBeggar/mStream/releases/download/v5.11.4/mStream-Server-5.11.4.AppImage
SOURCE_SUM=ed3b35c53ca1d9719b5e63e4abc63faac43c4a770dc17e4f39d151e0102f8661 SOURCE_SUM=35e8ddc0c0ecda4ad6c21259ed9bd611af92c23d714440e976f4bb4569082d4b
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=false
SOURCE_IN_SUBDIR=true SOURCE_FILENAME=mStream.AppImage
SOURCE_FILENAME= SOURCE_EXTRACT=false
SOURCE_EXTRACT=true

View file

@ -67,8 +67,6 @@ ynh_app_setting_set --app=$app --key=port --value=$port
#================================================= #=================================================
ynh_script_progression --message="Installing dependencies..." --weight=15 ynh_script_progression --message="Installing dependencies..." --weight=15
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
ynh_install_app_dependencies $pkg_dependencies ynh_install_app_dependencies $pkg_dependencies
#================================================= #=================================================
@ -91,6 +89,7 @@ ynh_setup_source --dest_dir="$final_path"
chmod 750 "$final_path" chmod 750 "$final_path"
chmod -R o-rwx "$final_path" chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path" chown -R $app:www-data "$final_path"
chmod +x "$final_path/mStream.AppImage"
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION
@ -126,16 +125,6 @@ ynh_add_config --template="../conf/default.conf" --destination="$final_path/save
chmod 650 "$final_path/save/conf/default.json" chmod 650 "$final_path/save/conf/default.json"
chown $app:$app "$final_path/save/conf/default.json" chown $app:$app "$final_path/save/conf/default.json"
#=================================================
# INSTALLING MSTREAM
#=================================================
ynh_script_progression --message="Installing $app..." --weight=25
pushd $final_path
ynh_use_nodejs
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm install --only=prod
popd
#================================================= #=================================================
# SETUP SYSTEMD # SETUP SYSTEMD
#================================================= #=================================================
@ -145,16 +134,6 @@ env_path=$PATH
# Create a dedicated systemd config # Create a dedicated systemd config
ynh_add_systemd_config ynh_add_systemd_config
#=================================================
# GENERIC FINALIZATION
#=================================================
# SETUP LOGROTATE
#=================================================
ynh_script_progression --message="Configuring log rotation..." --weight=1
# Use logrotate to manage application logfile(s)
ynh_use_logrotate
#================================================= #=================================================
# INTEGRATE SERVICE IN YUNOHOST # INTEGRATE SERVICE IN YUNOHOST
#================================================= #=================================================

View file

@ -75,7 +75,6 @@ ynh_remove_nginx_config
ynh_script_progression --message="Removing dependencies..." --weight=5 ynh_script_progression --message="Removing dependencies..." --weight=5
# Remove metapackage and its dependencies # Remove metapackage and its dependencies
ynh_remove_nodejs
ynh_remove_app_dependencies ynh_remove_app_dependencies
#================================================= #=================================================

View file

@ -90,7 +90,6 @@ chown -R $app:www-data "$datadir"
ynh_script_progression --message="Reinstalling dependencies..." --weight=10 ynh_script_progression --message="Reinstalling dependencies..." --weight=10
# Define and install dependencies # Define and install dependencies
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
ynh_install_app_dependencies $pkg_dependencies ynh_install_app_dependencies $pkg_dependencies
#================================================= #=================================================

View file

@ -67,7 +67,7 @@ then
ynh_script_progression --message="Upgrading source files..." --weight=5 ynh_script_progression --message="Upgrading source files..." --weight=5
# Download, check integrity, uncompress and patch the source from app.src # Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$final_path" --keep="$final_path/save/conf/default.json" ynh_setup_source --dest_dir="$final_path" --keep="save/conf/default.json"
fi fi
chmod 750 "$final_path" chmod 750 "$final_path"
@ -87,7 +87,6 @@ ynh_add_nginx_config
#================================================= #=================================================
ynh_script_progression --message="Upgrading dependencies..." --weight=10 ynh_script_progression --message="Upgrading dependencies..." --weight=10
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
ynh_install_app_dependencies $pkg_dependencies ynh_install_app_dependencies $pkg_dependencies
#================================================= #=================================================