freedombone-app-syncthing 20KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532
  1. #!/bin/bash
  2. #
  3. # .---. . .
  4. # | | |
  5. # |--- .--. .-. .-. .-.| .-. .--.--. |.-. .-. .--. .-.
  6. # | | (.-' (.-' ( | ( )| | | | )( )| | (.-'
  7. # ' ' --' --' -' - -' ' ' -' -' -' ' - --'
  8. #
  9. # Freedom in the Cloud
  10. #
  11. # Syncthing application
  12. #
  13. # License
  14. # =======
  15. #
  16. # Copyright (C) 2014-2016 Bob Mottram <bob@robotics.uk.to>
  17. #
  18. # This program is free software: you can redistribute it and/or modify
  19. # it under the terms of the GNU Affero General Public License as published by
  20. # the Free Software Foundation, either version 3 of the License, or
  21. # (at your option) any later version.
  22. #
  23. # This program is distributed in the hope that it will be useful,
  24. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  25. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  26. # GNU Affero General Public License for more details.
  27. #
  28. # You should have received a copy of the GNU Affero General Public License
  29. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  30. VARIANTS='full full-vim cloud'
  31. IN_DEFAULT_INSTALL=1
  32. SYNCTHING_ID=
  33. SYNCTHING_CONFIG_PATH=/root/.config/syncthing
  34. SYNCTHING_CONFIG_FILE=$SYNCTHING_CONFIG_PATH/config.xml
  35. SYNCTHING_RELAY_SERVER='https://relays.syncthing.net/endpoint'
  36. SYNCTHING_RELEASES='https://api.github.com/repos/syncthing/syncthing/releases?per_page=30'
  37. SYNCTHING_PORT=22000
  38. SYNCTHING_SHARED_DATA=/var/lib/syncthing/SyncShared
  39. SYNCTHING_USER_IDS_FILE='.syncthingids'
  40. syncthing_variables=(SYNCTHING_ID
  41. SYNCTHING_CONFIG_PATH
  42. SYNCTHING_CONFIG_FILE
  43. SYNCTHING_RELAY_SERVER
  44. SYNCTHING_RELEASES
  45. SYNCTHING_PORT
  46. SYNCTHING_SHARED_DATA
  47. USB_MOUNT)
  48. function syncthing_create_ids_file {
  49. if [ ! -f ~/.syncthing-server-id ]; then
  50. return
  51. fi
  52. SYNCTHING_ID=$(cat ~/.syncthing-server-id)
  53. if [ ! -f $SYNCTHING_CONFIG_FILE ]; then
  54. echo $'# Your syncthing configuration file' > $SYNCTHING_CONFIG_FILE
  55. echo '#' >> $SYNCTHING_CONFIG_FILE
  56. echo $"# The ${PROJECT_NAME} syncthing ID is: $SYNCTHING_ID" >> $SYNCTHING_CONFIG_FILE
  57. echo '#' >> $SYNCTHING_CONFIG_FILE
  58. echo '# Paste the IDs of your devices below' >> $SYNCTHING_CONFIG_FILE
  59. echo '#' >> $SYNCTHING_CONFIG_FILE
  60. fi
  61. }
  62. function syncthing_manual_edit {
  63. if [ ! -f ~/.syncthing-server-id ]; then
  64. return
  65. fi
  66. syncthing_create_ids_file
  67. editor $SYNCTHING_CONFIG_FILE
  68. # force an update of the configuration
  69. touch ~/.syncthing-update
  70. }
  71. function syncthing_show_id {
  72. if [ ! -f ~/.syncthing-server-id ]; then
  73. return
  74. fi
  75. SYNCTHING_ID=$(cat ~/.syncthing-server-id)
  76. dialog --title $"Device ID for ${PROJECT_NAME}" \
  77. --backtitle $"Freedombone User Control Panel" \
  78. --msgbox $"In a desktop terminal press shift and select the ID below,\nthen right click and copy.\n\nWithin Connectbot select Menu/Copy and then highlight the ID below\n\n$SYNCTHING_ID" 12 78
  79. }
  80. function syncthing_add_id {
  81. if [ ! -f ~/.syncthing-server-id ]; then
  82. return
  83. fi
  84. syncthing_create_ids_file
  85. data=$(tempfile 2>/dev/null)
  86. trap "rm -f $data" 0 1 2 5 15
  87. dialog --backtitle $"Freedombone User Control Panel" \
  88. --title $"Add a Syncthing device ID" \
  89. --form $"Paste the device ID for your laptop/desktop/netbook/phone/tablet below" 9 80 2 \
  90. $"Device ID:" 1 1 "" 1 26 80 80 \
  91. $"Description (optional):" 2 1 "" 2 26 80 80 \
  92. 2> $data
  93. sel=$?
  94. case $sel in
  95. 1) return;;
  96. 255) return;;
  97. esac
  98. SYNCTHING_DEVICE_ID=$(cat $data | sed -n 1p)
  99. SYNCTHING_DESCRIPTION=$(cat $data | sed -n 2p)
  100. if [ ${#SYNCTHING_DEVICE_ID} -lt 10 ]; then
  101. return
  102. fi
  103. if [[ $SYNCTHING_DEVICE_ID == *"#"* || $SYNCTHING_DEVICE_ID == *"*"* || $SYNCTHING_DEVICE_ID == *'/'* || $SYNCTHING_DEVICE_ID != *"-"* ]]; then
  104. dialog --title $"Add a Syncthing device ID" \
  105. --backtitle $"Freedombone User Control Panel" \
  106. --msgbox $"That doesn't look like a device ID" 6 50
  107. return
  108. fi
  109. if grep -q "$SYNCTHING_DEVICE_ID" $SYNCTHING_CONFIG_FILE; then
  110. dialog --title $"Add a Syncthing device ID" \
  111. --backtitle $"Freedombone User Control Panel" \
  112. --msgbox $"That ID has already been added" 6 50
  113. return
  114. fi
  115. if [ ${#SYNCTHING_DESCRIPTION} -gt 0 ]; then
  116. echo "# $SYNCTHING_DESCRIPTION" >> $SYNCTHING_CONFIG_FILE
  117. fi
  118. echo "$SYNCTHING_DEVICE_ID" >> $SYNCTHING_CONFIG_FILE
  119. # force an update of the configuration
  120. touch ~/.syncthing-update
  121. dialog --title $"Add a Syncthing device ID" \
  122. --backtitle $"Freedombone User Control Panel" \
  123. --msgbox $"The ID was added" 6 50
  124. }
  125. function syncthing_remove_id {
  126. if [ ! -f ~/.syncthing-server-id ]; then
  127. return
  128. fi
  129. syncthing_create_ids_file
  130. data=$(tempfile 2>/dev/null)
  131. trap "rm -f $data" 0 1 2 5 15
  132. dialog --backtitle $"Freedombone User Control Panel" \
  133. --title $"Remove a Syncthing device ID" \
  134. --form $"Paste the device ID which is to be removed below" 8 80 1 \
  135. $"Device ID:" 1 1 "" 1 14 80 80 \
  136. 2> $data
  137. sel=$?
  138. case $sel in
  139. 1) return;;
  140. 255) return;;
  141. esac
  142. SYNCTHING_DEVICE_ID=$(cat $data | sed -n 1p)
  143. if [ ${#SYNCTHING_DEVICE_ID} -lt 10 ]; then
  144. return
  145. fi
  146. if [[ $SYNCTHING_DEVICE_ID == *"#"* || $SYNCTHING_DEVICE_ID == *"*"* || $SYNCTHING_DEVICE_ID == *'/'* || $SYNCTHING_DEVICE_ID != *"-"* ]]; then
  147. dialog --title $"Remove a Syncthing device ID" \
  148. --backtitle $"Freedombone User Control Panel" \
  149. --msgbox $"That doesn't look like a device ID" 6 50
  150. return
  151. fi
  152. if ! grep -q "$SYNCTHING_DEVICE_ID" $SYNCTHING_CONFIG_FILE; then
  153. dialog --title $"Remove a Syncthing device ID" \
  154. --backtitle $"Freedombone User Control Panel" \
  155. --msgbox $"That ID wasn't registered anyway" 6 50
  156. return
  157. fi
  158. sed -i "/$SYNCTHING_DEVICE_ID/d" $SYNCTHING_CONFIG_FILE
  159. # force an update of the configuration
  160. touch ~/.syncthing-update
  161. dialog --title $"Remove a Syncthing device ID" \
  162. --backtitle $"Freedombone User Control Panel" \
  163. --msgbox $"The ID was removed" 6 50
  164. }
  165. function run_client_syncthing {
  166. SYNCTHING_CONFIG_FILE=~/.syncthingids
  167. SYNCTHING_ID=$(cat ~/.syncthing-server-id)
  168. while true
  169. do
  170. data=$(tempfile 2>/dev/null)
  171. trap "rm -f $data" 0 1 2 5 15
  172. dialog --backtitle $"Freedombone User Control Panel" \
  173. --title $"File Synchronization" \
  174. --radiolist $"Choose an operation:" 12 70 6 \
  175. 1 $"Show device ID for ${PROJECT_NAME}" off \
  176. 2 $"Add an ID for another machine or device" off \
  177. 3 $"Remove an ID for another machine or device" off \
  178. 4 $"Manually edit device IDs" off \
  179. 5 $"Back to main menu" on 2> $data
  180. sel=$?
  181. case $sel in
  182. 1) break;;
  183. 255) break;;
  184. esac
  185. case $(cat $data) in
  186. 1) syncthing_show_id;;
  187. 2) syncthing_add_id;;
  188. 3) syncthing_remove_id;;
  189. 4) syncthing_manual_edit;;
  190. 5) break;;
  191. esac
  192. done
  193. }
  194. function install_interactive_syncthing {
  195. echo -n ''
  196. APP_INSTALLED=1
  197. }
  198. function change_password_syncthing {
  199. echo -n ''
  200. }
  201. function reconfigure_syncthing {
  202. echo -n ''
  203. }
  204. function upgrade_syncthing {
  205. echo -n ''
  206. }
  207. function backup_local_syncthing {
  208. if [ -d /var/lib/syncthing/SyncShared ]; then
  209. echo $"Backing up syncthing"
  210. function_check backup_directory_to_usb
  211. backup_directory_to_usb /var/lib/syncthing/SyncShared syncthingshared
  212. backup_directory_to_usb /root/.config/syncthing syncthingconfig
  213. echo $"Backup to syncthing complete"
  214. fi
  215. for d in /home/*/ ; do
  216. USERNAME=$(echo "$d" | awk -F '/' '{print $3}')
  217. if [[ $(is_valid_user "$USERNAME") == "1" ]]; then
  218. if [ -d /home/$USERNAME/Sync ]; then
  219. echo $"Backing up syncthing files for $USERNAME"
  220. backup_directory_to_usb /home/$USERNAME/Sync syncthing/$USERNAME
  221. # ensure that device IDs will be backed up as part of user config settings
  222. if [ ! -d /home/$USERNAME/.config/syncthing ]; then
  223. mkdir -p /home/$USERNAME/.config/syncthing
  224. chown -R $USERNAME:$USERNAME /home/$USERNAME/.config
  225. fi
  226. if [ -f /home/$USERNAME/.syncthing-server-id ]; then
  227. cp /home/$USERNAME/.syncthing-server-id /home/$USERNAME/.config/syncthing
  228. chown -R $USERNAME:$USERNAME /home/$USERNAME/.config
  229. fi
  230. if [ -f /home/$USERNAME/.syncthingids ]; then
  231. cp /home/$USERNAME/.syncthingids /home/$USERNAME/.config/syncthing
  232. chown -R $USERNAME:$USERNAME /home/$USERNAME/.config
  233. fi
  234. fi
  235. fi
  236. done
  237. }
  238. function restore_local_syncthing {
  239. if [ -f /etc/systemd/system/syncthing.service ]; then
  240. systemctl stop syncthing
  241. systemctl stop cron
  242. fi
  243. temp_restore_dir=/root/tempsyncthing
  244. if [ -d $USB_MOUNT/backup/syncthingconfig ]; then
  245. echo $"Restoring syncthing configuration"
  246. function_check restore_directory_from_usb
  247. restore_directory_from_usb ${temp_restore_dir}config syncthingconfig
  248. cp -r ${temp_restore_dir}config/* /
  249. if [ ! "$?" = "0" ]; then
  250. set_user_permissions
  251. backup_unmount_drive
  252. systemctl start syncthing
  253. systemctl start cron
  254. exit 6833
  255. fi
  256. rm -rf ${temp_restore_dir}config
  257. fi
  258. if [ -d $USB_MOUNT/backup/syncthingshared ]; then
  259. echo $"Restoring syncthing shared files"
  260. restore_directory_from_usb ${temp_restore_dir}shared syncthingshared
  261. cp -r ${temp_restore_dir}shared/* /
  262. if [ ! "$?" = "0" ]; then
  263. set_user_permissions
  264. backup_unmount_drive
  265. systemctl start syncthing
  266. systemctl start cron
  267. exit 37904
  268. fi
  269. rm -rf ${temp_restore_dir}shared
  270. fi
  271. if [ -d $USB_MOUNT/backup/syncthing ]; then
  272. for d in $USB_MOUNT/backup/syncthing/*/ ; do
  273. USERNAME=$(echo "$d" | awk -F '/' '{print $6}')
  274. if [[ $(is_valid_user "$USERNAME") == "1" ]]; then
  275. if [ ! -d /home/$USERNAME ]; then
  276. ${PROJECT_NAME}-adduser $USERNAME
  277. fi
  278. echo $"Restoring syncthing files for $USERNAME"
  279. restore_directory_from_usb ${temp_restore_dir} syncthing/$USERNAME
  280. cp -r ${temp_restore_dir}/home/$USERNAME/Sync /home/$USERNAME/
  281. if [ ! "$?" = "0" ]; then
  282. rm -rf ${temp_restore_dir}
  283. set_user_permissions
  284. backup_unmount_drive
  285. systemctl start syncthing
  286. systemctl start cron
  287. exit 68438
  288. fi
  289. rm -rf ${temp_restore_dir}
  290. # restore device IDs from config settings
  291. if [ -f /home/$USERNAME/.config/syncthing/.syncthing-server-id ]; then
  292. cp /home/$USERNAME/.config/syncthing/.syncthing-server-id /home/$USERNAME/.syncthing-server-id
  293. chown $USERNAME:$USERNAME /home/$USERNAME/.syncthing-server-id
  294. fi
  295. if [ -f /home/$USERNAME/.config/syncthing/.syncthingids ]; then
  296. cp /home/$USERNAME/.config/syncthing/.syncthingids /home/$USERNAME/.syncthingids
  297. chown $USERNAME:$USERNAME /home/$USERNAME/.syncthingids
  298. fi
  299. fi
  300. done
  301. fi
  302. if [ -f /etc/systemd/system/syncthing.service ]; then
  303. systemctl start syncthing
  304. systemctl start cron
  305. fi
  306. }
  307. function backup_remote_syncthing {
  308. if [ -d /root/.config/syncthing ]; then
  309. echo $"Backing up syncthing configuration"
  310. function_check backup_directory_to_friend
  311. backup_directory_to_friend /root/.config/syncthing syncthingconfig
  312. echo $"Backup of syncthing configuration complete"
  313. fi
  314. if [ -d /var/lib/syncthing/SyncShared ]; then
  315. echo $"Backing up syncthing shared files"
  316. function_check backup_directory_to_friend
  317. backup_directory_to_friend /var/lib/syncthing/SyncShared syncthingshared
  318. echo $"Backup of syncthing shared files complete"
  319. fi
  320. for d in /home/*/ ; do
  321. USERNAME=$(echo "$d" | awk -F '/' '{print $3}')
  322. if [[ $(is_valid_user "$USERNAME") == "1" ]]; then
  323. if [ -d /home/$USERNAME/Sync ]; then
  324. echo $"Backing up syncthing files for $USERNAME"
  325. backup_directory_to_friend /home/$USERNAME/Sync syncthing/$USERNAME
  326. # ensure that device IDs will be backed up as part of user config settings
  327. if [ ! -d /home/$USERNAME/.config/syncthing ]; then
  328. mkdir -p /home/$USERNAME/.config/syncthing
  329. chown -R $USERNAME:$USERNAME /home/$USERNAME/.config
  330. fi
  331. if [ -f /home/$USERNAME/.syncthing-server-id ]; then
  332. cp /home/$USERNAME/.syncthing-server-id /home/$USERNAME/.config/syncthing
  333. chown -R $USERNAME:$USERNAME /home/$USERNAME/.config
  334. fi
  335. if [ -f /home/$USERNAME/.syncthingids ]; then
  336. cp /home/$USERNAME/.syncthingids /home/$USERNAME/.config/syncthing
  337. chown -R $USERNAME:$USERNAME /home/$USERNAME/.config
  338. fi
  339. fi
  340. fi
  341. done
  342. }
  343. function restore_remote_syncthing {
  344. if [ -f /etc/systemd/system/syncthing.service ]; then
  345. systemctl stop syncthing
  346. systemctl stop cron
  347. fi
  348. if [ -d $SERVER_DIRECTORY/backup/syncthingconfig ]; then
  349. echo $"Restoring syncthing configuration"
  350. temp_restore_dir=/root/tempsyncthingconfig
  351. function_check restore_directory_from_friend
  352. restore_directory_from_friend $temp_restore_dir syncthingconfig
  353. cp -r $temp_restore_dir/* /
  354. if [ ! "$?" = "0" ]; then
  355. systemctl start syncthing
  356. systemctl start cron
  357. exit 6833
  358. fi
  359. rm -rf $temp_restore_dir
  360. fi
  361. if [ -d $SERVER_DIRECTORY/backup/syncthingshared ]; then
  362. echo $"Restoring syncthing shared files"
  363. temp_restore_dir=/root/tempsyncthingshared
  364. function_check restore_directory_from_friend
  365. restore_directory_from_friend $temp_restore_dir syncthingshared
  366. cp -r $temp_restore_dir/* /
  367. if [ ! "$?" = "0" ]; then
  368. systemctl start syncthing
  369. systemctl start cron
  370. exit 37904
  371. fi
  372. rm -rf $temp_restore_dir
  373. fi
  374. if [ -d $SERVER_DIRECTORY/backup/syncthing ]; then
  375. for d in $SERVER_DIRECTORY/backup/syncthing/*/ ; do
  376. USERNAME=$(echo "$d" | awk -F '/' '{print $6}')
  377. if [[ $(is_valid_user "$USERNAME") == "1" ]]; then
  378. if [ ! -d /home/$USERNAME ]; then
  379. ${PROJECT_NAME}-adduser $USERNAME
  380. fi
  381. echo $"Restoring syncthing files for $USERNAME"
  382. temp_restore_dir=/root/tempsyncthing
  383. function_check restore_directory_from_friend
  384. restore_directory_from_friend $temp_restore_dir syncthing/$USERNAME
  385. cp -r $temp_restore_dir/home/$USERNAME/Sync /home/$USERNAME/
  386. if [ ! "$?" = "0" ]; then
  387. rm -rf $temp_restore_dir
  388. systemctl start syncthing
  389. systemctl start cron
  390. exit 68438
  391. fi
  392. rm -rf $temp_restore_dir
  393. # restore device IDs from config settings
  394. if [ -f /home/$USERNAME/.config/syncthing/.syncthing-server-id ]; then
  395. cp /home/$USERNAME/.config/syncthing/.syncthing-server-id /home/$USERNAME/.syncthing-server-id
  396. chown $USERNAME:$USERNAME /home/$USERNAME/.syncthing-server-id
  397. fi
  398. if [ -f /home/$USERNAME/.config/syncthing/.syncthingids ]; then
  399. cp /home/$USERNAME/.config/syncthing/.syncthingids /home/$USERNAME/.syncthingids
  400. chown $USERNAME:$USERNAME /home/$USERNAME/.syncthingids
  401. fi
  402. echo $"Restore of syncthing files for $USERNAME complete"
  403. fi
  404. done
  405. fi
  406. if [ -f /etc/systemd/system/syncthing.service ]; then
  407. systemctl start syncthing
  408. systemctl start cron
  409. fi
  410. }
  411. function remove_syncthing {
  412. iptables -D INPUT -p udp --dport $SYNCTHING_PORT -j ACCEPT
  413. iptables -D INPUT -p tcp --dport $SYNCTHING_PORT -j ACCEPT
  414. function_check save_firewall_settings
  415. save_firewall_settings
  416. systemctl stop syncthing
  417. systemctl disable syncthing
  418. apt-get -y remove --purge syncthing
  419. rm /etc/systemd/system/syncthing.service
  420. sed -i "/${PROJECT_NAME}-syncthing/d" /etc/crontab
  421. remove_completion_param install_syncthing
  422. remove_completion_param configure_firewall_for_syncthing
  423. systemctl restart cron
  424. }
  425. function configure_firewall_for_syncthing {
  426. if [[ $(is_completed $FUNCNAME) == "1" ]]; then
  427. return
  428. fi
  429. iptables -A INPUT -p udp --dport $SYNCTHING_PORT -j ACCEPT
  430. iptables -A INPUT -p tcp --dport $SYNCTHING_PORT -j ACCEPT
  431. function_check save_firewall_settings
  432. save_firewall_settings
  433. OPEN_PORTS+=("Syncthing $SYNCTHING_PORT")
  434. mark_completed $FUNCNAME
  435. }
  436. function install_syncthing {
  437. apt-get -y install curl
  438. curl -s https://syncthing.net/release-key.txt | apt-key add -
  439. echo "deb http://apt.syncthing.net/ syncthing release" | tee /etc/apt/sources.list.d/syncthing.list
  440. apt-get update
  441. apt-get -y install syncthing
  442. # This probably does need to run as root so that it can access the Sync directories
  443. # in each user's home directory
  444. echo '[Unit]' > /etc/systemd/system/syncthing.service
  445. echo 'Description=Syncthing - Open Source Continuous File Synchronization' >> /etc/systemd/system/syncthing.service
  446. echo 'Documentation=man:syncthing(1)' >> /etc/systemd/system/syncthing.service
  447. echo 'After=network.target' >> /etc/systemd/system/syncthing.service
  448. echo 'Wants=syncthing-inotify@.service' >> /etc/systemd/system/syncthing.service
  449. echo '' >> /etc/systemd/system/syncthing.service
  450. echo '[Service]' >> /etc/systemd/system/syncthing.service
  451. echo 'User=root' >> /etc/systemd/system/syncthing.service
  452. echo "Environment='all_proxy=socks5://localhost:9050'" >> /etc/systemd/system/syncthing.service
  453. echo 'ExecStart=/usr/bin/syncthing -no-browser -no-restart -logflags=0' >> /etc/systemd/system/syncthing.service
  454. echo 'Restart=on-failure' >> /etc/systemd/system/syncthing.service
  455. echo 'SuccessExitStatus=3 4' >> /etc/systemd/system/syncthing.service
  456. echo 'RestartForceExitStatus=3 4' >> /etc/systemd/system/syncthing.service
  457. echo '' >> /etc/systemd/system/syncthing.service
  458. echo '[Install]' >> /etc/systemd/system/syncthing.service
  459. echo 'WantedBy=multi-user.target' >> /etc/systemd/system/syncthing.service
  460. systemctl enable syncthing
  461. systemctl daemon-reload
  462. systemctl start syncthing
  463. function_check cron_add_mins
  464. cron_add_mins 1 "/usr/local/bin/${PROJECT_NAME}-syncthing > /dev/null"
  465. function_check configure_firewall_for_syncthing
  466. configure_firewall_for_syncthing
  467. APP_INSTALLED=1
  468. }
  469. # NOTE: deliberately no exit 0