#!/bin/bash #================================================= # GENERIC START #================================================= # IMPORT GENERIC HELPERS #================================================= source _common.sh source /usr/share/yunohost/helpers if [[ $path != "/SOGo" ]]; then ynh_die --message "You can't install SOGo on other path than '/SOGo'" fi #================================================= # ADD A CONFIGURATION #================================================= ynh_script_progression --message="Configuring application..." --weight=3 mkdir -p "/etc/$app" ynh_add_config --template="sogo.conf" --destination="/etc/$app/sogo.conf" config_nginx ynh_use_logrotate --logfile="/var/log/$app/sogo.log" --nonappend yunohost service add "sogo" --description="Groupware for E-Mail, Contacts and Calender" --log="/var/log/$app/$app.log" set_permissions #================================================= # START SYSTEMD SERVICE #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_systemd_action --service_name="$app" --action="restart" --log_path="systemd" #================================================= # END OF SCRIPT #================================================= ynh_script_progression --message="Installation of $app completed" --last