mirror of
https://github.com/YunoHost-Apps/z-push_ynh.git
synced 2024-09-03 18:05:58 +02:00
35 lines
874 B
Bash
35 lines
874 B
Bash
#!/bin/bash
|
|
|
|
# Retrieve arguments
|
|
domain=$1
|
|
path=$2
|
|
|
|
# Check domain/path availability
|
|
sudo yunohost app checkurl $domain$path -a z-push
|
|
if [[ ! $? -eq 0 ]]; then
|
|
exit 1
|
|
fi
|
|
|
|
# Copy files to the right place
|
|
final_path=/var/www/z-push
|
|
sudo mkdir -p $final_path
|
|
sudo cp -a ../sources/* $final_path
|
|
|
|
# Set permissions to roundcube directory
|
|
sudo chown -R www-data: $final_path
|
|
|
|
# Configuration
|
|
#sudo cp ../conf/config.inc.php $final_path/inc/poche/
|
|
|
|
# Modify Nginx configuration file and copy it to Nginx conf directory
|
|
#sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf*
|
|
#sed -i "s@ALIASTOCHANGE@$final_path/@g" ../conf/nginx.conf*
|
|
#sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/z-push.conf
|
|
|
|
# Enable api for client
|
|
sudo yunohost app setting z-push skipped_uris -v "/"
|
|
|
|
# Reload Nginx and regenerate SSOwat conf
|
|
sudo service nginx reload
|
|
sudo yunohost app ssowatconf
|
|
|