Giter Club home page Giter Club logo

scripts's People

Contributors

bheisig avatar michaelov avatar phoerselmann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

scripts's Issues

idoit-install.sh fails on Ubuntu

The install script fails to detect a fresh install of ubuntu 16.04 (xenial).

identifyOS first searches for /etc/debian_version and if it contains "strech/sid" it aborts. But on ubuntu (at least 16.04) this is the case. So the function doesn't even test for the ubuntu specific lsb_release output and fails.

i-doit.com certificate expiration causes automated deployment to fail

Expected behavior

The automatic script runs without issue.

Actual behavior

PHP Fatal error:  Uncaught Exception: String could not be parsed as XML in /tmp/i-doit_2022-05-22/parseupdates.php:3
Stack trace:
#0 /tmp/i-doit_2022-05-22/parseupdates.php(3): SimpleXMLElement->__construct('')
#1 {main}
  thrown in /tmp/i-doit_2022-05-22/parseupdates.php on line 3

Steps to reproduce the behavior

Run the automated script with all options and PRO version.

Environment

Question Answer
i-doit version 1.18
i-doit edition pro
Operating system (OS) Debian
OS version 10

Cause

Identify latest version of i-doit pro
--2022-05-22 16:27:57--  https://i-doit.com/updates.xml
Resolving i-doit.com (i-doit.com)... 35.242.168.23
Connecting to i-doit.com (i-doit.com)|35.242.168.23|:443... connected.
ERROR: The certificate of ‘i-doit.com’ is not trusted.
ERROR: The certificate of ‘i-doit.com’ has expired.
The certificate has expired

It looks like the certificate for i-doi.com has expired. By using the --no-check-certificate option, the script run without issue.

Installation Fails on Ubuntu 16.04.3 LTS

I tried to install the open i-doit on a fresh Ubuntu.
When the installer comes to downloading the i-doit it fails with "Unable to download installation file"
It seems that the parsing for the URL and latest version fails as it prints out:
Found i-doit open <title>i-doit (released on 21901) and the parameters for wget are:
$file /tmp/i-doit_2017-m-d/i-doit.zip
$url 2017-06-26

install script failed installation on Ubuntu 1804 Bionic Beaver (server)

Hey there,

your Install script fails on Ubuntu, it states that several php extensions are missing, especially:
bcmath
curl
gd
mbstring
mcrypt (is removed in php 7.1 and 7.2 (!))
mysqli
mysqlnd
pgsql
soap
and finally zip.

i tried to alter the script and even ppa settings so i get at least php 5.6 recognised, but that still didnt help :/
also tried to alter the script to grab php 7.1 with inside the script stated extensions, but still no luck.

already trying to use this script for several days and sadly have no other options as to open this issue.

Any help is appreciated

MYSQL-Error

Hi,

on an fresh Debian 12 installation the fork-script from Nitair is running into a mySQL-Error:

ERROR 1356 (HY000) at line 1: View 'mysql.user' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
SQL statement failed
Operation failed. Please check what is wrong and try again.

With kind regards
Frank

Error in idoit-support script

###Issue

As you can See in the Console-Log, the last call of "copyFile" there is just ohne variable set.

function collectApplianceData {
    log "Collect information about the i-doit virtual appliance"

    copyFile "/etc/appliance_version"
}

But the function expects two variables.

function copyFile {
    local src="$1"
    local dest="$2"

    test -f "$src" || log "File $src does not exist"
    test -f "$src" || return

    log "Copy file $src"
    cp "$src" "$TMP_DIR/$dest"
}

Environment

Question Answer
Operating system (OS) Debian
OS version 10 "buster"

Server logs

root@debian9:/home/jan# idoit-support
Collect data about i-doit, installed add-ons and your system
Collect hardware information
Collect OS information
Collect information about systemd units
Print systemd unit dependency graph
/usr/local/bin/idoit-support: Zeile 90: dot: Kommando nicht gefunden.
Collect installed Debian packages
Collect version information
Check services
Collect log files
Copy file /var/log/mysql/error.log
Copy file /var/log/apache2/error.log
Copy directory /var/www/html/log/
Collect PHP settings
Do you like to include /etc/php/? [Y]es [n]o: y
Copy directory /etc/php/
Collect Apache Web server settings
Do you like to include /etc/apache2/? [Y]es [n]o: y
Copy directory /etc/apache2/
Collect MariaDB settings
Do you like to include /etc/mysql/? [Y]es [n]o: y
Copy directory /etc/mysql/
Collect information about i-doit
File /var/www/html/VERSION does not exist
Copy file /var/www/html/REVISION
Do you like to include your i-doit instance? [Y]es [n]o: n
Do you like to include your i-doit databases? [Y]es [n]o: n
Collect information about the i-doit virtual appliance
/usr/local/bin/idoit-support: Zeile 208: $2 ist nicht gesetzt.

