You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.6 KiB

7 years ago
  1. #!/bin/sh
  2. # postinst script for trackomatron
  3. #
  4. set -e
  5. # summary of how this script can be called:
  6. # * <postinst> `configure' <most-recently-configured-version>
  7. # * <old-postinst> `abort-upgrade' <new version>
  8. # * <conflictor's-postinst> `abort-remove' `in-favour' <package>
  9. # <new-version>
  10. # * <postinst> `abort-remove'
  11. # * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
  12. # <failed-install-package> <version> `removing'
  13. # <conflicting-package> <version>
  14. # for details, see https://www.debian.org/doc/debian-policy/ or
  15. # the debian-policy package
  16. case "$1" in
  17. configure)
  18. chown trackomatron.trackomatron /etc/trackomatron
  19. sudo -Hu trackomatron tracko init --home /etc/trackomatron 2B24DEE2364762300168DF19B6C18BCE2D399EA2
  20. #The above command generates a genesis.json file that contains validators. This is wrong, the validator part should be empty. https://github.com/tendermint/basecoin/issues/124
  21. sudo -Hu trackomatron tendermint init --home /etc/trackomatron/tendermint
  22. #The above command might need some kind of additional option in the future. https://github.com/tendermint/tendermint/issues/542
  23. chown trackomatron.trackomatron /etc/trackomatron/tendermint
  24. chmod 755 /etc/trackomatron/tendermint
  25. systemctl daemon-reload
  26. ;;
  27. abort-upgrade|abort-remove|abort-deconfigure)
  28. ;;
  29. *)
  30. echo "postinst called with unknown argument \`$1'" >&2
  31. exit 1
  32. ;;
  33. esac
  34. # dh_installdeb will replace this with shell code automatically
  35. # generated by other debhelper scripts.
  36. #DEBHELPER#
  37. exit 0