wekan-help 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  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 "\n"
  10. echo -e "Debug OIDC OAuth2 etc."
  11. echo -e "To enable the Debug of Wekan:"
  12. echo -e "\t$ snap set $SNAP_NAME debug='true'"
  13. echo -e "\t-Disable the Debug of Wekan:"
  14. echo -e "\t$ snap set $SNAP_NAME debug='false'"
  15. echo -e "\n"
  16. echo -e "Make sure you have connected all interfaces, check more by calling $ snap interfaces ${SNAP_NAME}"
  17. echo -e "\n"
  18. echo -e "${SNAP_NAME} has multiple services, to check status use systemctl"
  19. echo -e "\t$ systemctl status snap.$SNAP_NAME.*"
  20. echo -e "\n"
  21. echo -e "To make backup of wekan's database use: $ ${SNAP_NAME}.database-backup [backup file]"
  22. echo -e "\t backup file is optional parameter, if not passed backup is created in directory:"
  23. echo -e "\t\t${SNAP_COMMON}/db-backups"
  24. echo -e "To list existing backups in default directory: $ ${SNAP_NAME}.database-list-backups"
  25. echo -e "To restore wekan's database use: ${SNAP_NAME}.database-restore <path to backup>"
  26. echo -e "\n"
  27. echo -e "wekan can be configured to share mongodb with other services using content interface"
  28. echo -e "\t-sharing mongodb from $SNAP_NAME to other snap(s):"
  29. echo -e "\t\t-connect mongodb-slot with plug from corresponding snap(s)"
  30. echo -e "\t\t-configure corresponding service to use mongodb unix socket in shared directory, socket file name is: mongodb-$MONGODB_PORT.sock"
  31. echo -e "\t-sharing mongodb from other snap to $SNAP_NAME:"
  32. echo -e "\t\t-connect mongodb-plug with slot from snap providing mongodb"
  33. echo -e "\t\t-disable mongodb in $SNAP_NAME by calling: $ snap set $SNAP_NAME set disable-mongodb='true'"
  34. 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"
  35. echo -e "\n"
  36. echo -e "To enable the API of wekan:"
  37. echo -e "\t$ snap set $SNAP_NAME with-api='true'"
  38. echo -e "\t-Disable the API:"
  39. echo -e "\t$ snap set $SNAP_NAME with-api='false'"
  40. echo -e "\n"
  41. echo -e "To enable the CORS of wekan, to set Access-Control-Allow-Origin header:"
  42. echo -e "\t$ snap set $SNAP_NAME cors='*'"
  43. echo -e "\t-Disable the CORS:"
  44. echo -e "\t$ snap set $SNAP_NAME cors=''"
  45. echo -e "\n"
  46. echo -e "Enable browser policy and allow one trusted URL that can have iframe that has Wekan embedded inside."
  47. echo -e "\t\t Setting this to false is not recommended, it also disables all other browser policy protections"
  48. echo -e "\t\t and allows all iframing etc. See wekan/server/policy.js"
  49. echo -e "To enable the Browser Policy of Wekan:"
  50. echo -e "\t$ snap set $SNAP_NAME browser-policy-enabled='true'"
  51. echo -e "\t-Disable the Browser Policy of Wekan:"
  52. echo -e "\t$ snap set $SNAP_NAME browser-policy-enabled='false'"
  53. echo -e "\n"
  54. echo -e "When browser policy is enabled, HTML code at this URL can have iframe that embeds Wekan inside."
  55. echo -e "To enable the Trusted URL of Wekan:"
  56. echo -e "\t$ snap set $SNAP_NAME trusted-url='https://example.com'"
  57. echo -e "\t-Disable the Trusted URL of Wekan:"
  58. echo -e "\t$ snap set $SNAP_NAME trusted-url=''"
  59. echo -e "\n"
  60. 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 ."
  61. echo -e "To enable the Webhooks Attributes of Wekan:"
  62. echo -e "\t$ snap set $SNAP_NAME webhooks-attributes='cardId,listId,oldListId,boardId,comment,user,card,commentId'"
  63. echo -e "\t-Disable the Webhooks Attributes of Wekan to send all default ones:"
  64. echo -e "\t$ snap set $SNAP_NAME webhooks-attributes=''"
  65. echo -e "\n"
  66. echo -e "OAuth2 Client ID."
  67. echo -e "To enable the OAuth2 Client ID of Wekan:"
  68. echo -e "\t$ snap set $SNAP_NAME oauth2-client-id='54321abcde'"
  69. echo -e "\t-Disable the OAuth2 Client ID of Wekan:"
  70. echo -e "\t$ snap set $SNAP_NAME oauth2-client-id=''"
  71. echo -e "\n"
  72. echo -e "OAuth2 Secret."
  73. echo -e "To enable the OAuth2 Secret of Wekan:"
  74. echo -e "\t$ snap set $SNAP_NAME oauth2-secret='54321abcde'"
  75. echo -e "\t-Disable the OAuth2 Secret of Wekan:"
  76. echo -e "\t$ snap set $SNAP_NAME oauth2-secret=''"
  77. echo -e "\n"
  78. echo -e "OAuth2 Server URL."
  79. echo -e "To enable the OAuth2 Server URL of Wekan:"
  80. echo -e "\t$ snap set $SNAP_NAME oauth2-server-url='https://chat.example.com'"
  81. echo -e "\t-Disable the OAuth2 Server URL of Wekan:"
  82. echo -e "\t$ snap set $SNAP_NAME oauth2-server-url=''"
  83. echo -e "\n"
  84. echo -e "OAuth2 Authorization Endpoint."
  85. echo -e "To enable the OAuth2 Authorization Endpoint of Wekan:"
  86. echo -e "\t$ snap set $SNAP_NAME oauth2-auth-endpoint='/oauth/authorize'"
  87. echo -e "\t-Disable the OAuth2 Authorization Endpoint of Wekan:"
  88. echo -e "\t$ snap set $SNAP_NAME oauth2-auth-endpoint=''"
  89. echo -e "\n"
  90. echo -e "OAuth2 Userinfo Endpoint."
  91. echo -e "To enable the OAuth2 Userinfo Endpoint of Wekan:"
  92. echo -e "\t$ snap set $SNAP_NAME oauth2-userinfo-endpoint='/oauth/authorize'"
  93. echo -e "\t-Disable the OAuth2 Userinfo Endpoint of Wekan:"
  94. echo -e "\t$ snap set $SNAP_NAME oauth2-userinfo-endpoint=''"
  95. echo -e "\n"
  96. echo -e "OAuth2 Token Endpoint."
  97. echo -e "To enable the OAuth2 Token Endpoint of Wekan:"
  98. echo -e "\t$ snap set $SNAP_NAME oauth2-token-endpoint='/oauth/token'"
  99. echo -e "\t-Disable the OAuth2 Token Endpoint of Wekan:"
  100. echo -e "\t$ snap set $SNAP_NAME oauth2-token-endpoint=''"
  101. echo -e "\n"
  102. echo -e "OAuth2 ID Mapping."
  103. echo -e "To enable the OAuth2 ID Mapping of Wekan:"
  104. echo -e "\t$ snap set $SNAP_NAME oauth2-id-map='username.uid'"
  105. echo -e "\t-Disable the OAuth2 ID Mapping of Wekan:"
  106. echo -e "\t$ snap set $SNAP_NAME oauth2-id-map=''"
  107. echo -e "\n"
  108. echo -e "OAuth2 Username Mapping."
  109. echo -e "To enable the OAuth2 Username Mapping of Wekan:"
  110. echo -e "\t$ snap set $SNAP_NAME oauth2-username-map='username'"
  111. echo -e "\t-Disable the OAuth2 Username Mapping of Wekan:"
  112. echo -e "\t$ snap set $SNAP_NAME oauth2-username-map=''"
  113. echo -e "\n"
  114. echo -e "OAuth2 Fullname Mapping."
  115. echo -e "To enable the OAuth2 Fullname Mapping of Wekan:"
  116. echo -e "\t$ snap set $SNAP_NAME oauth2-fullname-map='fullname'"
  117. echo -e "\t-Disable the OAuth2 Fullname Mapping of Wekan:"
  118. echo -e "\t$ snap set $SNAP_NAME oauth2-fullname-map=''"
  119. echo -e "\n"
  120. echo -e "OAuth2 Email Mapping."
  121. echo -e "To enable the OAuth2 Email Mapping of Wekan:"
  122. echo -e "\t$ snap set $SNAP_NAME oauth2-email-map='email'"
  123. echo -e "\t-Disable the OAuth2 Email Mapping of Wekan:"
  124. echo -e "\t$ snap set $SNAP_NAME oauth2-email-map=''"
  125. echo -e "\n"
  126. echo -e "OAuth2 ID Token Whitelist Fields."
  127. echo -e "To enable the OAuth2 ID Token Whitelist Fields of Wekan:"
  128. echo -e "\t$ snap set $SNAP_NAME oauth2-id-token-whitelist-fields='[]'"
  129. echo -e "\t-Disable the OAuth2 ID Token Whitelist Fields of Wekan:"
  130. echo -e "\t$ snap set $SNAP_NAME oauth2-id-token-whitelist-fields=''"
  131. echo -e "\n"
  132. echo -e "OAuth2 Request Permissions."
  133. echo -e "To enable the OAuth2 Request Permissions of Wekan:"
  134. echo -e "\t$ snap set $SNAP_NAME oauth2-request-permissions='[openid profile email]'"
  135. echo -e "\t-Disable the OAuth2 Request Permissions of Wekan:"
  136. echo -e "\t$ snap set $SNAP_NAME oauth2-request-permissions=''"
  137. echo -e "\n"
  138. echo -e "Ldap Enable."
  139. echo -e "To enable the ldap of Wekan:"
  140. echo -e "\t$ snap set $SNAP_NAME ldap-enable='true'"
  141. echo -e "\t-Disable the ldap of Wekan:"
  142. echo -e "\t$ snap set $SNAP_NAME ldap-enable='false'"
  143. echo -e "\n"
  144. echo -e "Ldap Port."
  145. echo -e "The port of the ldap server:"
  146. echo -e "\t$ snap set $SNAP_NAME ldap-port='12345'"
  147. echo -e "\n"
  148. echo -e "Ldap Host."
  149. echo -e "The host server for the LDAP server:"
  150. echo -e "\t$ snap set $SNAP_NAME ldap-host='localhost'"
  151. echo -e "\n"
  152. echo -e "Ldap Base Dn."
  153. echo -e "The base DN for the LDAP Tree:"
  154. echo -e "\t$ snap set $SNAP_NAME ldap-basedn='ou=user,dc=example,dc=org'"
  155. echo -e "\n"
  156. echo -e "Ldap Login Fallback."
  157. echo -e "Fallback on the default authentication method:"
  158. echo -e "\t$ snap set $SNAP_NAME ldap-login-fallback='true'"
  159. echo -e "\n"
  160. echo -e "Ldap Reconnect."
  161. echo -e "Reconnect to the server if the connection is lost:"
  162. echo -e "\t$ snap set $SNAP_NAME ldap-reconnect='false'"
  163. echo -e "\n"
  164. echo -e "Ldap Timeout."
  165. echo -e "Overall timeout, in milliseconds:"
  166. echo -e "\t$ snap set $SNAP_NAME ldap-timeout='12345'"
  167. echo -e "\n"
  168. echo -e "Ldap Idle Timeout."
  169. echo -e "Specifies the timeout for idle LDAP connections in milliseconds:"
  170. echo -e "\t$ snap set $SNAP_NAME ldap-idle-timeout='12345'"
  171. echo -e "\n"
  172. echo -e "Ldap Connect Timeout."
  173. echo -e "Connection timeout, in milliseconds:"
  174. echo -e "\t$ snap set $SNAP_NAME ldap-connect-timeout='12345'"
  175. echo -e "\n"
  176. echo -e "Ldap Authentication."
  177. echo -e "If the LDAP needs a user account to search:"
  178. echo -e "\t$ snap set $SNAP_NAME ldap-authentication='true'"
  179. echo -e "\n"
  180. echo -e "Ldap Authentication User Dn."
  181. echo -e "The search user Dn:"
  182. echo -e "\t$ snap set $SNAP_NAME ldap-authentication-userdn='cn=admin,dc=example,dc=org'"
  183. echo -e "\n"
  184. echo -e "Ldap Authentication Password."
  185. echo -e "The password for the search user:"
  186. echo -e "\t$ snap set $SNAP_NAME ldap-authentication-password='admin'"
  187. echo -e "\n"
  188. echo -e "Ldap Log Enabled."
  189. echo -e "Enable logs for the module:"
  190. echo -e "\t$ snap set $SNAP_NAME ldap-log-enabled='true'"
  191. echo -e "\n"
  192. echo -e "Ldap Background Sync."
  193. echo -e "If the sync of the users should be done in the background:"
  194. echo -e "\t$ snap set $SNAP_NAME ldap-background-sync='true'"
  195. echo -e "\n"
  196. echo -e "Ldap Background Sync Interval."
  197. echo -e "At which interval does the background task sync in milliseconds:"
  198. echo -e "\t$ snap set $SNAP_NAME ldap-background-sync-interval='12345'"
  199. echo -e "\n"
  200. echo -e "Ldap Background Sync Keep Existant Users Updated."
  201. echo -e "\t$ snap set $SNAP_NAME ldap-background-sync-keep-existant-users-updated='true'"
  202. echo -e "\n"
  203. echo -e "Ldap Background Sync Import New Users."
  204. echo -e "\t$ snap set $SNAP_NAME ldap-background-sync-import-new-users='true'"
  205. echo -e "\n"
  206. echo -e "Ldap Encryption."
  207. echo -e "Allow LDAPS:"
  208. echo -e "\t$ snap set $SNAP_NAME ldap-encryption='ssl'"
  209. echo -e "\n"
  210. echo -e "Ldap Ca Cert."
  211. echo -e "The certification for the LDAPS server:"
  212. echo -e "\t$ snap set $SNAP_NAME ldap-ca-cert=-----BEGIN CERTIFICATE-----MIIE+zCCA+OgAwIBAgIkAhwR/6TVLmdRY6hHxvUFWc0+Enmu/Hu6cj+G2FIdAgIC...-----END CERTIFICATE-----"
  213. echo -e "\n"
  214. echo -e "Ldap Reject Unauthorized."
  215. echo -e "Reject Unauthorized Certificate:"
  216. echo -e "\t$ snap set $SNAP_NAME ldap-reject-unauthorized='true'"
  217. echo -e "\n"
  218. echo -e "Ldap User Search Filter."
  219. echo -e "Optional extra LDAP filters. Don't forget the outmost enclosing parentheses if needed:"
  220. echo -e "\t$ snap set $SNAP_NAME ldap-user-search-filter=''"
  221. echo -e "\n"
  222. echo -e "Ldap User Search Scope."
  223. 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"
  224. echo -e "\t$ snap set $SNAP_NAME ldap-user-search-scope=one"
  225. echo -e "\n"
  226. echo -e "Ldap User Search Field."
  227. echo -e "Which field is used to find the user:"
  228. echo -e "\t$ snap set $SNAP_NAME ldap-user-search-field='uid'"
  229. echo -e "\n"
  230. echo -e "Ldap Search Page Size."
  231. echo -e "Used for pagination (0=unlimited):"
  232. echo -e "\t$ snap set $SNAP_NAME ldap-search-page-size='12345'"
  233. echo -e "\n"
  234. echo -e "Ldap Search Size Limit."
  235. echo -e "The limit number of entries (0=unlimited):"
  236. echo -e "\t$ snap set $SNAP_NAME ldap-search-size-limit='12345'"
  237. echo -e "\n"
  238. echo -e "Ldap Group Filter Enable."
  239. echo -e "Enable group filtering:"
  240. echo -e "\t$ snap set $SNAP_NAME ldap-group-filter-enable='true'"
  241. echo -e "\n"
  242. echo -e "Ldap Group Filter ObjectClass."
  243. echo -e "The object class for filtering:"
  244. echo -e "\t$ snap set $SNAP_NAME ldap-group-filter-objectclass='group'"
  245. echo -e "\n"
  246. echo -e "Ldap Group Filter Id Attribute."
  247. echo -e "\t$ snap set $SNAP_NAME ldap-group-filter-group-id-attribute=''"
  248. echo -e "\n"
  249. echo -e "Ldap Group Filter Member Attribute."
  250. echo -e "\t$ snap set $SNAP_NAME ldap-group-filter-group-member-attribute=''"
  251. echo -e "\n"
  252. echo -e "Ldap Group Filter Member Format."
  253. echo -e "\t$ snap set $SNAP_NAME ldap-group-filter-group-member-format=''"
  254. echo -e "\n"
  255. echo -e "Ldap Group Filter Group Name."
  256. echo -e "\t$ snap set $SNAP_NAME ldap-group-filter-group-name=''"
  257. echo -e "\n"
  258. echo -e "Ldap Unique Identifier Field."
  259. echo -e "This field is sometimes class GUID (Globally Unique Identifier):"
  260. echo -e "\t$ snap set $SNAP_NAME ldap-unique-identifier-field=guid"
  261. echo -e "\n"
  262. echo -e "Ldap Utf8 Names Slugify."
  263. echo -e "Convert the username to utf8:"
  264. echo -e "\t$ snap set $SNAP_NAME ldap-utf8-names-slugify='false'"
  265. echo -e "\n"
  266. echo -e "Ldap Username Field."
  267. echo -e "Which field contains the ldap username:"
  268. echo -e "\t$ snap set $SNAP_NAME ldap-username-field='username'"
  269. echo -e "\n"
  270. echo -e "Ldap Fullname Field."
  271. echo -e "Which field contains the ldap fullname:"
  272. echo -e "\t$ snap set $SNAP_NAME ldap-fullname-field='fullname'"
  273. echo -e "\n"
  274. echo -e "Ldap Merge Existing Users."
  275. echo -e "\t$ snap set $SNAP_NAME ldap-merge-existing-users='true'"
  276. echo -e "\n"
  277. echo -e "Ldap Sync User Data."
  278. echo -e "Enable synchronization of user data:"
  279. echo -e "\t$ snap set $SNAP_NAME ldap-sync-user-data='true'"
  280. echo -e "\n"
  281. echo -e "Ldap Sync User Data Fieldmap."
  282. echo -e "A field map for the matching:"
  283. echo -e "\t$ snap set $SNAP_NAME ldap-sync-user-data-fieldmap={\"cn\":\"name\", \"mail\":\"email\"}"
  284. echo -e "\n"
  285. echo -e "Ldap Sync Group Roles."
  286. echo -e "\t$ snap set $SNAP_NAME ldap-sync-group-roles=''"
  287. echo -e "\n"
  288. echo -e "Ldap Default Domain."
  289. 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:"
  290. echo -e "\t$ snap set $SNAP_NAME ldap-default-domain=''"
  291. echo -e "\n"
  292. # echo -e "Logout with timer."
  293. # echo -e "Enable or not the option that allows to disconnect an user after a given time:"
  294. # echo -e "\t$ snap set $SNAP_NAME logout-with-timer='true'"
  295. # echo -e "\n"
  296. # echo -e "Logout in."
  297. # echo -e "Logout in how many days:"
  298. # echo -e "\t$ snap set $SNAP_NAME logout-in='1'"
  299. # echo -e "\n"
  300. # echo -e "Logout on hours."
  301. # echo -e "Logout in how many hours:"
  302. # echo -e "\t$ snap set $SNAP_NAME logout-on-hours='9'"
  303. # echo -e "\n"
  304. # echo -e "Logout on minutes."
  305. # echo -e "Logout in how many minutes:"
  306. # echo -e "\t$ snap set $SNAP_NAME logout-on-minutes='5'"
  307. # echo -e "\n"
  308. echo -e "Default authentication method."
  309. echo -e "The default authentication method used if a user does not exist to create and authenticate. Method can be password or ldap."
  310. echo -e "\t$ snap set $SNAP_NAME default-authentication-method='ldap'"
  311. echo -e "\n"
  312. # parse config file for supported settings keys
  313. echo -e "wekan supports settings keys"
  314. echo -e "values can be changed by calling\n$ snap set $SNAP_NAME <key name>='<key value>'"
  315. echo -e "list of supported keys:"
  316. for key in ${keys[@]}
  317. do
  318. default_value="DEFAULT_$key"
  319. description="DESCRIPTION_$key"
  320. snappy_key="KEY_$key"
  321. echo -e "\t${!snappy_key}: ${!description}"
  322. if [ "x" == "x${!key}" ]; then
  323. echo -e "\t\tNo value set, using default value: '${!default_value}'"
  324. else
  325. echo -e "\t\tCurrent value set to: '${!key}', (default value: '${!default_value}')"
  326. fi
  327. done
  328. echo -e "\n!!!! Some changes result in restart of some or all services, use with caution !!!!!"