mirror of
https://github.com/YunoHost-Apps/sogo_ynh.git
synced 2024-09-03 20:26:07 +02:00
43 lines
1.4 KiB
Bash
Executable file
43 lines
1.4 KiB
Bash
Executable file
#!/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"
|
|
ynh_add_config --template="cron" --destination="/etc/cron.d/$app"
|
|
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
|