Not all CLI-Tools come with installation

Expected behavior

Expected all CLI tools to be installed.

Actual behavior

Only idoit; idoit-backup; idoit-restore; idoit-jobs work after automatic installation of i-doit with your script.
idoit-pwd; idoit-support; idoit-hotfix are not automaticly installed (expectet this in Point 6)

Steps to reproduce the behavior

yes "" | ./idoit-install 

on Debian 9.9

Thank you for your Script

Thank you for all the work you put into that scripts,
they will make i-doit easier to use for everyone!

Screnshot:

screen

idoit-install incorrectly detects MariaDB version

Expected behavior

Script detects correct MariaDB version and proceeds with the installation.

Actual behavior

The script detects the version as "10.6." (note the trailing period), causing the "case" statement to default to "*", and resulting in this error message:

"MariaDB 10.6. is not supported. Please follow the system requirements. We recommend version 10.6."

At this point, the script ends without completing the installation.

The offending line is 1409:

mariadb_version=$(mysql --version | head -n1 -c29 | tail -c 5)

Steps to reproduce the behavior

Attempt to run idoit-install on a server running a version of MariaDB that includes a period after the major version number, such as "10.6.16-MariaDB". This is the version available by default in Ubuntu Server 22.04.4.

Environment

Question Answer
i-doit version cloned from main on 5-6-24, merge pull request 93108b7
i-doit edition open
Operating system (OS) Ubuntu Server
OS version 22.04.4 LTS

Server logs

Do you want to configure MariaDB? [Y]es [n]o:
Configure MariaDB DBMS
Please enter the MariaDB hostname [leave empty for 'localhost']:
Please enter a new password for MariaDB's super user 'root' [leave empty for 'idoit']:
Set root password and plugin 'mysql_native_password'
MariaDB 10.6. is not supported. Please follow the system requirements. We recommend version 10.6.
Operation failed. Please check what is wrong and try again.

mysql --version | head -n1

mysql Ver 15.1 Distrib 10.6.16-MariaDB, for debian-linux-gnu (x86_64) using EditLine wrapper

Can't create tenant with automatic installation (idoit-install) of the 'open' variant

Expected behavior

Tenant creation successful.

Actual behavior

Tenant creation fails because the file 'isys_module_import_csv.class.php' is not found. As a workaround, this file can be copied from the PRO zip file to the relevant directory (${INSTALL_DIR}/src/classes/modules/import_csv/).

Steps to reproduce the behavior

Run idoit-install (from https://github.com/i-doit/scripts)

Environment

Question Answer
i-doit version 1.23
i-doit edition open
Operating system (OS) Debian
OS version 11.7.0 "bullseye"

Server logs

--------------------------------------------------------------------------------
$ sudo ./idoit-install
[...]
Do you want to create the initial i-doit tenant automatically? [Y]es [n]o: y
Install i-doit via console.php
Please enter a tenant name [leave empty for 'Your company name']: 
PHP Fatal error:  Uncaught Error: Class 'isys_module_import_csv' not found in /var/www/html/src/idoit/Console/IdoitConsoleApplication.php:131
Stack trace:
#0 /var/www/html/src/idoit/Console/IdoitConsoleApplication.php(27): idoit\Console\IdoitConsoleApplication->loadCommands()
#1 /var/www/html/console.php(22): idoit\Console\IdoitConsoleApplication->__construct()
#2 {main}
  thrown in /var/www/html/src/idoit/Console/IdoitConsoleApplication.php on line 131
Creating tenant failed
Operation failed. Please check what is wrong and try again.

Automatic install not working

Expected behavior

Automatic install and no problems

Actual behavior

I am just following the steps in the guide, everything is OK until the "tenant" step, the script ask me if I want to automatically create the initial tenant and when I say yes I got a PHP fatal error so I am locked, I tried to do it manually and I realized that there is only two tabs in the top menu bar (addons and config) instead of more. I cannot create any tenant and finish my setup. Please help me :)

Steps to reproduce the behavior

Follow the steps of the automatic install

Environment

Question Answer
i-doit version 1.18
i-doit edition open
Operating system (OS) Debian
OS version 11 "bullseye"

Server logs

