1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/duniter_ynh.git synced 2024-09-03 18:26:35 +02:00
duniter_ynh/scripts/install

63 lines
2 KiB
Text
Raw Normal View History

2015-05-24 23:01:16 +02:00
#!/bin/bash
2021-11-25 19:38:26 +01:00
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
2022-03-12 16:55:59 +01:00
#=================================================
# SPECIFIC SETUP
2021-11-25 19:38:26 +01:00
#=================================================
# INSTALL DUNITER
#=================================================
ynh_script_progression --message="Installation of Debian package of Duniter…"
2021-11-25 19:38:26 +01:00
2024-02-21 15:09:21 +01:00
ynh_setup_source --dest_dir="$install_dir"
2024-02-21 14:59:14 +01:00
ynh_exec_warn_less dpkg -i "$install_dir/duniter-server.deb"
ynh_secure_remove "$install_dir/duniter-server.deb"
2021-11-25 19:38:26 +01:00
2022-03-12 16:55:59 +01:00
#=================================================
# CREATE DATA DIRECTORY
#=================================================
2024-02-21 14:59:14 +01:00
ynh_script_progression --message="Configuring a data directory…"
2022-03-12 16:55:59 +01:00
2024-02-21 14:59:14 +01:00
chmod -R o-rwx "$data_dir"
chown -R $app:www-data "$data_dir"
2022-03-12 16:55:59 +01:00
2021-11-25 19:38:26 +01:00
#=================================================
# CONFIGURE DUNITER
2021-11-25 19:38:26 +01:00
#=================================================
ynh_script_progression --message="Configure Duniter…"
2021-11-25 19:38:26 +01:00
CONFIGURE_DUNITER
2021-11-25 19:38:26 +01:00
#=================================================
2024-02-21 14:59:14 +01:00
# SYSTEM CONFIGURATION
2021-11-25 19:38:26 +01:00
#=================================================
2024-02-21 14:59:14 +01:00
ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
# Create a dedicated NGINX config
ynh_add_nginx_config
2022-03-12 16:55:59 +01:00
# Create a dedicated systemd config
2021-11-25 19:38:26 +01:00
ynh_add_systemd_config
2024-02-21 14:59:14 +01:00
yunohost service add "$app"
2021-11-25 19:38:26 +01:00
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Starting a systemd service…"
2021-11-25 19:38:26 +01:00
# Start a systemd service
ynh_systemd_action --service_name="$app" --action="start" --log_path=systemd --line_match="Web administration accessible"
2020-06-11 18:27:42 +02:00
#=================================================
# END OF SCRIPT
#=================================================
2022-03-12 16:55:59 +01:00
ynh_script_progression --message="Installation of $app completed"