diff --git a/check_process b/check_process index 6751fa1..804548a 100644 --- a/check_process +++ b/check_process @@ -15,7 +15,7 @@ setup_public=1 upgrade=1 backup_restore=1 - multi_instance=0 + multi_instance=1 port_already_use=1 change_url=1 ;;; Levels @@ -26,4 +26,4 @@ Notification=none ;;; Upgrade options ; commit=CommitHash name=Name and date of the commit. - manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666& \ No newline at end of file + manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=4533& \ No newline at end of file diff --git a/conf/config.default.json b/conf/config.default.json index 5fffa5a..fe73148 100644 --- a/conf/config.default.json +++ b/conf/config.default.json @@ -3,8 +3,8 @@ "enginedebug": false, "MuteEngineLog": true, "donecmd": "", - "SeedRatio": 1.5, - "uploadrate": "High", + "SeedRatio": "", + "uploadrate": "", "donecmdthreshold": "30s", "watchdirectory": "/home/yunohost.__APP__/torrents", "downloaddirectory": "/home/yunohost.__APP__/downloads", @@ -17,5 +17,4 @@ "scraperurl": "https://raw.githubusercontent.com/boypt/simple-torrent/master/scraper-config.json", "seedratio": 0, "trackerlisturl": "https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_best.txt" - } \ No newline at end of file diff --git a/conf/systemd.service b/conf/systemd.service index c655fe7..d1c6743 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -8,7 +8,7 @@ User=__APP__ Group=__APP__ Environment=PORT=__PORT__ WorkingDirectory=__FINAL_PATH__ -ExecStart=__FINAL_PATH__/__APP__ -c __FINAL_PATH__/config.json --host 127.0.0.1 --auth __ADMIN__:__PASSWORD__ +ExecStart=__FINAL_PATH__/__APP__ -c __FINAL_PATH__/config.json --host 127.0.0.1 Restart=always RestartSec=3 diff --git a/manifest.json b/manifest.json index 58c155a..9aa91a4 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Self-hosted remote torrent client", "fr": "Client torrent distant auto-hébergé" }, - "version": "1.2.11~ynh1", + "version": "1.2.11~ynh2", "url": "https://github.com/boypt/simple-torrent", "license": "AGPL-3.0-only", "maintainer": { @@ -15,7 +15,7 @@ "requirements": { "yunohost": ">= 3.8.1" }, - "multi_instance": false, + "multi_instance": true, "services": [ "nginx" ], @@ -47,25 +47,11 @@ "en": "Is it a public site?", "fr": "Est-ce un site public ?" }, + "help": { + "en": "If enabled, Simple Torrent will be accessible by people who do not have an account. This can be changed later via the webadmin.", + "fr": "Si cette case est cochée, Simple Torrent sera accessible aux personnes n’ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin." + }, "default": true - }, - { - "name": "admin", - "type": "user", - "ask": { - "en": "Choose an admin user", - "fr": "Choisissez l'administrateur" - }, - "example": "johndoe" - }, - { - "name": "password", - "type": "password", - "ask": { - "en": "Set the administrator password", - "fr": "Définissez le mot de passe administrateur" - }, - "example": "Choose a password" } ] } diff --git a/scripts/backup b/scripts/backup index 74ada43..50cf3c9 100644 --- a/scripts/backup +++ b/scripts/backup @@ -13,10 +13,6 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= -ynh_clean_setup () { - ### Remove this function if there's nothing to clean before calling the remove script. - true -} # Exit if an error occurs during the execution of the script ynh_abort_if_errors diff --git a/scripts/install b/scripts/install index 73064cd..1769e24 100644 --- a/scripts/install +++ b/scripts/install @@ -23,8 +23,6 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH is_public=$YNH_APP_ARG_IS_PUBLIC -password=$YNH_APP_ARG_PASSWORD -admin=$YNH_APP_ARG_ADMIN architecture=$(ynh_detect_arch) app=$YNH_APP_INSTANCE_NAME @@ -47,7 +45,6 @@ ynh_script_progression --message="Storing installation settings..." --weight=2 ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url -ynh_app_setting_set --app=$app --key=admin --value=$admin ynh_app_setting_set --app=$app --key=is_public --value=$is_public #================================================= @@ -125,8 +122,6 @@ ynh_script_progression --message="Configuring a systemd service..." --weight=1 ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="../conf/systemd.service" ynh_replace_string --match_string="__FINAL_PATH__" --replace_string="$final_path" --target_file="../conf/systemd.service" ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="../conf/systemd.service" -ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" --target_file="../conf/systemd.service" -ynh_replace_string --match_string="__PASSWORD__" --replace_string="$password" --target_file="../conf/systemd.service" ynh_add_systemd_config @@ -141,7 +136,7 @@ ynh_script_progression --message="Securing files and directories..." --weight=1 chown -R $app: $final_path chown -R $app: /home/yunohost.$app chmod +x $final_path/$app -chmod -R 777 /home/yunohost.$app/{torrents,downloads} +chmod -R 755 /home/yunohost.$app/{torrents,downloads} #================================================= # INTEGRATE SERVICE IN YUNOHOST diff --git a/scripts/restore b/scripts/restore index 57b6e6d..168adae 100644 --- a/scripts/restore +++ b/scripts/restore @@ -86,7 +86,7 @@ ynh_script_progression --message="Restoring user rights..." chown -R $app: $final_path chown -R $app: /home/yunohost.$app chmod +x $final_path/$app -chmod -R 777 /home/yunohost.$app/{torrents,downloads} +chmod -R 755 /home/yunohost.$app/{torrents,downloads} #================================================= # RESTORE SYSTEMD diff --git a/scripts/upgrade b/scripts/upgrade index 37997ce..ab2eb3c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -18,12 +18,10 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) -admin=$(ynh_app_setting_get --app=$app --key=admin) is_public=$(ynh_app_setting_get --app=$app --key=is_public) final_path=$(ynh_app_setting_get --app=$app --key=final_path) port=$(ynh_app_setting_get --app=$app --key=port) peer_port=$(ynh_app_setting_get --app=$app --key=peer_port) -password=$(ynh_app_setting_get --app=$app --key=password) architecture=$(ynh_detect_arch) #================================================= @@ -80,7 +78,7 @@ fi #================================================= ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2 -# Create a dedicated nginx config +# Create a dedicated NGINX config ynh_add_nginx_config #================================================= @@ -114,10 +112,7 @@ ynh_script_progression --message="Configuring a systemd service..." --weight=2 ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="../conf/systemd.service" ynh_replace_string --match_string="__FINAL_PATH__" --replace_string="$final_path" --target_file="../conf/systemd.service" ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="../conf/systemd.service" -ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" --target_file="../conf/systemd.service" -ynh_replace_string --match_string="__PASSWORD__" --replace_string="$password" --target_file="../conf/systemd.service" -# Create a dedicated systemd config ynh_add_systemd_config #================================================= @@ -130,7 +125,7 @@ ynh_script_progression --message="Securing files and directories..." chown -R $app: $final_path chown -R $app: /home/yunohost.$app chmod +x $final_path/$app -chmod -R 777 /home/yunohost.$app/{torrents,downloads} +chmod -R 755 /home/yunohost.$app/{torrents,downloads} #================================================= # INTEGRATE SERVICE IN YUNOHOST