Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Config
Commits
7e5114b3
Commit
7e5114b3
authored
Mar 09, 2019
by
Igor Pecovnik
Browse files
Syncthing bugfix
parent
534b95da
Changes
1
Hide whitespace changes
Inline
Side-by-side
debian-software
View file @
7e5114b3
...
...
@@ -112,7 +112,7 @@ function check_status
# Synthing
SYNCTHING_STATUS
=
"$([[ -f /usr/bin/syncthing ]] && echo "
on
" || echo "
off
" )"
alive_port
"Personal cloud @syncthing.net"
"8384"
"boolean"
alive_port
"Personal cloud @syncthing.net"
"8384"
LIST
+=
(
"Syncthing"
"
$DESCRIPTION
"
"
$SYNCTHING_STATUS
"
)
# Hass.io
...
...
@@ -880,13 +880,23 @@ if !(grep -qs "fs.inotify.max_user_watches=204800" "/etc/sysctl.conf");then
echo -e "fs.inotify.max_user_watches=204800" | tee -a /etc/sysctl.conf
fi
add_choose_user
mv /lib/systemd/system/syncthing@.service /lib/systemd/system/syncthing@${CHOSEN_USER}.service
# change to server IP
sed -i "s/127.0.0.1/${serverIP}/" /home/${CHOSEN_USER}/.config/syncthing/config.xml
# create startup files
mv /lib/systemd/system/syncthing@.service /lib/systemd/system/syncthing@${CHOSEN_USER}.service
systemctl enable syncthing@${CHOSEN_USER}.service >/dev/null 2>
&
1
systemctl start syncthing@${CHOSEN_USER}.service >/dev/null 2>
&
1
systemctl stop syncthing@${CHOSEN_USER}.service >/dev/null 2>
&
1
systemctl start syncthing@${CHOSEN_USER}.service >/dev/null 2>
&
1
# wait until config file is created
while :
do
if [[ -f /home/${CHOSEN_USER}/.config/syncthing/config.xml ]]; then break; fi
sleep 1
done
# change to server IP
sed -i "s/127.0.0.1/${serverIP}/" /home/${CHOSEN_USER}/.config/syncthing/config.xml
systemctl restart syncthing@${CHOSEN_USER}.service >/dev/null 2>
&
1
dialog --backtitle "$BACKTITLE" --title "Please wait" --msgbox "\nIt can take several minutes before Syncthing UI becomes available! " 7 70
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment