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

45 lines
1.2 KiB
Text
Raw Normal View History

2022-01-10 15:18:34 +01:00
#!/bin/bash
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression "Setting up source files..."
2022-01-10 15:18:34 +01:00
2023-03-16 20:20:21 +01:00
ynh_setup_source --dest_dir="$install_dir"
2022-01-10 15:18:34 +01:00
2023-02-20 16:20:49 +01:00
chmod +x "$install_dir/shiori"
2022-01-10 15:18:34 +01:00
#=================================================
2023-02-20 16:31:16 +01:00
# SYSTEM CONFIGURATION
2022-01-10 15:18:34 +01:00
#=================================================
ynh_script_progression "Adding system configurations related to $app ..."
2022-01-10 15:18:34 +01:00
ynh_config_add_nginx
2022-01-10 15:18:34 +01:00
ynh_config_add_systemd
2022-01-10 15:18:34 +01:00
ynh_config_add_logrotate
2022-01-10 15:18:34 +01:00
2022-01-10 21:15:49 +01:00
# Create log directory
mkdir -p /var/log/$app
touch /var/log/$app/$app.log
2022-01-10 15:32:00 +01:00
yunohost service add $app --description="Simple bookmark manager" --log="/var/log/$app/$app.log"
2022-01-10 15:18:34 +01:00
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression "Starting $app's systemd service..."
2022-01-10 15:18:34 +01:00
# Start a systemd service
ynh_systemctl --service=$app --action="start" --log_path="systemd"
2022-01-10 15:18:34 +01:00
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression "Installation of $app completed"