summaryrefslogtreecommitdiffstats
path: root/server
Commit message (Collapse)AuthorAgeFilesLines
* oglivecli: more helpful usage error messageJose M. Guisado2022-09-221-1/+1
| | | | | | | | | | Valid commands depend on the "access level" determined by: - You are root (root) - You can read /opt/opengnsys/www/controlacceso.php (web) Users might not know this, so invite to run as sudo if running some command is not valid because of this.
* Revert "#1075 Rename boot templates"Javier Sánchez Parra2022-06-1414-0/+0
| | | | | | | | This reverts commit 127248e3454e84ba073e5413075e1e7aafef7c0d. Web Console expects boot templates to have certain names, otherwise it behaves incorrectly. The reverted commit changes this names to ones that the Web Console do not recognize.
* #1075 Rename boot templatesJavier Sánchez Parra2022-06-1414-0/+0
| | | | Rename boot templates to improve readability and clarity.
* #915 Remove TEMPLATE_NAME from setclientmodeJavier Sánchez Parra2022-04-081-46/+42
| | | | | | | It is not needed for setting clients' boot mode. Replace TEMPLATE_NAME in error messages with MODE_FILE as both reference the template file.
* #1045 Fix duplicate software profiles bugJose M. Guisado2021-05-101-0/+1
| | | | | | | | | | | | | | Sometimes a software profile creation does not fail although there is already an existing one with the same components. After some investigation, the reason seems to be that legacy code from ogAdmServer (deprecated) executes a SQL query using GROUP_CONCAT grouping all software components id in increasing order but this concatenated string ends up being truncated due to a maximul length variable in MySQL server. This variable is: "group_concat_max_len" and its default value is 1024. Fix this by increasing group_concat max length in MySQL.
* #768: Fix a little bug in `oglivecli` scriptRamón M. Gómez2021-05-101-1/+1
| | | | introduced in commit 19528454b.
* #986: Updating help and messages from script `setclientmode`.Ramón M. Gómez2021-03-091-11/+11
|
* #1028 setserveraddr restarts ogserver service.Irina Gómez2021-02-161-1/+1
|
* #1020 logrotate ignore non-existent logs with missingokantoniodoblas2021-02-091-0/+1
| | | | | | | If the logrotate files for opengnsys indicate to rotate files that do not exist, the process ignores them and continues with the next one. The missingok clause is added to the logrotate configuration files.
* #1009 Add ogclient.json update to setsmbpassJavier Sánchez Parra2020-12-011-0/+3
| | | | | | | | | ogclient.json has samba user and pass because ogVDI needs them to upload qcow2 images to the repository. setsmbpass sets user and pass and updates ogLives to match. If a user executes setsmbpass, then ogclient.json samba info becomes outdated. Add ogclient.json samba user and pass update to setsmbpass script.
* #1009 Fix ogclient.json ownership and permissionsJavier Sánchez Parra2020-11-301-0/+2
| | | | | ogclient.json has the samba password in plain text. This commit changes ownership and permissions to improve the security.
* #988 checkperms sets permissions on ogserver.jsonIrina Gómez2020-11-171-2/+2
|
* #997: Fix oglivecli.Irina Gómez2020-11-051-1/+1
| | | | | The script was not detecting the Initrd compression program, could not get the samba password and needed to ask for it.
* #988 Fix settoken json handlingIrina Gómez2020-10-291-0/+1
| | | | source_json_config loads config values.
* #988 Fix setserveraddr json handlingJavier Sánchez Parra2020-10-241-3/+13
| | | | | | | | setserveraddr script modified ogserver.json values with "sed". This caused unwanted changes in database.ip. This commit replaces "sed" with "jq" for modifying ogserver.json, ensuring only rest.ip and wol.interface values change.
* #988 Read json config file in scriptsRoberto Hueso Gómez2020-10-2211-23/+35
| | | | | | | | This patch implements the function source_json_config() that is used to read the new ogserver.json config file in the scripts. This replaces the old 'source .../ogserver.cfg'. Co-authored-by: Javier Sánchez Parra <jsanchez@soleta.eu>
* #988 remove reference to ogserver.cfg setclientmodeOpenGnSys Support Team2020-10-161-1/+0
| | | | Not used, and now there is a configuration ogserver.json
* #988 Adapt settoken to the new json config fileRoberto Hueso Gómez2020-10-161-3/+2
| | | | This patch sets the renewed api_token in the config file ogserver.json
* #993 Fix oglivedir parse in setclientmode scriptRoberto Hueso Gómez2020-10-021-3/+3
| | | | | | | This awk expressions is parsing a key1=value1 key2=value2... expression. For example one of the 'awk' in this patch looks for the key "oglivedir" and parses the value of that key correctly.
* #997: Fix variable name in commit `0e3e167`.Ramón M. Gómez2020-09-031-2/+2
|
* #997: Support for Initrd compressed in several formats.Ramón M. Gómez2020-09-034-10/+17
| | | | Adding compatibility with Ubuntu 20.04 Initrd, which is compressed in LZ4 format.
* #993 Adapt setclientmode script to use a config fileRoberto Hueso Gómez2020-07-291-68/+17
| | | | | This config file contains the parameters needed in order to run the script without the need to make any queries to the database.
* #986 More renaming to ogserverJavier Sánchez Parra2020-06-2313-17/+17
| | | | | Another step into renaming all references of ogAdmServer to ogServer. This commit mostly rename references to ogAdmServer.cfg in scripts.
* #980 use json file format in ogClientJavier Sánchez Parra2020-06-021-4/+4
|
* #971 Remove ogAdmAgent initializationJavier Sánchez Parra2020-06-022-4/+2
| | | | | | | | | | | All the functionalities of the ogAdmAgent are now in the ogAdmServer. So, the it is not needed anymore. This commit remove the installation and update of the ogAdmAgent, adds a check to remove it if exists and removes it from the OpenGnsys init script. A future patch will remove all the code related to the ogAdmAgent.
* #980 Add ogClient to the installer and update the setserveraddr scriptJavier Sánchez Parra2020-06-021-2/+6
| | | | This also removes the legacy ogAdmClient for these scripts.
* #941 Set MySQL encoding to UTF-8Javier Sánchez Parra2020-04-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit sets the MySQL enconding to UTF8. This way we can avoid problems with special characters in strings, like: ó. It also changes the installation script to always copy the MySQL configuration template and restart MySQL. So, even if the server had MySQL installed before the OpenGnsys installation, the script configures MySQL. Example error that this commit should fix: ogAdmServer[12524]: failed to query database (actualizaSoftware:2380) 1366: Incorrect string value: '\xF3n de ...' for column 'descripcion' at row 1 The encoding configuration before this commit should be like this: mysql> SHOW VARIABLES LIKE 'char%'; +--------------------------+----------------------------+ | Variable_name | Value | +--------------------------+----------------------------+ | character_set_client | utf8 | | character_set_connection | utf8 | | character_set_database | latin1 | | character_set_filesystem | binary | | character_set_results | utf8 | | character_set_server | latin1 | | character_set_system | utf8 | | character_sets_dir | /usr/share/mysql/charsets/ | +--------------------------+----------------------------+ 8 rows in set (0.10 sec) The encoding configuration after this commit should be like this: mysql> SHOW VARIABLES LIKE 'char%'; +--------------------------+----------------------------+ | Variable_name | Value | +--------------------------+----------------------------+ | character_set_client | utf8 | | character_set_connection | utf8 | | character_set_database | utf8 | | character_set_filesystem | binary | | character_set_results | utf8 | | character_set_server | utf8 | | character_set_system | utf8 | | character_sets_dir | /usr/share/mysql/charsets/ | +--------------------------+----------------------------+ 8 rows in set (0.01 sec)
* #959: Installer copies the new MySQL configuration template to enable the ↵Ramón M. Gómez2020-03-051-0/+3
| | | | event scheduler automatically.
* #955: Adapt DHCP template file to `addtodhcp` script.Ramón M. Gómez2020-03-041-10/+4
|
* #965: `oglivecli rebuild` detects short directory names.Ramón M. Gómez2020-03-041-8/+9
|
* #965: `oglivecli install` uses shorter directory names.Ramón M. Gómez2020-03-041-4/+7
|
* #488 #959 comparedhcpopengnsys: Fixes error when computer definition was in ↵Irina Gómez2020-03-031-6/+29
| | | | one line.
* #955: Correct quoting of input parameters.Ramón M. Gómez2020-03-021-2/+2
|
* #955: `addtodhcp` script checks if all routers are defined in DHCP ↵Ramón M. Gómez2020-02-271-2/+7
| | | | configuration file.
* #957: `comparedhcpopengnsys` script adapted to common functions.Ramón M. Gómez2020-02-252-38/+30
|
* #957: `ogagentqueue` cron script adapted to common functions.Ramón M. Gómez2020-02-251-28/+11
|
* #957: `setsmbpass` script adapted to common functions.Ramón M. Gómez2020-02-251-20/+16
|
* #957: `setserveraddr` uses the new global functions.Ramón M. Gómez2020-02-252-21/+13
|
* #957 #958: `setclientlive` and `setclientmode` script are adapted to global ↵Ramón M. Gómez2020-02-252-110/+77
| | | | functions and avoid SQL injectionn.
* #959: Remove duplicate script.Ramón M. Gómez2020-02-241-9/+0
|
* #957: Script `comparemac` uses common server functions.Ramón M. Gómez2020-02-181-30/+27
|
* #957 #958: Script `settoken`: use `version` function and avoid SQL injection.Ramón M. Gómez2020-02-181-9/+10
|
* #957: Script `registeredsoftware`: use common server functions and avoid SQL ↵Ramón M. Gómez2020-02-181-38/+16
| | | | injection.
* #958: Avoid SQL injection in `addtodhcp` and `listclientlive`.Ramón M. Gómez2020-02-182-4/+5
|
* #957: Script `listclientmode` uses common server functions.Ramón M. Gómez2020-02-181-36/+28
|
* #957: Script `listclientlive` uses common server functions.Ramón M. Gómez2020-02-182-36/+22
|
* #768: `oglivecli check` verifies if the linked directory matches the one ↵Ramón M. Gómez2020-02-181-0/+3
| | | | defined by default.
* #957 #768: Improvements in `oglivecli` script: display proper help of ↵Ramón M. Gómez2020-02-181-50/+48
| | | | parameters, raise error if a file cannot be downloaded, standardized error messages.
* #957: Adapt `oglivecli` script to global functions.Ramón M. Gómez2020-02-171-66/+32
|
* #957: Script `supportsave` uses global functions to show help and manage errors.Ramón M. Gómez2020-02-172-19/+26
|