wekan-help 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300
  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 "To enable the CORS of wekan, to set Access-Control-Allow-Origin header:"
  35. echo -e "\t$ snap set $SNAP_NAME CORS='*'"
  36. echo -e "\t-Disable the CORS:"
  37. echo -e "\t$ snap set $SNAP_NAME CORS=''"
  38. echo -e "\n"
  39. echo -e "Enable browser policy and allow one trusted URL that can have iframe that has Wekan embedded inside."
  40. echo -e "\t\t Setting this to false is not recommended, it also disables all other browser policy protections"
  41. echo -e "\t\t and allows all iframing etc. See wekan/server/policy.js"
  42. echo -e "To enable the Content Policy of Wekan:"
  43. echo -e "\t$ snap set $SNAP_NAME CONTENT_POLICY_ENABLED='true'"
  44. echo -e "\t-Disable the Content Policy of Wekan:"
  45. echo -e "\t$ snap set $SNAP_NAME CONTENT_POLICY_ENABLED='false'"
  46. echo -e "\n"
  47. echo -e "When browser policy is enabled, HTML code at this URL can have iframe that embeds Wekan inside."
  48. echo -e "To enable the Trusted URL of Wekan:"
  49. echo -e "\t$ snap set $SNAP_NAME TRUSTED_URL='https://example.com'"
  50. echo -e "\t-Disable the Trusted URL of Wekan:"
  51. echo -e "\t$ snap set $SNAP_NAME TRUSTED_URL=''"
  52. echo -e "\n"
  53. 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 ."
  54. echo -e "To enable the Webhooks Attributes of Wekan:"
  55. echo -e "\t$ snap set $SNAP_NAME WEBHOOKS_ATTRIBUTES='cardId,listId,oldListId,boardId,comment,user,card,commentId'"
  56. echo -e "\t-Disable the Webhooks Attributes of Wekan to send all default ones:"
  57. echo -e "\t$ snap set $SNAP_NAME WEBHOOKS_ATTRIBUTES=''"
  58. echo -e "\n"
  59. echo -e "OAuth2 Client ID, for example from Rocket.Chat. Example: abcde12345"
  60. echo -e "To enable the OAuth2 Client ID of Wekan:"
  61. echo -e "\t$ snap set $SNAP_NAME OAUTH2_CLIENT_ID='54321abcde'"
  62. echo -e "\t-Disable the OAuth2 Client ID of Wekan:"
  63. echo -e "\t$ snap set $SNAP_NAME OAUTH2_CLIENT_ID=''"
  64. echo -e "\n"
  65. echo -e "OAuth2 Secret, for example from Rocket.Chat. Example: 54321abcde"
  66. echo -e "To enable the OAuth2 Secret of Wekan:"
  67. echo -e "\t$ snap set $SNAP_NAME OAUTH2_SECRET='54321abcde'"
  68. echo -e "\t-Disable the OAuth2 Secret of Wekan:"
  69. echo -e "\t$ snap set $SNAP_NAME OAUTH2_SECRET=''"
  70. echo -e "\n"
  71. echo -e "OAuth2 Server URL, for example Rocket.Chat. Example: https://chat.example.com"
  72. echo -e "To enable the OAuth2 Server URL of Wekan:"
  73. echo -e "\t$ snap set $SNAP_NAME OAUTH2_SERVER_URL='https://chat.example.com'"
  74. echo -e "\t-Disable the OAuth2 Server URL of Wekan:"
  75. echo -e "\t$ snap set $SNAP_NAME OAUTH2_SERVER_URL=''"
  76. echo -e "\n"
  77. echo -e "OAuth2 Server URL, for example Rocket.Chat. Example: https://chat.example.com"
  78. echo -e "To enable the OAuth2 Server URL of Wekan:"
  79. echo -e "\t$ snap set $SNAP_NAME OAUTH2_SERVER_URL='https://chat.example.com'"
  80. echo -e "\t-Disable the OAuth2 Server URL of Wekan:"
  81. echo -e "\t$ snap set $SNAP_NAME OAUTH2_SERVER_URL=''"
  82. echo -e "\n"
  83. echo -e "OAuth2 Authorization Endpoint. Example: /oauth/authorize"
  84. echo -e "To enable the OAuth2 Authorization Endpoint of Wekan:"
  85. echo -e "\t$ snap set $SNAP_NAME OAUTH2_AUTH_ENDPOINT='/oauth/authorize'"
  86. echo -e "\t-Disable the OAuth2 Authorization Endpoint of Wekan:"
  87. echo -e "\t$ snap set $SNAP_NAME OAUTH2_AUTH_ENDPOINT=''"
  88. echo -e "\n"
  89. echo -e "OAuth2 Userinfo Endpoint. Example: /oauth/userinfo"
  90. echo -e "To enable the OAuth2 Userinfo Endpoint of Wekan:"
  91. echo -e "\t$ snap set $SNAP_NAME OAUTH2_USERINFO_ENDPOINT='/oauth/authorize'"
  92. echo -e "\t-Disable the OAuth2 Userinfo Endpoint of Wekan:"
  93. echo -e "\t$ snap set $SNAP_NAME OAUTH2_USERINFO_ENDPOINT=''"
  94. echo -e "\n"
  95. echo -e "OAuth2 Token Endpoint. Example: /oauth/token"
  96. echo -e "To enable the OAuth2 Token Endpoint of Wekan:"
  97. echo -e "\t$ snap set $SNAP_NAME OAUTH2_TOKEN_ENDPOINT='/oauth/token'"
  98. echo -e "\t-Disable the OAuth2 Token Endpoint of Wekan:"
  99. echo -e "\t$ snap set $SNAP_NAME OAUTH2_TOKEN_ENDPOINT=''"
  100. echo -e "\n"
  101. echo -e "Debug OIDC OAuth2 etc."
  102. echo -e "To enable the Debug of Wekan:"
  103. echo -e "\t$ snap set $SNAP_NAME DEBUG='true'"
  104. echo -e "\t-Disable the Debug of Wekan:"
  105. echo -e "\t$ snap set $SNAP_NAME DEBUG='false'"
  106. echo -e "\n"
  107. echo -e "Ldap Enable."
  108. echo -e "To enable the ldap of Wekan:"
  109. echo -e "\t$ snap set $SNAP_NAME LDAP_ENABLE='true'"
  110. echo -e "\t-Disable the ldap of Wekan:"
  111. echo -e "\t$ snap set $SNAP_NAME LDAP_ENABLE='false'"
  112. echo -e "\n"
  113. echo -e "Ldap Port."
  114. echo -e "The port of the ldap server:"
  115. echo -e "\t$ snap set $SNAP_NAME LDAP_PORT='12345'"
  116. echo -e "\n"
  117. echo -e "Ldap Host."
  118. echo -e "The host server for the LDAP server:"
  119. echo -e "\t$ snap set $SNAP_NAME LDAP_HOST='localhost'"
  120. echo -e "\n"
  121. echo -e "Ldap Base Dn."
  122. echo -e "The base DN for the LDAP Tree:"
  123. echo -e "\t$ snap set $SNAP_NAME LDAP_BASEDN='ou=user,dc=example,dc=org'"
  124. echo -e "\n"
  125. echo -e "Ldap Login Fallback."
  126. echo -e "Fallback on the default authentication method:"
  127. echo -e "\t$ snap set $SNAP_NAME LDAP_LOGIN_FALLBACK='true'"
  128. echo -e "\n"
  129. echo -e "Ldap Reconnect."
  130. echo -e "Reconnect to the server if the connection is lost:"
  131. echo -e "\t$ snap set $SNAP_NAME LDAP_RECONNECT='false'"
  132. echo -e "\n"
  133. echo -e "Ldap Timeout."
  134. echo -e "Overall timeout, in milliseconds:"
  135. echo -e "\t$ snap set $SNAP_NAME LDAP_TIMEOUT='12345'"
  136. echo -e "\n"
  137. echo -e "Ldap Idle Timeout."
  138. echo -e "Specifies the timeout for idle LDAP connections in milliseconds:"
  139. echo -e "\t$ snap set $SNAP_NAME LDAP_IDLE_TIMEOUT='12345'"
  140. echo -e "\n"
  141. echo -e "Ldap Connect Timeout."
  142. echo -e "Connection timeout, in milliseconds:"
  143. echo -e "\t$ snap set $SNAP_NAME LDAP_CONNECT_TIMEOUT='12345'"
  144. echo -e "\n"
  145. echo -e "Ldap Authentication."
  146. echo -e "If the LDAP needs a user account to search:"
  147. echo -e "\t$ snap set $SNAP_NAME LDAP_AUTHENTIFICATION='true'"
  148. echo -e "\n"
  149. echo -e "Ldap Authentication User Dn."
  150. echo -e "The search user Dn:"
  151. echo -e "\t$ snap set $SNAP_NAME LDAP_AUTHENTIFICATION_USERDN='cn=admin,dc=example,dc=org'"
  152. echo -e "\n"
  153. echo -e "Ldap Authentication Password."
  154. echo -e "The password for the search user:"
  155. echo -e "\t$ snap set $SNAP_NAME AUTHENTIFICATION_PASSWORD='admin'"
  156. echo -e "\n"
  157. echo -e "Ldap Log Enabled."
  158. echo -e "Enable logs for the module:"
  159. echo -e "\t$ snap set $SNAP_NAME LDAP_LOG_ENABLED='true'"
  160. echo -e "\n"
  161. echo -e "Ldap Background Sync."
  162. echo -e "If the sync of the users should be done in the background:"
  163. echo -e "\t$ snap set $SNAP_NAME LDAP_BACKGROUND_SYNC='true'"
  164. echo -e "\n"
  165. echo -e "Ldap Background Sync Interval."
  166. echo -e "At which interval does the background task sync in milliseconds:"
  167. echo -e "\t$ snap set $SNAP_NAME LDAP_BACKGROUND_SYNC_INTERVAL='12345'"
  168. echo -e "\n"
  169. echo -e "Ldap Background Sync Keep Existant Users Updated."
  170. echo -e "\t$ snap set $SNAP_NAME LDAP_BACKGROUND_SYNC_KEEP_EXISTANT_USERS_UPDATED='true'"
  171. echo -e "\n"
  172. echo -e "Ldap Background Sync Import New Users."
  173. echo -e "\t$ snap set $SNAP_NAME LDAP_BACKGROUND_SYNC_IMPORT_NEW_USERS='true'"
  174. echo -e "\n"
  175. echo -e "Ldap Encryption."
  176. echo -e "Allow LDAPS:"
  177. echo -e "\t$ snap set $SNAP_NAME LDAP_ENCRYPTION='ssl'"
  178. echo -e "\n"
  179. echo -e "Ldap Ca Cert."
  180. echo -e "The certification for the LDAPS server:"
  181. echo -e "\t$ snap set $SNAP_NAME LDAP_CA_CERT=-----BEGIN CERTIFICATE-----MIIE+zCCA+OgAwIBAgIkAhwR/6TVLmdRY6hHxvUFWc0+Enmu/Hu6cj+G2FIdAgIC...-----END CERTIFICATE-----"
  182. echo -e "\n"
  183. echo -e "Ldap Reject Unauthorized."
  184. echo -e "Reject Unauthorized Certificate:"
  185. echo -e "\t$ snap set $SNAP_NAME LDAP_REJECT_UNAUTHORIZED='true'"
  186. echo -e "\n"
  187. echo -e "Ldap User Search Filter."
  188. echo -e "Optional extra LDAP filters. Don't forget the outmost enclosing parentheses if needed:"
  189. echo -e "\t$ snap set $SNAP_NAME LDAP_USER_SEARCH_FILTER=''"
  190. echo -e "\n"
  191. echo -e "Ldap User Search Scope."
  192. echo -e "base (search only in the provided DN), one (search only in the provided DN and one level deep), or sub (search the whole subtree). Example: one"
  193. echo -e "\t$ snap set $SNAP_NAME LDAP_USER_SEARCH_SCOPE=one"
  194. echo -e "\n"
  195. echo -e "Ldap User Search Field."
  196. echo -e "Which field is used to find the user:"
  197. echo -e "\t$ snap set $SNAP_NAME LDAP_USER_SEARCH_FIELD='uid'"
  198. echo -e "\n"
  199. echo -e "Ldap Search Page Size."
  200. echo -e "Used for pagination (0=unlimited):"
  201. echo -e "\t$ snap set $SNAP_NAME LDAP_SEARCH_PAGE_SIZE='12345'"
  202. echo -e "\n"
  203. echo -e "Ldap Search Size Limit."
  204. echo -e "The limit number of entries (0=unlimited):"
  205. echo -e "\t$ snap set $SNAP_NAME LDAP_SEARCH_SIZE_LIMIT='12345'"
  206. echo -e "\n"
  207. echo -e "Ldap Group Filter Enable."
  208. echo -e "Enable group filtering:"
  209. echo -e "\t$ snap set $SNAP_NAME LDAP_GROUP_FILTER_ENABLE='true'"
  210. echo -e "\n"
  211. echo -e "Ldap Group Filter ObjectClass."
  212. echo -e "The object class for filtering:"
  213. echo -e "\t$ snap set $SNAP_NAME LDAP_GROUP_FILTER_OBJECTCLASS='group'"
  214. echo -e "\n"
  215. echo -e "Ldap Group Filter Id Attribute."
  216. echo -e "\t$ snap set $SNAP_NAME LDAP_GROUP_FILTER_GROUP_ID_ATTRIBUTE=''"
  217. echo -e "\n"
  218. echo -e "Ldap Group Filter Member Attribute."
  219. echo -e "\t$ snap set $SNAP_NAME LDAP_GROUP_FILTER_GROUP_MEMBER_ATTRIBUTE=''"
  220. echo -e "\n"
  221. echo -e "Ldap Group Filter Member Format."
  222. echo -e "\t$ snap set $SNAP_NAME LDAP_GROUP_FILTER_GROUP_MEMBER_FORMAT=''"
  223. echo -e "\n"
  224. echo -e "Ldap Group Filter Group Name."
  225. echo -e "\t$ snap set $SNAP_NAME LDAP_GROUP_FILTER_GROUP_NAME=''"
  226. echo -e "\n"
  227. echo -e "Ldap Unique Identifier Field."
  228. echo -e "This field is sometimes class GUID (Globally Unique Identifier):"
  229. echo -e "\t$ snap set $SNAP_NAME LDAP_UNIQUE_IDENTIFIER_FIELD=guid"
  230. echo -e "\n"
  231. echo -e "Ldap Utf8 Names Slugify."
  232. echo -e "Convert the username to utf8:"
  233. echo -e "\t$ snap set $SNAP_NAME LDAP_UTF8_NAMES_SLUGIFY='false'"
  234. echo -e "\n"
  235. echo -e "Ldap Username Field."
  236. echo -e "Which field contains the ldap username:"
  237. echo -e "\t$ snap set $SNAP_NAME LDAP_USERNAME_FIELD='username'"
  238. echo -e "\n"
  239. echo -e "Ldap Fullname Field."
  240. echo -e "Which field contains the ldap fullname:"
  241. echo -e "\t$ snap set $SNAP_NAME LDAP_FULLNAME_FIELD='fullname'"
  242. echo -e "\n"
  243. echo -e "Ldap Merge Existing Users."
  244. echo -e "\t$ snap set $SNAP_NAME LDAP_MERGE_EXISTING_USERS='true'"
  245. echo -e "\n"
  246. echo -e "Ldap Sync User Data."
  247. echo -e "Enable synchronization of user data:"
  248. echo -e "\t$ snap set $SNAP_NAME LDAP_SYNC_USER_DATA='true'"
  249. echo -e "\n"
  250. echo -e "Ldap Sync User Data Fieldmap."
  251. echo -e "A field map for the matching:"
  252. echo -e "\t$ snap set $SNAP_NAME LDAP_SYNC_USER_DATA_FIELDMAP={\"cn\":\"name\", \"mail\":\"email\"}"
  253. echo -e "\n"
  254. echo -e "Ldap Sync Group Roles."
  255. echo -e "\t$ snap set $SNAP_NAME LDAP_SYNC_GROUP_ROLES=''"
  256. echo -e "\n"
  257. echo -e "Ldap Default Domain."
  258. echo -e "The default domain of the ldap it is used to create email if the field is not map correctly with the LDAP_SYNC_USER_DATA_FIELDMAP:"
  259. echo -e "\t$ snap set $SNAP_NAME LDAP_DEFAULT_DOMAIN=''"
  260. echo -e "\n"
  261. # echo -e "Logout with timer."
  262. # echo -e "Enable or not the option that allows to disconnect an user after a given time:"
  263. # echo -e "\t$ snap set $SNAP_NAME LOGOUT_WITH_TIMER='true'"
  264. # echo -e "\n"
  265. # echo -e "Logout in."
  266. # echo -e "Logout in how many days:"
  267. # echo -e "\t$ snap set $SNAP_NAME LOGOUT_IN='1'"
  268. # echo -e "\n"
  269. # echo -e "Logout on hours."
  270. # echo -e "Logout in how many hours:"
  271. # echo -e "\t$ snap set $SNAP_NAME LOGOUT_ON_HOURS='9'"
  272. # echo -e "\n"
  273. # echo -e "Logout on minutes."
  274. # echo -e "Logout in how many minutes:"
  275. # echo -e "\t$ snap set $SNAP_NAME LOGOUT_ON_MINUTES='5'"
  276. # echo -e "\n"
  277. echo -e "Default authentication method."
  278. echo -e "The default authentication method used if a user does not exist to create and authenticate. Method can be password or ldap."
  279. echo -e "\t$ snap set $SNAP_NAME DEFAULT_AUTHENTICATION_METHOD='ldap'"
  280. echo -e "\n"
  281. # parse config file for supported settings keys
  282. echo -e "wekan supports settings keys"
  283. echo -e "values can be changed by calling\n$ snap set $SNAP_NAME <key name>='<key value>'"
  284. echo -e "list of supported keys:"
  285. for key in ${keys[@]}
  286. do
  287. default_value="DEFAULT_$key"
  288. description="DESCRIPTION_$key"
  289. snappy_key="KEY_$key"
  290. echo -e "\t${!snappy_key}: ${!description}"
  291. if [ "x" == "x${!key}" ]; then
  292. echo -e "\t\tNo value set, using default value: '${!default_value}'"
  293. else
  294. echo -e "\t\tCurrent value set to: '${!key}', (default value: '${!default_value}')"
  295. fi
  296. done
  297. echo -e "\n!!!! Some changes result in restart of some or all services, use with caution !!!!!"