Fixing wrong path and supresing output

This commit is contained in:
Igor Pecovnik
2018-05-09 14:58:25 +02:00
parent 9ef138e527
commit d82c10c859

View File

@@ -733,8 +733,8 @@ fancy_wget "$wgeturl" "-O ${TEMP_DIR}/syncthing.tgz"
wgeturl=$(curl -s "https://api.github.com/repos/syncthing/syncthing-inotify/releases" | grep $filename | grep 'browser_download_url' | head -1 | cut -d \" -f 4)
fancy_wget "$wgeturl" "-O ${TEMP_DIR}/syncthing-inotify.tgz"
tar xf ${TEMP_DIR}/syncthing.tgz -C ${TEMP_DIR}
tar xf ${TEMP_DIR}/syncthing-inotify.tgz -C /usr/bin/syncthing
cp -R ${TEMP_DIR}/syncthing-*/syncthing /usr/bin/syncthing/
tar xf ${TEMP_DIR}/syncthing-inotify.tgz -C /usr/bin
cp -R ${TEMP_DIR}/syncthing-*/syncthing /usr/bin
cp ${TEMP_DIR}/syncthing-*/etc/linux-systemd/system/syncthing* /etc/systemd/system/
cp /etc/systemd/system/syncthing@.service /etc/systemd/system/syncthing-inotify@.service
@@ -749,10 +749,10 @@ 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
systemctl enable syncthing@${CHOSEN_USER}.service
systemctl start syncthing@${CHOSEN_USER}.service
systemctl enable syncthing-inotify@${CHOSEN_USER}.service
systemctl start syncthing-inotify@${CHOSEN_USER}.service
systemctl enable syncthing@${CHOSEN_USER}.service >/dev/null 2>&1
systemctl start syncthing@${CHOSEN_USER}.service >/dev/null 2>&1
systemctl enable syncthing-inotify@${CHOSEN_USER}.service >/dev/null 2>&1
systemctl start syncthing-inotify@${CHOSEN_USER}.service >/dev/null 2>&1
}