wekan-help 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #!/bin/bash
  2. # first read settings
  3. source $SNAP/bin/wekan-read-settings &>/dev/null
  4. if [ "$CADDY_ENABLED" = "true" ]; then
  5. # tweak port nunmber as it has been remapped
  6. export PORT=${CADDY_PORT} &>/dev/null
  7. fi
  8. echo -e "Wekan: The open-source Trello-like kanban.\n"
  9. echo -e "Make sure you have connected all interfaces, check more by calling $ snap interfaces ${SNAP_NAME}"
  10. echo -e "\n"
  11. echo -e "${SNAP_NAME} has multiple services, to check status use systemctl"
  12. echo -e "\t$ systemctl status snap.$SNAP_NAME.*"
  13. echo -e "\n"
  14. echo -e "To make backup of wekan's database use: $ ${SNAP_NAME}.database-backup [backup file]"
  15. echo -e "\t backup file is optional parameter, if not passed backup is created in directory:"
  16. echo -e "\t\t${SNAP_COMMON}/db-backups"
  17. echo -e "To list existing backups in default directory: $ ${SNAP_NAME}.database-list-backups"
  18. echo -e "To restore wekan's database use: ${SNAP_NAME}.database-restore <path to backup>"
  19. echo -e "\n"
  20. echo -e "wekan can be configured to share mongodb with other services using content interface"
  21. echo -e "\t-sharing mongodb from $SNAP_NAME to other snap(s):"
  22. echo -e "\t\t-connect mongodb-slot with plug from corresponding snap(s)"
  23. echo -e "\t\t-configure corresponding service to use mongodb unix socket in shared directory, socket file name is: mongodb-$MONGODB_PORT.sock"
  24. echo -e "\t-sharing mongodb from other snap to $SNAP_NAME:"
  25. echo -e "\t\t-connect mongodb-plug with slot from snap providing mongodb"
  26. echo -e "\t\t-disable mongodb in $SNAP_NAME by calling: $ snap set $SNAP_NAME set disable-mongodb='true'"
  27. echo -e "\t\t-set mongodb-bind-unix-socket to point to serving mongodb. Use relative path inside shared directory, e.g run/mongodb-27017.sock"
  28. echo -e "\n"
  29. echo -e "To enable the API of wekan:"
  30. echo -e "\t$ snap set $SNAP_NAME WITH_API='true'"
  31. echo -e "\t-Disable the API:"
  32. echo -e "\t$ snap set $SNAP_NAME WITH_API='false'"
  33. echo -e "\n"
  34. echo -e "Enable browser policy and allow one trusted URL that can have iframe that has Wekan embedded inside."
  35. echo -e "\t\t Setting this to false is not recommended, it also disables all other browser policy protections"
  36. echo -e "\t\t and allows all iframing etc. See wekan/server/policy.js"
  37. echo -e "To enable the Content Policy of Wekan:"
  38. echo -e "\t$ snap set $SNAP_NAME CONTENT_POLICY_ENABLED='true'"
  39. echo -e "\t-Disable the Content Policy of Wekan:"
  40. echo -e "\t$ snap set $SNAP_NAME CONTENT_POLICY_ENABLED='false'"
  41. echo -e "\n"
  42. echo -e "When browser policy is enabled, HTML code at this URL can have iframe that embeds Wekan inside."
  43. echo -e "To enable the Trusted URL of Wekan:"
  44. echo -e "\t$ snap set $SNAP_NAME TRUSTED_URL='https://example.com'"
  45. echo -e "\t-Disable the Trusted URL of Wekan:"
  46. echo -e "\t$ snap set $SNAP_NAME TRUSTED_URL=''"
  47. echo -e "\n"
  48. # parse config file for supported settings keys
  49. echo -e "wekan supports settings keys"
  50. echo -e "values can be changed by calling\n$ snap set $SNAP_NAME <key name>='<key value>'"
  51. echo -e "list of supported keys:"
  52. for key in ${keys[@]}
  53. do
  54. default_value="DEFAULT_$key"
  55. description="DESCRIPTION_$key"
  56. snappy_key="KEY_$key"
  57. echo -e "\t${!snappy_key}: ${!description}"
  58. if [ "x" == "x${!key}" ]; then
  59. echo -e "\t\tNo value set, using default value: '${!default_value}'"
  60. else
  61. echo -e "\t\tCurrent value set to: '${!key}', (default value: '${!default_value}')"
  62. fi
  63. done
  64. echo -e "\n!!!! Some changes result in restart of some or all services, use with caution !!!!!"