wekan-help 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #!/bin/bash
  2. source $SNAP/bin/config &>/dev/null
  3. echo -e "Wekan: The open-source Trello-like kanban.\n"
  4. echo -e "Make sure you have connected all interfaces, check more by calling $ snap interfaces"
  5. echo -e "\n"
  6. echo -e "${SNAP_NAME} has two services, to check status/restart/stop use systemd commands"
  7. echo -e "mongodb service:"
  8. echo -e "\t$ sudo systemctl status/start/stop/restart snap.$SNAP_NAME.mongodb"
  9. echo -e "wekan service"
  10. echo -e "\t$ sudo systemctl status/start/stop/restart snap.$SNAP_NAME.wekan"
  11. echo -e "\n"
  12. echo -e "To make backup of wekan's database use: $ ${SNAP_NAME}.database-backup [backup file]"
  13. echo -e "\t backup file is optional parameter, if not passed backup is created in directory:"
  14. echo -e "\t\t${SNAP_COMMON}/db-backups"
  15. echo -e "To list existing backups in default directory: $ ${SNAP_NAME}.database-list-backups"
  16. echo -e "To restore wekan's database use: ${SNAP_NAME}.database-restore <path to backup>"
  17. echo -e "\n"
  18. echo -e "wekan can be configured to share mongodb with other services using content interface"
  19. echo -e "\t-sharing mongodb from $SNAP_NAME to other snap(s):"
  20. echo -e "\t\t-connect mongodb-slot with plug from corresponding snap(s)"
  21. echo -e "\t\t-configure corresponding service to use mongodb unix socket in shared directory, socket file name is: mongodb-$MONGODB_PORT.sock"
  22. echo -e "\t-sharing mongodb from other snap to $SNAP_NAME:"
  23. echo -e "\t\t-connect mongodb-plug with slot from snap providing mongodb"
  24. echo -e "\t\t-disable mongodb in $SNAP_NAME by calling: $ snap set $SNAP_NAME set disable-mongodb='true'"
  25. 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"
  26. echo -e "\n"
  27. # parse config file for supported settings keys
  28. echo -e "wekan supports settings keys"
  29. echo -e "values can be changed by calling\n$ snap set $SNAP_NAME <key name>='<key value>'"
  30. echo -e "list of supported keys:"
  31. for key in ${keys[@]}
  32. do
  33. default_value="DEFAULT_$key"
  34. description="DESCRIPTION_$key"
  35. snappy_key="KEY_$key"
  36. echo -e "\t${!snappy_key}: ${!description}"
  37. if [ "x" == "x${!key}" ]; then
  38. echo -e "\t\tNo value set, using default value: '${!default_value}'"
  39. else
  40. echo -e "\t\tCurrent value set to: '${!key}', (default value: '${!default_value}')"
  41. fi
  42. done
  43. echo -e "\nFor changes to take effect restart wekan service,"
  44. echo -e "if mongodb key was change also restart mongodb service, before restarting wekan"
  45. echo -e "to restart mongodb: $ sudo systemctl restart snap.$SNAP_NAME.mongodb"
  46. echo -e "to restart wekan: $ sudo systemctl restart snap.$SNAP_NAME.wekan"