wekan-help 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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 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. echo -e "What to send to Outgoing Webhook, or leave out. Example, that includes all that are default: cardId,listId,oldListId,boardId,comment,user,card,commentId ."
  49. echo -e "To enable the Webhooks Attributes of Wekan:"
  50. echo -e "\t$ snap set $SNAP_NAME WEBHOOKS_ATTRIBUTES='cardId,listId,oldListId,boardId,comment,user,card,commentId'"
  51. echo -e "\t-Disable the Webhooks Attributes of Wekan to send all default ones:"
  52. echo -e "\t$ snap set $SNAP_NAME WEBHOOKS_ATTRIBUTES=''"
  53. echo -e "\n"
  54. echo -e "OAuth2 Client ID, for example from Rocket.Chat. Example: abcde12345"
  55. echo -e "To enable the OAuth2 Client ID of Wekan:"
  56. echo -e "\t$ snap set $SNAP_NAME OAUTH2_CLIENT_ID='54321abcde'"
  57. echo -e "\t-Disable the OAuth2 Client ID of Wekan:"
  58. echo -e "\t$ snap set $SNAP_NAME OAUTH2_CLIENT_ID=''"
  59. echo -e "\n"
  60. echo -e "OAuth2 Secret, for example from Rocket.Chat. Example: 54321abcde"
  61. echo -e "To enable the OAuth2 Secret of Wekan:"
  62. echo -e "\t$ snap set $SNAP_NAME OAUTH2_SECRET='54321abcde'"
  63. echo -e "\t-Disable the OAuth2 Secret of Wekan:"
  64. echo -e "\t$ snap set $SNAP_NAME OAUTH2_SECRET=''"
  65. echo -e "\n"
  66. echo -e "OAuth2 Server URL, for example Rocket.Chat. Example: https://chat.example.com"
  67. echo -e "To enable the OAuth2 Server URL of Wekan:"
  68. echo -e "\t$ snap set $SNAP_NAME OAUTH2_SERVER_URL='https://chat.example.com'"
  69. echo -e "\t-Disable the OAuth2 Server URL of Wekan:"
  70. echo -e "\t$ snap set $SNAP_NAME OAUTH2_SERVER_URL=''"
  71. echo -e "\n"
  72. echo -e "OAuth2 Server URL, for example Rocket.Chat. Example: https://chat.example.com"
  73. echo -e "To enable the OAuth2 Server URL of Wekan:"
  74. echo -e "\t$ snap set $SNAP_NAME OAUTH2_SERVER_URL='https://chat.example.com'"
  75. echo -e "\t-Disable the OAuth2 Server URL of Wekan:"
  76. echo -e "\t$ snap set $SNAP_NAME OAUTH2_SERVER_URL=''"
  77. echo -e "\n"
  78. echo -e "OAuth2 Authorization Endpoint. Example: /oauth/authorize"
  79. echo -e "To enable the OAuth2 Authorization Endpoint of Wekan:"
  80. echo -e "\t$ snap set $SNAP_NAME OAUTH2_AUTH_ENDPOINT='/oauth/authorize'"
  81. echo -e "\t-Disable the OAuth2 Authorization Endpoint of Wekan:"
  82. echo -e "\t$ snap set $SNAP_NAME OAUTH2_AUTH_ENDPOINT=''"
  83. echo -e "\n"
  84. echo -e "OAuth2 Userinfo Endpoint. Example: /oauth/userinfo"
  85. echo -e "To enable the OAuth2 Userinfo Endpoint of Wekan:"
  86. echo -e "\t$ snap set $SNAP_NAME OAUTH2_USERINFO_ENDPOINT='/oauth/authorize'"
  87. echo -e "\t-Disable the OAuth2 Userinfo Endpoint of Wekan:"
  88. echo -e "\t$ snap set $SNAP_NAME OAUTH2_USERINFO_ENDPOINT=''"
  89. echo -e "\n"
  90. echo -e "OAuth2 Token Endpoint. Example: /oauth/token"
  91. echo -e "To enable the OAuth2 Token Endpoint of Wekan:"
  92. echo -e "\t$ snap set $SNAP_NAME OAUTH2_TOKEN_ENDPOINT='/oauth/token'"
  93. echo -e "\t-Disable the OAuth2 Token Endpoint of Wekan:"
  94. echo -e "\t$ snap set $SNAP_NAME OAUTH2_TOKEN_ENDPOINT=''"
  95. echo -e "\n"
  96. # parse config file for supported settings keys
  97. echo -e "wekan supports settings keys"
  98. echo -e "values can be changed by calling\n$ snap set $SNAP_NAME <key name>='<key value>'"
  99. echo -e "list of supported keys:"
  100. for key in ${keys[@]}
  101. do
  102. default_value="DEFAULT_$key"
  103. description="DESCRIPTION_$key"
  104. snappy_key="KEY_$key"
  105. echo -e "\t${!snappy_key}: ${!description}"
  106. if [ "x" == "x${!key}" ]; then
  107. echo -e "\t\tNo value set, using default value: '${!default_value}'"
  108. else
  109. echo -e "\t\tCurrent value set to: '${!key}', (default value: '${!default_value}')"
  110. fi
  111. done
  112. echo -e "\n!!!! Some changes result in restart of some or all services, use with caution !!!!!"