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

43 lines
1.3 KiB
Text
Raw Normal View History

2016-03-18 18:38:54 +01:00
#!/bin/bash
2018-08-14 22:18:22 +02:00
#=================================================
# GENERIC START
#=================================================
2022-01-14 23:57:33 +01:00
# IMPORT GENERIC HELPERS
#=================================================
2016-03-18 18:38:54 +01:00
2022-01-14 23:57:33 +01:00
source _common.sh
2018-08-14 22:18:22 +02:00
source /usr/share/yunohost/helpers
2016-03-18 18:38:54 +01:00
2024-02-23 00:19:18 +01:00
if [[ $path != "/SOGo" ]]; then
ynh_die --message "You can't install SOGo on other path than '/SOGo'"
fi
2022-01-15 10:19:18 +01:00
#=================================================
# ADD A CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring application..." --weight=3
2016-03-18 18:38:54 +01:00
2024-01-30 23:33:35 +01:00
mkdir -p "/etc/$app"
ynh_add_config --template="sogo.conf" --destination="/etc/$app/sogo.conf"
2018-08-14 22:18:22 +02:00
config_nginx
2016-03-18 20:36:22 +01:00
2024-02-23 00:21:58 +01:00
ynh_use_logrotate --logfile="/var/log/$app/sogo.log" --nonappend
2024-01-30 23:33:35 +01:00
yunohost service add "sogo" --description="Groupware for E-Mail, Contacts and Calender" --log="/var/log/$app/$app.log"
2022-01-14 23:57:33 +01:00
2024-02-23 00:21:58 +01:00
set_permissions
2022-01-15 12:01:10 +01:00
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=1
2024-01-30 23:33:35 +01:00
ynh_systemd_action --service_name="$app" --action="restart" --log_path="systemd"
2022-01-14 23:57:33 +01:00
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Installation of $app completed" --last