1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/tube_ynh.git synced 2024-09-04 01:46:11 +02:00

Revert "move config file to datadir"

This reverts commit 15e535af8a.
This commit is contained in:
Éric Gaspar 2022-08-27 15:17:48 +02:00
parent 531c98d396
commit cabb7027fc
No known key found for this signature in database
GPG key ID: 574F281483054D44
6 changed files with 11 additions and 14 deletions

View file

@ -8,7 +8,7 @@
"server": { "server": {
"host": "127.0.0.1", "host": "127.0.0.1",
"port": __PORT__, "port": __PORT__,
"store_path": "__DATADIR__/tube.db", "store_path": "tube.db",
"upload_path": "__DATADIR__/uploads", "upload_path": "__DATADIR__/uploads",
"max_upload_size": __MAX_UPLOAD_SIZE__ "max_upload_size": __MAX_UPLOAD_SIZE__
}, },

View file

@ -9,8 +9,8 @@ location __PATH__/ {
# Set max upload size # Set max upload size
client_max_body_size 10G; client_max_body_size 10G;
proxy_connect_timeout 1200; proxy_connect_timeout 1200;
proxy_send_timeout 1200; proxy_send_timeout 1200;
proxy_read_timeout 1200; proxy_read_timeout 1200;
send_timeout 1200; send_timeout 1200;
} }

View file

@ -7,7 +7,7 @@ Type=simple
User=__APP__ User=__APP__
Group=__APP__ Group=__APP__
WorkingDirectory=__FINALPATH__/ WorkingDirectory=__FINALPATH__/
ExecStart=__FINALPATH__/tube -c __DATADIR__/config.json ExecStart=__FINALPATH__/tube -c __FINALPATH__/config.json
# Sandboxing options to harden security # Sandboxing options to harden security
# Depending on specificities of your service/app, you may need to tweak these # Depending on specificities of your service/app, you may need to tweak these

View file

@ -4,8 +4,6 @@
Your video files are stored by default in `/home/yunohost.app/tube/videos`. Your video files are stored by default in `/home/yunohost.app/tube/videos`.
You can configure options in this file `/home/yunohost.app/tube/config.json` using the [documentation](https://git.mills.io/prologic/tube#configuration). Remember to restart Tube service if you change your configuration file. You can configure options in this file `/var/www/tube/config.json` using the [documentation](https://git.mills.io/prologic/tube#configuration). Remember to restart Tube service if you change your configuration file.
RSS feed address is available at `https://your_domain.tld/feed.xml` RSS feed address is available at `https://your_domain.tld/feed.xml`
The data directory with uploaded videos and the configuration file is untouched when upgrading the app. If you want to delete the data directory with the application, use the `--purge` option: `sudo yunohost app remove tube --purge`

View file

@ -129,10 +129,10 @@ chown -R $app:www-data "$datadir"
#================================================= #=================================================
ynh_script_progression --message="Adding a configuration file..." --weight=1 ynh_script_progression --message="Adding a configuration file..." --weight=1
ynh_add_config --template="../conf/config.json" --destination="$datadir/config.json" ynh_add_config --template="../conf/config.json" --destination="$final_path/config.json"
chmod 400 "$datadir/config.json" chmod 400 "$final_path/config.json"
chown $app:$app "$datadir/config.json" chown $app:$app "$final_path/config.json"
#================================================= #=================================================
# SETUP SYSTEMD # SETUP SYSTEMD

View file

@ -20,7 +20,6 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path) path_url=$(ynh_app_setting_get --app=$app --key=path)
final_path=$(ynh_app_setting_get --app=$app --key=final_path) final_path=$(ynh_app_setting_get --app=$app --key=final_path)
port=$(ynh_app_setting_get --app=$app --key=port) port=$(ynh_app_setting_get --app=$app --key=port)
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
max_upload_size=$(ynh_app_setting_get --app=$app --key=max_upload_size) max_upload_size=$(ynh_app_setting_get --app=$app --key=max_upload_size)
feed_title=$(ynh_app_setting_get --app=$app --key=feed_title) feed_title=$(ynh_app_setting_get --app=$app --key=feed_title)
@ -124,7 +123,7 @@ then
ynh_script_progression --message="Upgrading source files..." --weight=1 ynh_script_progression --message="Upgrading source files..." --weight=1
# Download, check integrity, uncompress and patch the source from app.src # Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$final_path" --source_id=$YNH_ARCH ynh_setup_source --dest_dir="$final_path" --source_id=$YNH_ARCH --keep="config.json"
fi fi
chmod 750 "$final_path" chmod 750 "$final_path"