setup.sh unknown flag

ItsOnlyMe

Verified User
Joined
Apr 3, 2009
Messages
126
Location
Netherlands
Once again the installer or the directadmin binary has changed internally without updating the install scripts and did of course break the install script because a unknown flag was given.

It looks like this part is written in Golang. You can skip unknown flags in Go https://pkg.go.dev/github.com/jessevdk/go-flags#pkg-constants
Code:
    // IgnoreUnknown ignores any unknown options and passes them as
    // remaining command line arguments instead of generating an error.
    IgnoreUnknown

unknown flag `update-channel'
Bash:
${DA_PATH}/directadmin install           \                                                                                                   
        "--adminname=${ADMIN_USER}"      \                                                                                                   
        "--adminpass=${ADMIN_PASS}"      \                                                                                                   
        "--update-channel=${DA_CHANNEL}" \                                                                                                   
        "--email=${EMAIL}"               \                                                                                                   
        "--hostname=${HOST}"             \                                                                                                   
        "--network-dev=${ETH_DEV}"       \                                                                                                   
        "--ip=${EXTERNAL_IP}"            \                                                                                                   
        "--netmask=${NM}"                \                                                                                                   
        "--ns1=${NS1}"                   \                                                                                                   
        "--ns2=${NS2}"                   \                                                                                                   
        || exit 1
 
hi @ItsOnlyMe, we do keep some backwards compatibility between directadmin binary and setup.sh script. Making fresh install with latest setup.sh and directadmin from current release channel should always work.

However we can not ensure compatibility with all possible binary and script version combinations. Most likely you are trying to install older DA binary with the latest setup.sh script. Please try performing new DA installation using latest DA binary.

We are deliberately returning error for unknown cli arguments to make it easier to catch typos when users are making CLI calls from a shell directly. Silently ignoring unknown arguments can easily lead to unexpected situations or hard to track bugs.
 
These are scripts from directadmin.com that get downloaded every new install. So again. please fix ur scripts and binary's before you release something.
 
hi @ItsOnlyMe, I think the situation is the same as before. We are syncing public setup.sh with the DirectAdmin version available at the current release channel. You can run into issues only if you are trying to install older DA releases using latest setup.sh script.
 
I doubt it. Our install scripts follow the exact same instructions as you give on the website. the setup.sh if a file that gets downloaded from directadmin.com...

this WAS an issue on NEW installs not on old installs. i don't understand why you keep referring to that.
 
What I had in mind was:
  • bash <(curl -LSs https://download.directadmin.com/setup.sh || curl -LSs https://download-alt.directadmin.com/setup.sh) _lk_here_ will work
  • DA_CHANNEL=stable bash <(curl -LSs https://download.directadmin.com/setup.sh || curl -LSs https://download-alt.directadmin.com/setup.sh) _lk_here_ will NOT work until we bump stable release channel to a newer DA version.
Taken from install guide.

By referring to OLD DirectAdmin I mean older DA versions that are being installed by specifically overriding which version to install. It is possible by providing DA_CHANNEL or DA_COMMIT environment variables. We are not updating the docs because this is a temporary issue until stable release channel gets bumped to a newer version.

To make a fresh DA installation using stable you can install from current release channel and change release channel after the installation.
 
@ItsOnlyMe we have a quick update regarding the installer. We pushed updated installer that would support installing older DA versions (for example from stable release channel).

We expect we will be making installer changes in our next releases so waiting for stable to catch up with all updates might take some time. This upgrade will ensure compatibility for older DA versions.
 
Still strange though that this has worked for, until it didn't and that was because someone decided that it was a good idea to add the following flag in the setup.sh and call the da binary "--update-channel=${DA_CHANNEL}" even though this flag doesn't exist and made the installations fail.

This was added later on but was not added in the da binary it self thus failing the installation. Why not skip the unknown flags but report them? Doing this would not break installations.

I am starting to notice a lot of changes that are putting me on the edge of looking for a new product because the amount of issues Ive had in the past half year with new installations or updates of directadmin servers is insanely high in comparison to the years and years I have worked with directadmin.

Same counts for that awful license system check that has to be done every time a dataskq runs. This is even so bad that after a server migration i get to notice that a lot of permissions for example hasn't been set because the dataskq refused to run because our license would be expired because we hit a ratelimit? Why is this? What was wrong with running the set_permissions.sh script without calling the dataskq or at least the license check. The amount of users per server i transfer is making me hit this limit a lot of times and causes more and more downtime.
 
Flag --update-channel=${DA_CHANNEL} is added to the DA binary in the same release when it was added to the setup.sh shell script. You can only get this error if you are using setup.sh from one DA version and DA binary from another.

Calls to dataskq does not perform active licence checks and does not contribute to hitting license rate limits. You can only hit it if you keep restarting directadmin service continuously. Please keep main directadmin service running all the time and you will never hit license check rate limits.

If you still receive license rate limit errors please check the docs section about too many requests. Most of the time it is caused by more than one DA server using same license key and fighting one another for it.
 
Back
Top