2016-03-18 18:38:54 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
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
|
2024-08-31 03:02:25 +02:00
|
|
|
ynh_die "You can't install SOGo on other path than '/SOGo'"
|
2024-02-23 00:19:18 +01:00
|
|
|
fi
|
2019-06-07 23:09:30 +02:00
|
|
|
|
2022-01-15 10:19:18 +01:00
|
|
|
#=================================================
|
|
|
|
# ADD A CONFIGURATION
|
|
|
|
#=================================================
|
2024-08-31 03:02:25 +02:00
|
|
|
ynh_script_progression "Configuring application..."
|
2016-03-18 18:38:54 +01:00
|
|
|
|
2024-01-30 23:33:35 +01:00
|
|
|
mkdir -p "/etc/$app"
|
2024-08-31 03:02:25 +02:00
|
|
|
ynh_config_add --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-08-31 03:02:25 +02:00
|
|
|
ynh_config_add_logrotate "/var/log/$app/sogo.log"
|
2024-02-23 00:21:58 +01:00
|
|
|
|
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
|
|
|
|
#=================================================
|
2024-08-31 03:02:25 +02:00
|
|
|
ynh_script_progression "Starting $app's systemd service..."
|
2022-01-15 12:01:10 +01:00
|
|
|
|
2024-08-31 03:02:25 +02:00
|
|
|
ynh_systemctl --service="$app" --action="restart" --log_path="systemd"
|
2022-01-14 23:57:33 +01:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
2019-06-07 23:09:30 +02:00
|
|
|
|
2024-08-31 03:02:25 +02:00
|
|
|
ynh_script_progression "Installation of $app completed"
|