Do you want to create the initial i-doit tenant automatically? [Y]es [n]o:
Install i-doit via console.php
Please enter a tenant name [leave empty for 'Your company name']:
PHP Fatal error: Uncaught Error: Class 'idoit\Module\License\LicenseServiceFactory' not found in /var/www/html/src/classes/modules/console/src/Console/Command/Tenant/AddTenantCommand.php:168
Stack trace:
#0 /var/www/html/src/classes/modules/console/src/Console/Command/AbstractConfigurableCommand.php(137): idoit\Module\Console\Console\Command\Tenant\AddTenantCommand->createStep()
#1 /var/www/html/vendor/symfony/console/Command/Command.php(298): idoit\Module\Console\Console\Command\AbstractConfigurableCommand->execute()
#2 /var/www/html/vendor/symfony/console/Application.php(1023): Symfony\Component\Console\Command\Command->run()
#3 /var/www/html/vendor/symfony/console/Application.php(299): Symfony\Component\Console\Application->doRunCommand()
#4 /var/www/html/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
#5 /var/www/html/console.php(26): Symfony\Component\Console\Application->run()
#6 {main}
thrown in /var/www/html/src/classes/modules/console/src/Console/Command/Tenant/AddTenantCommand.php on line 168
Creating tenant failed
Operation failed. Please check what is wrong and try again.

Debian 10 apachectl missing

When running install script on freshly new installed debian 10.5 the script breaks with "Important software requirement is missing. Please install and configure it. Operation failed. Please check what is wrong and try again."

Check for installed applications and services: apachectl: missing

idoit-jobs: Error on using passwords with special characters

Expected behavior

Normal execution of idoit-jobs.

Actual behavior

If the password configured in /etc/i-doit/i-doit.sh contains a character you'd normally escape, the shell prints an error about that character being unexpected.

Steps to reproduce the behavior

  1. In i-doit.sh, set a password with a character you'd normally escape. For me it was a ' ( '.
  2. Execute idoit-jobs.

Environment

Question Answer
i-doit version 1.13
i-doit edition pro
Operating system (OS) Ubuntu
OS version 18.04 LTS

Server logs

$ idoit-jobs
Perform important background tasks for i-doit
Archive i-doit logbook
/usr/local/bin/idoit-jobs: eval: line 49: syntax error near unexpected token `('
/usr/local/bin/idoit-jobs: eval: line 49: `sudo -u www-data /usr/local/bin/idoit logbook-archive --user test --password H8(8G6muBkywzVWhUOlR --tenantId 1'
Command 'logbook-archive' failed
Operation failed. Please check what is wrong and try again.

idoit-install fails on Ubuntu 24.04 LTS

Expected behavior

The installer completes successfully.

Actual behavior

The installer fails at multiple points. At issue are the OS version, PHP version, and MariaDB version.

Steps to reproduce the behavior

Attempt to run idoit-install on Ubuntu 24.04 LTS.

Environment

Question Answer
i-doit version 30 (script pulled from main on 5-9-24)
i-doit edition open
Operating system (OS) Ubuntu
OS version 24.04

Server logs

(MariaDB|Ubuntu|PHP) is not supported.

Suggested Solution

I've made the necessary changes to idoit-install and attached a diff file, below.

patch idoit-install idoit-install_diff.txt

idoit-install.sh doesn't work properly behing proxy

prepareIDoit writes a small php-script to get the latest i-doit version. The used php function "file_get_contents" runs in a timeout if it runs behind a proxy.

Install i-doit pro
Identify latest version of i-doit pro
PHP Warning: file_get_contents(https://i-doit.com/updates.xml): failed to open stream: Connection timed out in /tmp/i-doit_2017-10-16/parseupdates.php on line 3
PHP Fatal error: Uncaught Exception: String could not be parsed as XML in /tmp/i-doit_2017-10-16/parseupdates.php:3
Stack trace:
#0 /tmp/i-doit_2017-10-16/parseupdates.php(3): SimpleXMLElement->__construct('')
#1 {main}
thrown in /tmp/i-doit_2017-10-16/parseupdates.php on line 3
Missing URL
Operation failed. Please check what is wrong and try again.

One solution would be, to read the https_proxy variable and use it to build a context, as described in https://blog.bartlweb.net/2011/04/die-php-funktion-file_get_contents-hinter-einem-proxy-server-nutzen/

Another (maybe better?) solution could be to use the already downloaded updates.xml from the preceding step:
test ! -f "$TMP_DIR/updates.xml" && ( "$WGET_BIN" --quiet -O "$TMP_DIR/updates.xml" "$update_file_url" || \ abort "Unable to fetch file from '${update_file_url}'" )
instead of downloading it again.

Also the php-function is missing the closing ?> before EOF on line 972.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.