2018-11-18 16:00:35 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2018-11-24 11:27:04 +01:00
|
|
|
#=================================================
|
|
|
|
# GENERIC START
|
|
|
|
#=================================================
|
|
|
|
# IMPORT GENERIC HELPERS
|
|
|
|
#=================================================
|
|
|
|
source _common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
#=================================================
|
|
|
|
# LOAD SETTINGS
|
|
|
|
#=================================================
|
2018-11-18 16:00:35 +01:00
|
|
|
|
2018-11-24 11:27:04 +01:00
|
|
|
app=$YNH_APP_INSTANCE_NAME
|
|
|
|
|
|
|
|
domain=$(ynh_app_setting_get $app domain)
|
|
|
|
path_url=$(ynh_app_setting_get $app path)
|
|
|
|
admin=$(ynh_app_setting_get $app admin)
|
|
|
|
final_path=$(ynh_app_setting_get $app final_path)
|
|
|
|
db_name=$(ynh_app_setting_get $app db_name)
|
|
|
|
|
2018-11-18 16:00:35 +01:00
|
|
|
|
2018-11-24 12:05:55 +01:00
|
|
|
test -e "$final_path" || ynh_die "The path $final_path does not exist"
|
2018-11-18 16:00:35 +01:00
|
|
|
|
|
|
|
# Copy source files
|
2018-11-24 12:05:55 +01:00
|
|
|
cp -R ../src/bin/ $final_path/bin
|
|
|
|
cp -R ../src/lib/ $final_path/lib
|
|
|
|
cp -R ../src/lang/ $final_path/lang
|
|
|
|
cp -R ../src/www/ $final_path/www
|
|
|
|
cp ../src/emailPoubelle.php $final_path/emailPoubelle.php
|
|
|
|
cp ../src/emailPoubelleAdmin.php $final_path/emailPoubelleAdmin.php
|
|
|
|
chown -R www-data:www-data $final_path
|
2018-11-18 16:00:35 +01:00
|
|
|
|
|
|
|
#adding php-cli for cron
|
|
|
|
sudo apt-get update -qq
|
|
|
|
sudo apt-get install -yqq php5-cli
|
|
|
|
#adding cronjob for removing expired email addresses
|
|
|
|
sudo echo "$cronline" | sudo tee -a /etc/cron.d/emailpoubelle
|
|
|
|
sudo chmod 644 /etc/cron.d/emailpoubelle
|
|
|
|
|
|
|
|
# Restart services
|
|
|
|
sudo service nginx reload
|
|
|
|
sudo service postfix reload
|
|
|
|
sudo yunohost app ssowatconf
|