github.com/evdatsion/aphelion-dpos-bft@v0.32.1/tools/build/gaia/DEBIAN/preinst (about) 1 #!/bin/sh 2 # preinst script for gaia 3 # 4 5 set -e 6 7 # summary of how this script can be called: 8 # * <new-preinst> `install' 9 # * <new-preinst> `install' <old-version> 10 # * <new-preinst> `upgrade' <old-version> 11 # * <old-preinst> `abort-upgrade' <new-version> 12 # for details, see https://www.debian.org/doc/debian-policy/ or 13 # the debian-policy package 14 15 16 case "$1" in 17 install|upgrade) 18 if ! grep -q '^gaia:' /etc/passwd ; then 19 useradd -k /dev/null -r -m -b /etc gaia 20 chmod 755 /etc/gaia 21 fi 22 ;; 23 24 abort-upgrade) 25 ;; 26 27 *) 28 echo "preinst called with unknown argument \`$1'" >&2 29 exit 1 30 ;; 31 esac 32 33 # dh_installdeb will replace this with shell code automatically 34 # generated by other debhelper scripts. 35 36 #DEBHELPER# 37 38 exit 0