github.com/evdatsion/aphelion-dpos-bft@v0.32.1/tools/build/gaia/DEBIAN/postinst (about)

     1  #!/bin/sh
     2  # postinst script for gaia
     3  #
     4  
     5  set -e
     6  
     7  # summary of how this script can be called:
     8  #        * <postinst> `configure' <most-recently-configured-version>
     9  #        * <old-postinst> `abort-upgrade' <new version>
    10  #        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
    11  #          <new-version>
    12  #        * <postinst> `abort-remove'
    13  #        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
    14  #          <failed-install-package> <version> `removing'
    15  #          <conflicting-package> <version>
    16  # for details, see https://www.debian.org/doc/debian-policy/ or
    17  # the debian-policy package
    18  
    19  
    20  case "$1" in
    21      configure)
    22      chown gaia.gaia /etc/gaia
    23      sudo -Hu gaia gaia node init --home /etc/gaia 2B24DEE2364762300168DF19B6C18BCE2D399EA2
    24      systemctl daemon-reload
    25      ;;
    26  
    27      abort-upgrade|abort-remove|abort-deconfigure)
    28      ;;
    29  
    30      *)
    31          echo "postinst called with unknown argument \`$1'" >&2
    32          exit 1
    33      ;;
    34  esac
    35  
    36  # dh_installdeb will replace this with shell code automatically
    37  # generated by other debhelper scripts.
    38  
    39  #DEBHELPER#
    40  
    41  exit 0