HEX
Server: LiteSpeed
System: Linux php-prod-3.spaceapp.ru 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC 2025 x86_64
User: xnsbl7462 (1008)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //var/lib/dpkg/info/alt-common-release.postinst
#!/bin/sh

ALT_COMMON_REPO_PATH="/etc/apt/sources.list.d/alt-common-els.list"

create_alt_common_repo() {
    OS_CODENAME=$(grep '^VERSION_CODENAME=' /etc/os-release | cut -d'=' -f2 | sed -e 's@"@@g')
    OS_VER=$(grep '^VERSION_ID=' /etc/os-release | cut -d'=' -f2 | sed -e 's@"@@g')
    OS_NAME=$(grep '^ID=' /etc/os-release | cut -d'=' -f2 | sed -e 's@"@@g')

    mkdir -p "$(dirname "$ALT_COMMON_REPO_PATH")"

    cat <<EOF > "$ALT_COMMON_REPO_PATH"
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb [arch=amd64] https://repo.alt.tuxcare.com/alt-common/deb/${OS_NAME}/${OS_VER}/stable ${OS_CODENAME} main
EOF

    chmod 644 "$ALT_COMMON_REPO_PATH"
}

create_alt_common_repo