mirror of
https://github.com/YunoHost-Apps/streama_ynh.git
synced 2024-09-03 20:26:30 +02:00
cleaning
This commit is contained in:
parent
fa9607aa70
commit
7297b4bfd5
6 changed files with 18 additions and 92 deletions
|
@ -5,7 +5,7 @@ name = "Streama"
|
|||
description.en = "streaming media server"
|
||||
description.fr = "Serveur de streaming"
|
||||
|
||||
version = "1.10.5~ynh1"
|
||||
version = "1.10.5~ynh2"
|
||||
|
||||
maintainers = [""]
|
||||
|
||||
|
@ -31,8 +31,8 @@ ram.runtime = "50M"
|
|||
type = "domain"
|
||||
|
||||
[install.init_main_permission]
|
||||
help.en = "If enabled, Streama will be accessible by people who do not have an account. This can be changed later via the webadmin."
|
||||
help.fr = "Si cette case est cochée, Streama sera accessible aux personnes n’ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin."
|
||||
help.en = "If 'visitors', Streama will be accessible by people who do not have an account. This can be changed later via the webadmin."
|
||||
help.fr = "Si 'Visiteurs', Streama sera accessible aux personnes n’ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin."
|
||||
type = "group"
|
||||
default = "visitors"
|
||||
|
||||
|
|
|
@ -4,9 +4,6 @@
|
|||
# COMMON VARIABLES
|
||||
#=================================================
|
||||
|
||||
# dependencies used by the app
|
||||
#REMOVEME? pkg_dependencies="openjdk-17-jre-headless ffmpeg"
|
||||
|
||||
#=================================================
|
||||
# PERSONAL HELPERS
|
||||
#=================================================
|
||||
|
|
|
@ -22,50 +22,28 @@ chown -R $app:www-data "$install_dir"
|
|||
chmod +x $install_dir/streama.jar
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
# SYSTEM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring NGNX web server..." --weight=3
|
||||
ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
# Create a dedicated systemd config
|
||||
ynh_add_systemd_config
|
||||
|
||||
yunohost service add $app --description="Streama media system" --log="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# ADD A CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Adding a configuration file..." --weight=1
|
||||
|
||||
ynh_add_config --template="../conf/application.yaml" --destination="$install_dir/application.yaml"
|
||||
ynh_add_config --template="application.yaml" --destination="$install_dir/application.yaml"
|
||||
|
||||
chmod 400 "$install_dir/application.yaml"
|
||||
chown $app:$app "$install_dir/application.yaml"
|
||||
|
||||
#=================================================
|
||||
# ADD A CONFIGURATION
|
||||
#=================================================
|
||||
#ynh_script_progression --message="Adding a configuration file..."
|
||||
|
||||
# Set permissions to app files
|
||||
#ln -s $data_dir $install_dir/data/streama
|
||||
#ynh_add_config --template="../conf/convert.sh" --destination="/usr/bin/convert_movies"
|
||||
#chmod +x "/usr/bin/convert_movies"
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring a systemd service..." --weight=1
|
||||
|
||||
# Create a dedicated systemd config
|
||||
ynh_add_systemd_config
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=3
|
||||
|
||||
yunohost service add $app --description="Streama media system" --log="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
#=================================================
|
||||
|
|
|
@ -10,10 +10,11 @@ source _common.sh
|
|||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# STANDARD REMOVE
|
||||
# REMOVE SYSTEM CONFIGURATIONS
|
||||
#=================================================
|
||||
# REMOVE SERVICE INTEGRATION IN YUNOHOST
|
||||
# REMOVE SYSTEMD SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
|
||||
|
||||
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
||||
if ynh_exec_warn_less yunohost service status $app >/dev/null
|
||||
|
|
|
@ -23,7 +23,7 @@ chown -R $app:www-data "$install_dir"
|
|||
#=================================================
|
||||
# RESTORE THE DATA DIRECTORY
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the data directory..."
|
||||
ynh_script_progression --message="Restoring the data directory..." --weight=2
|
||||
|
||||
ynh_restore_file --origin_path="$data_dir" --not_mandatory
|
||||
|
||||
|
@ -32,33 +32,13 @@ chown -R $app:www-data "$data_dir"
|
|||
#=================================================
|
||||
# RESTORE THE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the NGINX web server configuration..."
|
||||
ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=2
|
||||
|
||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# ADD A CONFIGURATION
|
||||
#=================================================
|
||||
#ynh_script_progression --message="Adding a configuration file..."
|
||||
|
||||
# Set permissions to app files
|
||||
#ln -s $data_dir $install_dir/data/streama
|
||||
#ynh_add_config --template="../conf/convert.sh" --destination="/usr/bin/convert_movies"
|
||||
#chmod +x "/usr/bin/convert_movies"
|
||||
|
||||
#=================================================
|
||||
# RESTORE SYSTEMD
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the systemd configuration..." --weight=2
|
||||
|
||||
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
|
||||
systemctl enable $app.service --quiet
|
||||
|
||||
#=================================================
|
||||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=3
|
||||
|
||||
yunohost service add $app --description="Streama media system" --log="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
|
@ -68,13 +48,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=2
|
|||
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Grails application running at"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
# RELOAD NGINX
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reloading NGINX web server..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -41,39 +41,16 @@ chown -R $app:www-data "$install_dir"
|
|||
chmod +x $install_dir/streama.jar
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
# REAPPLY SYSTEM CONFIGURATIONS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=24
|
||||
ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC UPGRADE
|
||||
#=================================================
|
||||
# UPDATE A CONFIG FILE
|
||||
#=================================================
|
||||
#ynh_script_progression --message="Updating a configuration file..."
|
||||
|
||||
# Set permissions to app files
|
||||
#ynh_add_config --template="../conf/convert.sh" --destination="/usr/bin/convert_movies"
|
||||
#chmod +x "/usr/bin/convert_movies"
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading systemd configuration..." --weight=3
|
||||
|
||||
# Create a dedicated systemd config
|
||||
ynh_add_systemd_config
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=3
|
||||
|
||||
yunohost service add $app --description="Streama media system" --log="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue