Skip to content

Debian 12: Dependency check incorrectly reports cron as missing #35

Description

@Flux001337

Title: Debian 12: Dependency check incorrectly reports cron as missing

Hello,

first of all, thank you for creating and maintaining this project. The Linux-ASA-Server-Manager is a great tool and makes running ARK: Survival Ascended servers on Linux much easier. I really appreciate the work that went into making this possible.

I found a small issue during the initial setup on Debian 12. The dependency check reports that cron is missing, although it is already installed and running.

Environment:

  • OS: Debian 12 (Bookworm)
  • Project: Linux-ASA-Server-Manager
  • Installation user: non-root user (ark)
  • Shell: bash

Description:

The installation script reports that cron is missing:

Warning: The following required packages are missing: cron
Please install them using the appropriate command for your system:
sudo apt-get install cron

However, cron is already installed:

# dpkg -l cron
ii  cron  3.0pl1-162  amd64  process scheduling daemon

and:

# systemctl status cron
Active: active (running)

The dependency check fails because it uses:

command -v cron

On Debian 12 this returns no result because the cron daemon binary is located in /usr/sbin/cron.

The user command is available:

$ which crontab
/usr/bin/crontab

Suggested fix:

Instead of checking for the cron executable:

if ! command -v "${cmd}" >/dev/null 2>&1; then

handle cron separately and check for crontab:

if [ "$cmd" == "cron" ]; then
    if ! command -v crontab >/dev/null 2>&1; then
        missing+=("$cmd")
    fi
elif ! command -v "${cmd}" >/dev/null 2>&1; then
    missing+=("$cmd")
fi

or alternatively check the Debian package using dpkg-query:

dpkg-query -W -f='${Status}' cron

Expected behavior:

On Debian systems with cron installed, the dependency check should continue without reporting cron as missing.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions