Skip to content

Commit

Permalink
Update trash_syno_installer.sh (#202)
Browse files Browse the repository at this point in the history
Co-authored-by: TRaSH <[email protected]>
  • Loading branch information
bokkoman and TRaSH- authored Apr 15, 2024
1 parent 71c0500 commit 42a7621
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
12 changes: 1 addition & 11 deletions script/trash_syno_installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -753,19 +753,9 @@ while true; do
sed -r 's|# devices:| devices:|g' -i "${docker_conf_dir}/appdata/docker-compose.yml"
sed -r 's|# - /dev/net/tun:/dev/net/tun| - /dev/net/tun:/dev/net/tun|g' -i "${docker_conf_dir}/appdata/docker-compose.yml"
if [[ -f "${docker_conf_dir}/appdata/qbittorrent/wireguard/wg0.conf" ]]; then
if sed -r 's|AllowedIPs = (.*)|AllowedIPs = 0.0.0.0/1,128.0.0.0/1|g' -i "${docker_conf_dir}/appdata/qbittorrent/wireguard/wg0.conf" 2> /dev/null; then
if mv "${docker_conf_dir}/appdata/qbittorrent/wireguard/wg0.conf" "${docker_conf_dir}/appdata/qbittorrent/wireguard/wg0-fix.conf" 2> /dev/null; then
printf '\n%b\n' " ${utick} wg0.conf found and fixed."
fi

if curl -sL https://raw.githubusercontent.com/TRaSH-/Guides-Synology-Templates/main/script/PreUp.sh -o "${docker_conf_dir}/appdata/qbittorrent/wireguard/PreUp.sh"; then
printf '\n%b\n' " ${utick} PreUp.sh downloaded to ${docker_conf_dir}/appdata/qbittorrent/wireguard/PreUp.sh"
fi

if ! grep -q 'PreUp = bash /config/wireguard/PreUp.sh' "${docker_conf_dir}/appdata/qbittorrent/wireguard/wg0.conf"; then
if sed '/^\[Interface\]/!b;:a;n;/./ba;iPreUp = bash /config/wireguard/PreUp.sh' -i "${docker_conf_dir}/appdata/qbittorrent/wireguard/wg0.conf" 2> /dev/null; then
printf '\n%b\n' " ${utick} PreUp = bash /config/wireguard/PreUp.sh added to wg0.conf"
fi
fi
else
printf '\n%b\n\n ' " ${ucross} wg0.conf not found. Place file with filename ${clc}wg0.conf${cend} and answer yes when ready."
fi
Expand Down
2 changes: 1 addition & 1 deletion templates/autobrr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# Don't forget to create the directory, change chown command if needed (the user:group part)
# sudo -u docker mkdir -m=00775 /volume1/docker/appdata/autobrr
#
#
autobrr:
container_name: autobrr
image: ghcr.io/autobrr/autobrr:latest
Expand Down

0 comments on commit 42a7621

Please sign in to comment.