2fauth install fails [ERROR] in line 79: exit code 0: while executing command start #1282

Closed
opened 2026-02-05 00:10:26 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @samwathegreat on GitHub (Jul 14, 2025).

Have you read and understood the above guidelines?

yes

📜 What is the name of the script you are using?

2fauth

📂 What was the exact command used to execute the script?

bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/2fauth.sh)"

⚙️ What settings are you using?

  • Default Settings
  • Advanced Settings

🖥️ Which Linux distribution are you using?

Debian 12

📝 Provide a clear and concise description of the issue.

script fails almost instantly

🔄 Steps to reproduce the issue.

simply run the bash command

Paste the full error output (if available).

bash: line 79: start: command not found

[ERROR] in line 79: exit code 0: while executing command start

🖼️ Additional context (optional).

Image

verbose output:

variables
color
catch_errors

function update_script() {
header_info
check_container_storage
check_container_resources

if ! -d "/opt/2fauth" ; then
msg_error "No ${APP} Installation Found!"
exit
fi
RELEASE=$(curl -fsSL https://api.github.com/repos/Bubka/2FAuth/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
if cat /opt/2fauth_version.txt 2>/dev/null)" ; then
msg_info "Updating $APP to ${RELEASE}"
$STD apt-get update
$STD apt-get -y upgrade

msg_info "Creating Backup"
mv "/opt/2fauth" "/opt/2fauth-backup"
if ! dpkg -l | grep -q 'php8.3'; then
  cp /etc/nginx/conf.d/2fauth.conf /etc/nginx/conf.d/2fauth.conf.bak
fi
msg_ok "Backup Created"

if ! dpkg -l | grep -q 'php8.3'; then
  $STD apt-get install -y \
    lsb-release \
    gnupg2
  PHP_VERSION="8.3" PHP_MODULE="common,ctype,fileinfo,fpm,mysql,cli" setup_php
  sed -i 's/php8.2/php8.3/g' /etc/nginx/conf.d/2fauth.conf
fi
fetch_and_deploy_gh_release "2fauth" "Bubka/2FAuth"
mv "/opt/2fauth-backup/.env" "/opt/2fauth/.env"
mv "/opt/2fauth-backup/storage" "/opt/2fauth/storage"
cd "/opt/2fauth" || return
chown -R www-data: "/opt/2fauth"
chmod -R 755 "/opt/2fauth"
export COMPOSER_ALLOW_SUPERUSER=1
$STD composer install --no-dev --prefer-source
php artisan 2fauth:install
$STD systemctl restart nginx

msg_info "Cleaning Up"
rm -rf "v${RELEASE}.zip"
if dpkg -l | grep -q 'php8.2'; then
  $STD apt-get remove --purge -y php8.2*
fi
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleanup Completed"

echo "${RELEASE}" >/opt/2fauth_version.txt
msg_ok "Updated $APP to ${RELEASE}"

else
msg_ok "No update required. ${APP} is already at ${RELEASE}"
fi
exit
}

start
bash: line 79: start: command not found
error_handler $LINENO "$BASH_COMMAND"

Copyright (c) 2021-2025 community-scripts ORG

Author: michelroegl-brunner

License: MIT | https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/LICENSE

post_to_api() {

if ! command -v curl &>/dev/null; then
return
fi

if [ "$DIAGNOSTICS" = "no" ]; then
return
fi

if [ -z "$RANDOM_UUID" ]; then
return
fi

local API_URL="http://api.community-scripts.org/upload"
local pve_version="not found"
pve_version=$(pveversion | awk -F'[/ ]' '{print $2}')

JSON_PAYLOAD=$(
{
"ct_type": $CT_TYPE,
"type":"lxc",
"disk_size": $DISK_SIZE,
"core_count": $CORE_COUNT,
"ram_size": $RAM_SIZE,
"os_type": "$var_os",
"os_version": "$var_version",
"disableip6": "",
"nsapp": "$NSAPP",
"method": "$METHOD",
"pve_version": "$pve_version",
"status": "installing",
"random_id": "$RANDOM_UUID"
}
EOF

if ; then
RESPONSE=$(curl -s -w "%{http_code}" -L -X POST "$API_URL" --post301 --post302
fi
}

post_to_api_vm() {

if ! -f /usr/local/community-scripts/diagnostics ; then
return
fi
DIAGNOSTICS=$(grep -i "^DIAGNOSTICS=" /usr/local/community-scripts/diagnostics | awk -F'=' '{print $2}')
if ! command -v curl &>/dev/null; then
return
fi

if [ "$DIAGNOSTICS" = "no" ]; then
return
fi

if [ -z "$RANDOM_UUID" ]; then
return
fi

local API_URL="http://api.community-scripts.org/upload"
local pve_version="not found"
pve_version=$(pveversion | awk -F'[/ ]' '{print $2}')

DISK_SIZE_API=${DISK_SIZE%G}

JSON_PAYLOAD=$(
{
"ct_type": 2,
"type":"vm",
"disk_size": $DISK_SIZE_API,
"core_count": $CORE_COUNT,
"ram_size": $RAM_SIZE,
"os_type": "$var_os",
"os_version": "$var_version",
"disableip6": "",
"nsapp": "$NSAPP",
"method": "$METHOD",
"pve_version": "$pve_version",
"status": "installing",
"random_id": "$RANDOM_UUID"
}
EOF

if ; then
RESPONSE=$(curl -s -w "%{http_code}" -L -X POST "$API_URL" --post301 --post302
fi
}

POST_UPDATE_DONE=false
post_update_to_api() {

if ! command -v curl &>/dev/null; then
return
fi

if [ "$POST_UPDATE_DONE" = true ]; then
return 0
fi
local API_URL="http://api.community-scripts.org/upload/updatestatus"
local status="${1:-failed}"
local error="${2:-No error message}"

JSON_PAYLOAD=$(
{
"status": "$status",
"error": "$error",
"random_id": "$RANDOM_UUID"
}
EOF

if ; then
RESPONSE=$(curl -s -w "%{http_code}" -L -X POST "$API_URL" --post301 --post302
fi

POST_UPDATE_DONE=true
}
{
"status": "$status",
"error": "$error",
"random_id": "$RANDOM_UUID"
}
EOF

[ERROR] in line 79: exit code 0: while executing command start

stop_spinner

Originally created by @samwathegreat on GitHub (Jul 14, 2025). ### ✅ Have you read and understood the above guidelines? yes ### 📜 What is the name of the script you are using? 2fauth ### 📂 What was the exact command used to execute the script? bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/2fauth.sh)" ### ⚙️ What settings are you using? - [x] Default Settings - [ ] Advanced Settings ### 🖥️ Which Linux distribution are you using? Debian 12 ### 📝 Provide a clear and concise description of the issue. script fails almost instantly ### 🔄 Steps to reproduce the issue. simply run the bash command ### ❌ Paste the full error output (if available). bash: line 79: start: command not found [ERROR] in line 79: exit code 0: while executing command start ### 🖼️ Additional context (optional). <img width="586" height="221" alt="Image" src="https://github.com/user-attachments/assets/d94f4c5d-0801-4c11-9821-31f006b8ceca" /> **verbose output:** variables color catch_errors function update_script() { header_info check_container_storage check_container_resources if [[ ! -d "/opt/2fauth" ]]; then msg_error "No ${APP} Installation Found!" exit fi RELEASE=$(curl -fsSL https://api.github.com/repos/Bubka/2FAuth/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') if [[ "${RELEASE}" != "$(cat ~/.2fauth 2>/dev/null || cat /opt/2fauth_version.txt 2>/dev/null)" ]]; then msg_info "Updating $APP to ${RELEASE}" $STD apt-get update $STD apt-get -y upgrade msg_info "Creating Backup" mv "/opt/2fauth" "/opt/2fauth-backup" if ! dpkg -l | grep -q 'php8.3'; then cp /etc/nginx/conf.d/2fauth.conf /etc/nginx/conf.d/2fauth.conf.bak fi msg_ok "Backup Created" if ! dpkg -l | grep -q 'php8.3'; then $STD apt-get install -y \ lsb-release \ gnupg2 PHP_VERSION="8.3" PHP_MODULE="common,ctype,fileinfo,fpm,mysql,cli" setup_php sed -i 's/php8.2/php8.3/g' /etc/nginx/conf.d/2fauth.conf fi fetch_and_deploy_gh_release "2fauth" "Bubka/2FAuth" mv "/opt/2fauth-backup/.env" "/opt/2fauth/.env" mv "/opt/2fauth-backup/storage" "/opt/2fauth/storage" cd "/opt/2fauth" || return chown -R www-data: "/opt/2fauth" chmod -R 755 "/opt/2fauth" export COMPOSER_ALLOW_SUPERUSER=1 $STD composer install --no-dev --prefer-source php artisan 2fauth:install $STD systemctl restart nginx msg_info "Cleaning Up" rm -rf "v${RELEASE}.zip" if dpkg -l | grep -q 'php8.2'; then $STD apt-get remove --purge -y php8.2* fi $STD apt-get -y autoremove $STD apt-get -y autoclean msg_ok "Cleanup Completed" echo "${RELEASE}" >/opt/2fauth_version.txt msg_ok "Updated $APP to ${RELEASE}" else msg_ok "No update required. ${APP} is already at ${RELEASE}" fi exit } start bash: line 79: start: command not found error_handler $LINENO "$BASH_COMMAND" # Copyright (c) 2021-2025 community-scripts ORG # Author: michelroegl-brunner # License: MIT | https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/LICENSE post_to_api() { if ! command -v curl &>/dev/null; then return fi if [ "$DIAGNOSTICS" = "no" ]; then return fi if [ -z "$RANDOM_UUID" ]; then return fi local API_URL="http://api.community-scripts.org/upload" local pve_version="not found" pve_version=$(pveversion | awk -F'[/ ]' '{print $2}') JSON_PAYLOAD=$( { "ct_type": $CT_TYPE, "type":"lxc", "disk_size": $DISK_SIZE, "core_count": $CORE_COUNT, "ram_size": $RAM_SIZE, "os_type": "$var_os", "os_version": "$var_version", "disableip6": "", "nsapp": "$NSAPP", "method": "$METHOD", "pve_version": "$pve_version", "status": "installing", "random_id": "$RANDOM_UUID" } EOF if [[ "$DIAGNOSTICS" == "yes" ]]; then RESPONSE=$(curl -s -w "%{http_code}" -L -X POST "$API_URL" --post301 --post302 \ fi } post_to_api_vm() { if [[ ! -f /usr/local/community-scripts/diagnostics ]]; then return fi DIAGNOSTICS=$(grep -i "^DIAGNOSTICS=" /usr/local/community-scripts/diagnostics | awk -F'=' '{print $2}') if ! command -v curl &>/dev/null; then return fi if [ "$DIAGNOSTICS" = "no" ]; then return fi if [ -z "$RANDOM_UUID" ]; then return fi local API_URL="http://api.community-scripts.org/upload" local pve_version="not found" pve_version=$(pveversion | awk -F'[/ ]' '{print $2}') DISK_SIZE_API=${DISK_SIZE%G} JSON_PAYLOAD=$( { "ct_type": 2, "type":"vm", "disk_size": $DISK_SIZE_API, "core_count": $CORE_COUNT, "ram_size": $RAM_SIZE, "os_type": "$var_os", "os_version": "$var_version", "disableip6": "", "nsapp": "$NSAPP", "method": "$METHOD", "pve_version": "$pve_version", "status": "installing", "random_id": "$RANDOM_UUID" } EOF if [[ "$DIAGNOSTICS" == "yes" ]]; then RESPONSE=$(curl -s -w "%{http_code}" -L -X POST "$API_URL" --post301 --post302 \ fi } POST_UPDATE_DONE=false post_update_to_api() { if ! command -v curl &>/dev/null; then return fi if [ "$POST_UPDATE_DONE" = true ]; then return 0 fi local API_URL="http://api.community-scripts.org/upload/updatestatus" local status="${1:-failed}" local error="${2:-No error message}" JSON_PAYLOAD=$( { "status": "$status", "error": "$error", "random_id": "$RANDOM_UUID" } EOF if [[ "$DIAGNOSTICS" == "yes" ]]; then RESPONSE=$(curl -s -w "%{http_code}" -L -X POST "$API_URL" --post301 --post302 \ fi POST_UPDATE_DONE=true } { "status": "$status", "error": "$error", "random_id": "$RANDOM_UUID" } EOF [ERROR] in line 79: exit code 0: while executing command start stop_spinner
OVERLORD added the bug label 2026-02-05 00:10:26 +03:00
Author
Owner

@MickLesk commented on GitHub (Jul 14, 2025):

Already done

@MickLesk commented on GitHub (Jul 14, 2025): Already done
Author
Owner

@samwathegreat commented on GitHub (Jul 14, 2025):

WOW that was a fast fix...

Thanks

@samwathegreat commented on GitHub (Jul 14, 2025): WOW that was a fast fix... Thanks
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ProxmoxVE#1282