mirror of
https://github.com/YunoHost-Apps/couchpotato_ynh.git
synced 2024-09-03 18:16:22 +02:00
Open /api and fix restore
- Open the /api path so that mobile apps can connect using the API key - Fix restore
This commit is contained in:
parent
294f19179a
commit
2fbe760a03
5 changed files with 18 additions and 9 deletions
|
@ -3,7 +3,7 @@
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
# Source app helpers
|
# Source app helpers
|
||||||
. /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
# Common variable declaration
|
# Common variable declaration
|
||||||
app_install_dir="/opt/yunohost/$app"
|
app_install_dir="/opt/yunohost/$app"
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
|
|
||||||
# Source app helpers
|
# Source app helpers
|
||||||
. /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
# Retrieve arguments
|
# Retrieve arguments
|
||||||
domain=$YNH_APP_ARG_DOMAIN
|
domain=$YNH_APP_ARG_DOMAIN
|
||||||
|
@ -152,5 +152,9 @@
|
||||||
sed -i "s@__PORT__@$port@g" ../conf/nginx.conf
|
sed -i "s@__PORT__@$port@g" ../conf/nginx.conf
|
||||||
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf
|
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf
|
||||||
|
|
||||||
|
# Open the /api path so that external applications can connect
|
||||||
|
ynh_app_setting_set "$app" unprotected_uris "/api"
|
||||||
|
|
||||||
# Reload Nginx and regenerate SSOwat conf
|
# Reload Nginx and regenerate SSOwat conf
|
||||||
sudo service nginx reload
|
sudo service nginx reload
|
||||||
|
sudo yunohost app ssowatconf
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
# Source app helpers
|
# Source app helpers
|
||||||
. /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
# Common variable declaration
|
# Common variable declaration
|
||||||
app_install_dir="/opt/yunohost/$app"
|
app_install_dir="/opt/yunohost/$app"
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
# Source app helpers
|
# Source app helpers
|
||||||
. /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
# Common variable declaration
|
# Common variable declaration
|
||||||
app_install_dir="/opt/yunohost/$app"
|
app_install_dir="/opt/yunohost/$app"
|
||||||
|
@ -35,9 +35,6 @@
|
||||||
"The Systemd configuration already exists at '${systemd_conf}'.
|
"The Systemd configuration already exists at '${systemd_conf}'.
|
||||||
You should safely delete it before restoring this app."
|
You should safely delete it before restoring this app."
|
||||||
|
|
||||||
# Kill app if running
|
|
||||||
sudo systemctl stop $app
|
|
||||||
|
|
||||||
# Restore sources
|
# Restore sources
|
||||||
sudo mkdir -p $app_install_dir
|
sudo mkdir -p $app_install_dir
|
||||||
sudo cp -a ./sources/. $app_install_dir
|
sudo cp -a ./sources/. $app_install_dir
|
||||||
|
@ -90,5 +87,9 @@
|
||||||
# Restore Nginx conf
|
# Restore Nginx conf
|
||||||
sudo cp -a ./nginx.conf "$nginx_conf"
|
sudo cp -a ./nginx.conf "$nginx_conf"
|
||||||
|
|
||||||
# Reload Nginx
|
# Open the /api path so that external applications can connect
|
||||||
|
ynh_app_setting_set "$app" unprotected_uris "/api"
|
||||||
|
|
||||||
|
# Reload Nginx and regenerate SSOwat conf
|
||||||
sudo service nginx reload
|
sudo service nginx reload
|
||||||
|
sudo yunohost app ssowatconf
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
trap EXIT_PROPERLY ERR
|
trap EXIT_PROPERLY ERR
|
||||||
|
|
||||||
# Source app helpers
|
# Source app helpers
|
||||||
. /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
# Retrieve arguments
|
# Retrieve arguments
|
||||||
domain=$(ynh_app_setting_get "$app" domain)
|
domain=$(ynh_app_setting_get "$app" domain)
|
||||||
|
@ -98,5 +98,9 @@
|
||||||
sed -i "s@__PORT__@$port@g" ../conf/nginx.conf
|
sed -i "s@__PORT__@$port@g" ../conf/nginx.conf
|
||||||
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf
|
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf
|
||||||
|
|
||||||
|
# Open the /api path so that external applications can connect
|
||||||
|
ynh_app_setting_set "$app" unprotected_uris "/api"
|
||||||
|
|
||||||
# Reload Nginx and regenerate SSOwat conf
|
# Reload Nginx and regenerate SSOwat conf
|
||||||
sudo service nginx reload
|
sudo service nginx reload
|
||||||
|
sudo yunohost app ssowatconf
|
||||||
|
|
Loading…
Add table
Reference in a new issue