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.

50 lines
1.5 KiB

8 years ago
  1. #!/bin/sh
  2. # postinst script for basecoin
  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 ethermint.ethermint /etc/ethermint
  19. chown ethermint.ethermint /etc/ethermint/genesis.json
  20. chown ethermint.ethermint /etc/ethermint/keystore
  21. chown ethermint.ethermint /etc/ethermint/keystore/UTC--2016-10-21T22-30-03.071787745Z--7eff122b94897ea5b0e2a9abf47b86337fafebdc
  22. sudo -Hu ethermint /usr/bin/ethermint --datadir /etc/ethermint init /etc/ethermint/genesis.json
  23. sudo -Hu ethermint tendermint init --home /etc/ethermint/tendermint
  24. chown ethermint.ethermint /etc/ethermint/tendermint
  25. chmod 755 /etc/ethermint/tendermint
  26. systemctl daemon-reload
  27. ;;
  28. abort-upgrade|abort-remove|abort-deconfigure)
  29. ;;
  30. *)
  31. echo "postinst called with unknown argument \`$1'" >&2
  32. exit 1
  33. ;;
  34. esac
  35. # dh_installdeb will replace this with shell code automatically
  36. # generated by other debhelper scripts.
  37. #DEBHELPER#
  38. exit 0