1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/turtl_ynh.git synced 2024-09-03 20:26:35 +02:00
This commit is contained in:
Éric Gaspar 2023-12-10 11:12:24 +01:00
parent 0a0cf8e328
commit 0bcb6d26d4
5 changed files with 8 additions and 9 deletions

View file

@ -41,7 +41,6 @@ ram.runtime = "50M"
url = "https://codeload.github.com/turtl/server/tar.gz/0e59ee0a47fc5937600999d14ceb1aca6392aec8"
sha256 = "be1482756fed2fc80dd8592049c2282727439c883eae732844a6e30856eb55da"
[resources.system_user]
[resources.install_dir]
@ -54,7 +53,6 @@ ram.runtime = "50M"
[resources.apt]
packages = "postgresql, postgresql-contrib"
[resources.database]
type = "postgresql"

View file

@ -42,7 +42,7 @@ chown -R $app:www-data "$install_dir"
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring NGINX web server..." --weight=1
ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
# Create a dedicated NGINX config
ynh_add_nginx_config
@ -50,7 +50,7 @@ ynh_add_nginx_config
# Create a dedicated systemd config
ynh_add_systemd_config
yunohost service add $app --description="Share notes, bookmarks, and documents"
yunohost service add $app --description="Share notes, bookmarks, and documents" --log="/var/log/$app/$app.log"
#=================================================
# SPECIFIC SETUP
@ -61,7 +61,7 @@ ynh_script_progression --message="Building $app..." --weight=20
pushd $install_dir
ynh_use_nodejs
ynh_exec_as $app env $ynh_node_load_PATH npm install --unsafe-perm
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install --unsafe-perm
popd
#=================================================

View file

@ -14,6 +14,7 @@ source /usr/share/yunohost/helpers
#=================================================
# REMOVE SERVICE INTEGRATION IN YUNOHOST
#=================================================
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

View file

@ -43,7 +43,7 @@ ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
#=================================================
ynh_script_progression --message="Restoring the PostgreSQL database..." --weight=6
ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name
ynh_psql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
#=================================================
# RESTORE SYSTEMD
@ -55,7 +55,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
systemctl enable $app.service --quiet
yunohost service add $app --description="Share notes, bookmarks, and documents"
yunohost service add $app --description="Share notes, bookmarks, and documents" --log="/var/log/$app/$app.log"
#=================================================
# START SYSTEMD SERVICE

View file

@ -42,7 +42,7 @@ chown -R $app:www-data "$install_dir"
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2
ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1
# Create a dedicated NGINX config
ynh_add_nginx_config
@ -52,7 +52,7 @@ ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
# Create a dedicated systemd config
ynh_add_systemd_config
yunohost service add $app --description="Share notes, bookmarks, and documents"
yunohost service add $app --description="Share notes, bookmarks, and documents" --log="/var/log/$app/$app.log"
#=================================================
# START SYSTEMD SERVICE