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

37 lines
1.1 KiB
Text
Raw Normal View History

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
ynh_die "You can't install SOGo on other path than '/SOGo'"
2024-02-23 00:19:18 +01:00
fi
2022-01-15 10:19:18 +01:00
#=================================================
# ADD A CONFIGURATION
#=================================================
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"
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
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
#=================================================
ynh_script_progression "Starting $app's systemd service..."
2022-01-15 12:01:10 +01:00
ynh_systemctl --service="$app" --action="restart" --log_path="systemd"
2022-01-14 23:57:33 +01:00
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression "Installation of $app completed"