wekan-help 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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"
  10. echo -e "\n"
  11. echo -e "${SNAP_NAME} has multiple services, to check status/restart/stop use systemctl"
  12. echo -e "mongodb service:"
  13. echo -e "\t$ sudo systemctl status/start/stop/restart snap.$SNAP_NAME.mongodb"
  14. echo -e "wekan service"
  15. echo -e "\t$ sudo systemctl status/start/stop/restart snap.$SNAP_NAME.wekan"
  16. echo -e "Optional caddy service"
  17. echo -e "\t$ sudo systemctl status/start/stop/restart snap.$SNAP_NAME.caddy"
  18. echo -e "\n"
  19. echo -e "To make backup of wekan's database use: $ ${SNAP_NAME}.database-backup [backup file]"
  20. echo -e "\t backup file is optional parameter, if not passed backup is created in directory:"
  21. echo -e "\t\t${SNAP_COMMON}/db-backups"
  22. echo -e "To list existing backups in default directory: $ ${SNAP_NAME}.database-list-backups"
  23. echo -e "To restore wekan's database use: ${SNAP_NAME}.database-restore <path to backup>"
  24. echo -e "\n"
  25. echo -e "wekan can be configured to share mongodb with other services using content interface"
  26. echo -e "\t-sharing mongodb from $SNAP_NAME to other snap(s):"
  27. echo -e "\t\t-connect mongodb-slot with plug from corresponding snap(s)"
  28. echo -e "\t\t-configure corresponding service to use mongodb unix socket in shared directory, socket file name is: mongodb-$MONGODB_PORT.sock"
  29. echo -e "\t-sharing mongodb from other snap to $SNAP_NAME:"
  30. echo -e "\t\t-connect mongodb-plug with slot from snap providing mongodb"
  31. echo -e "\t\t-disable mongodb in $SNAP_NAME by calling: $ snap set $SNAP_NAME set disable-mongodb='true'"
  32. 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"
  33. echo -e "\n"
  34. # parse config file for supported settings keys
  35. echo -e "wekan supports settings keys"
  36. echo -e "values can be changed by calling\n$ snap set $SNAP_NAME <key name>='<key value>'"
  37. echo -e "list of supported keys:"
  38. for key in ${keys[@]}
  39. do
  40. default_value="DEFAULT_$key"
  41. description="DESCRIPTION_$key"
  42. snappy_key="KEY_$key"
  43. echo -e "\t${!snappy_key}: ${!description}"
  44. if [ "x" == "x${!key}" ]; then
  45. echo -e "\t\tNo value set, using default value: '${!default_value}'"
  46. else
  47. echo -e "\t\tCurrent value set to: '${!key}', (default value: '${!default_value}')"
  48. fi
  49. done
  50. echo -e "\n!!!! Some changes result in restart of some or all services, use with caution !!!!!"