1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/noalyss_ynh.git synced 2024-09-03 19:46:20 +02:00
noalyss_ynh/scripts/install

39 lines
885 B
Text
Raw Normal View History

2015-09-27 00:52:48 +02:00
set -e
# Retrieve arguments
domain=$1
path=$2
# Check domain/path availability
sudo yunohost app checkurl $domain$path -a noalyss
if [[ ! $? -eq 0 ]]; then
exit 1
fi
2015-09-27 00:52:56 +02:00
2015-09-27 01:21:26 +02:00
path=${path%/}
2015-09-27 00:52:56 +02:00
sudo apt-get install postgresql php5 php5-pgsql php5-gd php-gettext p7zip-full libgd2-xpm-dev
final_path=/var/www/noalyss
sudo mkdir -p $final_path
sudo cp -a ../sources/html/ $final_path
sudo cp -a ../sources/include/ $final_path
2015-09-27 00:57:36 +02:00
2015-09-27 01:07:30 +02:00
sudo chown -R www-data: $final_path
2015-09-27 00:57:36 +02:00
sudo yunohost app setting noalyss version -v "6.9.0.0"
2015-09-27 01:07:53 +02:00
# Reload Nginx and regenerate SSOwat conf
sudo service nginx reload
sudo yunohost app ssowatconf
if [[ "$path" == "" ]]; then
sed -i "s@LOCATIONTOCHANGE@/@g" ../conf/nginx.conf
else
sed -i "s@LOCATIONTOCHANGE@$path@g" ../conf/nginx.conf
fi
2015-09-27 01:37:10 +02:00
2015-09-27 01:46:52 +02:00
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/noalyss.conf
2015-09-27 01:37:10 +02:00
sed -i "s@NAMETOCHANGE@noalyss@g" ../conf/php-fpm.conf