HEX
Server: Apache/2.4.65 (Debian)
System: Linux srv39710 6.1.0-41-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.158-1 (2025-11-09) x86_64
User: root (0)
PHP: 8.4.11
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
Upload Files
File: /var/lib/dpkg/info/bitninja.preinst
#!/bin/sh
# preinst script for bitninja
#
# see: dh_installdeb(1)

set -e

# summary of how this script can be called:
#        * <new-preinst> `install'
#        * <new-preinst> `install' <old-version>
#        * <new-preinst> `upgrade' <old-version>
#        * <old-preinst> `abort-upgrade' <new-version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package


case "$1" in
    install)
        DEFVALUE="bitninja";
        MYVALUE="$(getent passwd $DEFVALUE | grep -vE '(nologin|false)$' | awk -F: -v min=`awk '/^UID_MIN/ {print $2}' /etc/login.defs` -v max=`awk '/^UID_MAX/ {print $2}' /etc/login.defs` '{if(($3 >= min)&&($3 <= max)) print $1}')";
        if [ "$MYVALUE" = "$DEFVALUE" ]; then
            echo "-----------------------------------------------------------------------";
            echo "User 'bitninja' already exists, cannot install.";
            echo "-----------------------------------------------------------------------";
            exit 1;
        fi
        echo "-----------------------------------------------------------------------";
        echo " ";
        echo " In case you chose not to use the universal installer ";
        echo " please insert your license key by using the following command as root:";
        echo " ";
        echo " bitninja-config --set license_key=<your_license_key_here>";
        echo " ";
        echo " Please find your license key at https://admin.bitninja.io";
        echo " at the Settings/General menu.";
        echo " ";
        echo "-----------------------------------------------------------------------";
    ;;

    upgrade)
    ;;

    abort-upgrade)
    ;;

    *)
        echo "preinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0