Commit 04e6e66a authored by Laurent Peuch's avatar Laurent Peuch

[enh] try to install static files

parent 4eef2f76
location PATHTOCHANGE/ {
alias ALIASTOCHANGE;
if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent;
}
index index.html;
}
set -e
source ./commons
# Retrieve arguments
domain=$1
path=$2
......@@ -10,7 +12,23 @@ if [[ ! $? -eq 0 ]]; then
exit 1
fi
source ./commons
install_static_file() {
final_path=/var/www/neutrinet
sudo mkdir -p $final_path
sudo cp -a ../sources/ $final_path
sudo chown -R www-data: $final_path
if [[ "$path" == "" ]]; then
sed -i "s@PATHTOCHANGE@/@g" ../conf/nginx.conf
else
sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf
fi
sed -i "s@ALIASTOCHANGE@$final_path/@g" ../conf/nginx.conf
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/neutrinet.conf
}
install_renew_cert() {
set -e
......@@ -53,6 +71,8 @@ sudo yunohost app setting neutrinet version -v "0.1.1"
sudo yunohost app fetchlist -n neutrinet -u https://neutrinet.be/apps.json
sudo yunohost app fetchlist -n labriqueinternet -u https://labriqueinter.net/apps/labriqueinternet.json
install_static_file
install_renew_cert
# vpn is not running, let's assume for now that this mean that the vpn is broken
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment