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.postinst
#!/bin/sh
# postinst script for bitninja
#
# see: dh_installdeb(1)

set -e

# summary of how this script can be called:
#        * <postinst> `configure' <most-recently-configured-version>
#        * <old-postinst> `abort-upgrade' <new version>
#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
#          <new-version>
#        * <postinst> `abort-remove'
#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
#          <failed-install-package> <version> `removing'
#          <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package


case "$1" in
    configure)
	
    chmod 755 /etc/cron.hourly/logrotate-bitninja
    chmod 644 /etc/logrotate.d/bitninja-inotify
    getent passwd bitninja >/dev/null || /usr/sbin/useradd -r -U -d /var/lib/bitninja -s /bin/false -c 'bitninja' bitninja
    
    if [ -x "/etc/systemd/system/bitninja.service" ]; then
        /bin/systemctl daemon-reload

        if [ -e /bin/systemctl ]; then
            /bin/systemctl enable bitninja
        elif [ -e /usr/bin/systemctl ]; then
            /usr/bin/systemctl enable bitninja
        else 
            echo "Could not enable BitNinja."
        fi
        if [ -e /var/lib/bitninja/ChangelogConfig.sh ]; then
            /bin/sh /var/lib/bitninja/ChangelogConfig.sh
        fi
        if [ -z "$2" ]; then
        # install
            /bin/systemctl start bitninja
        else
        # upgrade
            /bin/systemctl restart bitninja
        fi
    fi
    
    ;;

    abort-upgrade|abort-remove|abort-deconfigure)
    ;;

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

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



exit 0