mirror of
https://github.com/YunoHost-Apps/syncthing_ynh.git
synced 2024-09-03 20:26:23 +02:00
commit
89687d0fb0
11 changed files with 29 additions and 16 deletions
|
@ -9,7 +9,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
|||
## Overview
|
||||
Syncthing replaces proprietary sync and cloud services with something open, trustworthy and decentralized. Your data is your data alone and you deserve to choose where it is stored, if it is shared with some third party and how it's transmitted over the Internet.
|
||||
|
||||
**Shipped version:** 1.10.0
|
||||
**Shipped version:** 1.12.0
|
||||
|
||||
## Screenshots
|
||||
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
upgrade=1 from_commit=73bac603324544f2ae3de05487f804a09c0a3673
|
||||
# 1.8.0~ynh1
|
||||
upgrade=1 from_commit=36c6b16e1ede95d51d3ddcbf8b00f6f2ee1a843f
|
||||
# 1.10.0~ynh1
|
||||
upgrade=1 from_commit=f8bfd49d14a7050f30452884c6d59c972c2843ef
|
||||
backup_restore=1
|
||||
multi_instance=0
|
||||
# This test is no longer necessary since the version 2.7 (PR: https://github.com/YunoHost/yunohost/pull/304), you can still do it if your app could be installed with this version.
|
||||
|
@ -57,3 +59,5 @@ Notification=all
|
|||
name=1.6.1~ynh1
|
||||
; commit=36c6b16e1ede95d51d3ddcbf8b00f6f2ee1a843f
|
||||
name=1.8.0~ynh1
|
||||
; commit=f8bfd49d14a7050f30452884c6d59c972c2843ef
|
||||
name=1.10.0~ynh1
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
SOURCE_URL=https://github.com/syncthing/syncthing/releases/download/v1.10.0/syncthing-linux-arm-v1.10.0.tar.gz
|
||||
SOURCE_SUM=4ea920bd257377efcae1d17fb83091efb5bb3bb755782875593ccc6c7f70eac1
|
||||
SOURCE_URL=https://github.com/syncthing/syncthing/releases/download/v1.12.0/syncthing-linux-arm-v1.12.0.tar.gz
|
||||
SOURCE_SUM=53316f99af2b4c618636e64e3b28ea2fd257720806ce48bfa2ca5dbea8b3b4a7
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=tar.gz
|
||||
SOURCE_IN_SUBDIR=true
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
SOURCE_URL=https://github.com/syncthing/syncthing/releases/download/v1.10.0/syncthing-linux-arm64-v1.10.0.tar.gz
|
||||
SOURCE_SUM=7b1f0cd58eddbaac6d89df813d1f5ea13ea3240570a202db031b1bb7765269a0
|
||||
SOURCE_URL=https://github.com/syncthing/syncthing/releases/download/v1.12.0/syncthing-linux-arm64-v1.12.0.tar.gz
|
||||
SOURCE_SUM=f26f9c091e04f4337faf334ef44f8b1ca2b32a1f2e391bea3e1aa998ef3d4e87
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=tar.gz
|
||||
SOURCE_IN_SUBDIR=true
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
SOURCE_URL=https://github.com/syncthing/syncthing/releases/download/v1.10.0/syncthing-linux-386-v1.10.0.tar.gz
|
||||
SOURCE_SUM=3fcc34be89342f8e0c98e2d042e9cb320c48bf9ab37170b94ad9bc03d54e2ac5
|
||||
SOURCE_URL=https://github.com/syncthing/syncthing/releases/download/v1.12.0/syncthing-linux-386-v1.12.0.tar.gz
|
||||
SOURCE_SUM=811238f8ccc4e4a8d84aef825fd9009d34dde290712f6a0e88efdd3f930f2f6d
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=tar.gz
|
||||
SOURCE_IN_SUBDIR=true
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
SOURCE_URL=https://github.com/syncthing/syncthing/releases/download/v1.10.0/syncthing-linux-amd64-v1.10.0.tar.gz
|
||||
SOURCE_SUM=220e4355ed3a05461fccdddf8a96d73ee7b733b6feca34b7ba1405801676c6b8
|
||||
SOURCE_URL=https://github.com/syncthing/syncthing/releases/download/v1.12.0/syncthing-linux-amd64-v1.12.0.tar.gz
|
||||
SOURCE_SUM=7ccfaa5c6d12c9974521eabc999c70556830a16f6fd2496c6bcefc0a4404ef64
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=tar.gz
|
||||
SOURCE_IN_SUBDIR=true
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"en": "Continuous file synchronization program.",
|
||||
"fr": "Programme de synchronisation de fichiers en continu."
|
||||
},
|
||||
"version": "1.10.0~ynh1",
|
||||
"version": "1.12.0~ynh1",
|
||||
"url": "https://syncthing.net/",
|
||||
"license": "MPL-2.0",
|
||||
"maintainer": [
|
||||
|
|
|
@ -59,7 +59,7 @@ ynh_backup --src_path="/etc/systemd/system/$app.service"
|
|||
#=================================================
|
||||
# BACKUP THE DATA DIRECTORY
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up data directory..."
|
||||
ynh_print_info --message="Backing up data directory..."
|
||||
|
||||
ynh_backup --src_path="$sync_home" --is_big
|
||||
|
||||
|
|
|
@ -162,7 +162,7 @@ chown -R $app: $final_path
|
|||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..."
|
||||
|
||||
yunohost service add $app --description "$app daemon for Syncthing" --log_type "systemd"
|
||||
yunohost service add $app --description "$app daemon for Syncthing" --needs_exposed_ports $sync_port
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
|
|
|
@ -31,6 +31,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
|
|||
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
sync_home=$(ynh_app_setting_get --app=$app --key=sync_home)
|
||||
sync_port=$(ynh_app_setting_get --app=$app --key=sync_port)
|
||||
|
||||
#=================================================
|
||||
# CHECK IF THE APP CAN BE RESTORED
|
||||
|
@ -44,6 +45,14 @@ test ! -d $final_path \
|
|||
|
||||
#=================================================
|
||||
# STANDARD RESTORATION STEPS
|
||||
#=================================================
|
||||
# OPEN A PORT
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring firewall..."
|
||||
|
||||
# Open the port
|
||||
ynh_exec_warn_less yunohost firewall allow TCP $sync_port
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
@ -91,14 +100,14 @@ chown -R "$app": "$sync_home"
|
|||
ynh_script_progression --message="Restoring the systemd configuration..."
|
||||
|
||||
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
|
||||
systemctl enable $app.service
|
||||
systemctl enable $app.service --quiet
|
||||
|
||||
#=================================================
|
||||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..."
|
||||
|
||||
yunohost service add $app --description "$app daemon for Syncthing" --log_type "systemd"
|
||||
yunohost service add $app --description "$app daemon for Syncthing" --needs_exposed_ports $sync_port
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
|
|
|
@ -71,7 +71,7 @@ if [ -z $gui_port ]; then
|
|||
|
||||
systemctl stop syncthing@$OLD_SYNCUSER.service
|
||||
yunohost service remove syncthing@$OLD_SYNCUSER.service
|
||||
systemctl disable syncthing@$OLD_SYNCUSER.service
|
||||
systemctl disable syncthing@$OLD_SYNCUSER.service --quiet
|
||||
|
||||
ynh_secure_remove --file="/etc/apt/sources.list.d/syncthing.list"
|
||||
|
||||
|
@ -180,7 +180,7 @@ ynh_add_systemd_config
|
|||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..."
|
||||
|
||||
yunohost service add $app --description "$app daemon for Syncthing" --log_type "systemd"
|
||||
yunohost service add $app --description "$app daemon for Syncthing" --needs_exposed_ports $sync_port
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
|
|
Loading…
Add table
Reference in a new issue