https://github.com/ticgal/glpiagentutils
A collection of GLPI Agent related scripts
https://github.com/ticgal/glpiagentutils
glpi glpi-agent script
Last synced: 5 months ago
JSON representation
A collection of GLPI Agent related scripts
- Host: GitHub
- URL: https://github.com/ticgal/glpiagentutils
- Owner: ticgal
- License: agpl-3.0
- Created: 2023-07-11T17:10:15.000Z (almost 3 years ago)
- Default Branch: develop
- Last Pushed: 2025-03-25T14:27:43.000Z (about 1 year ago)
- Last Synced: 2025-03-25T15:36:15.709Z (about 1 year ago)
- Topics: glpi, glpi-agent, script
- Language: Shell
- Homepage: https://tic.gal
- Size: 93.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GLPI Agent Utils
[](https://twitter.com/ticgalcom)
[](https://tic.gal/)
[](https://github.com/ticgal/taskdrop/blob/master/LICENSE)
## Disclaimer
You can use them at your own risk.
If you need professional support, please don't hesitate to get in touch with us.
## What are GLPI Agent Utils?
GLPI-Agent-Utils aims to be a toolkit to complement GLPI Agent. It's a set of scripts designed to improve how you use the GLPI Agent for managing IT assets.
Currently, these are the scripts:
- [glpi-agent-portable-inventory.sh](#glpi-agent-portable-inventory.sh)
- [glpi-agent-wrapper.sh](#glpi-agent-wrapper.sh)
- [glpi-agent-autoupdater.sh](#glpi-agent-autoupdater.sh)
## What is the GLPI Agent?
For more information about the GLPI Agent, please visit this [link](https://github.com/glpi-project/glpi-agent#readme).
## What do GLPI Agent Utils include?
### [glpi-agent-portable-inventory.sh](#glpi-agent-portable-inventory.sh)
This script lets you start a local inventory process without installing any agents.
It relies on the GLPI Agent AppImage version and the [glpi-agent-portable.sh](https://github.com/glpi-project/glpi-agent/blob/master/contrib/unix/glpi-agent-portable.sh) generator script
Currently, it runs and saves a local inventory to /tmp
#### Supported OS
**glpi-agent-portable-inventory.sh** works with any operating system supporting Flatpak and the GLPI Agent.
It has been tested on:
- Ubuntu
#### How to use it
To use GLPI-Agent-Utils, all you need to do is:
1. Download it
2. Run it as sudo
3. This will create an inventory in the `/tmp` folder.
Alternatively, you can run this one-liner:
`curl -s https://raw.githubusercontent.com/ticgal/glpiagentutils/master/glpi-agent-portable-inventory.sh | sudo bash`
### [glpi-agent-wrapper.sh](#glpi-agent-wrapper.sh)
A quick GLPI Agent updater script
It relies on the `glpi-agent-linux-installer.pl` to perform the update.
#### Supported OS
**`glpi-agent-wrapper.sh`** works with any operating system supported by the official `glpi-agent-linux-installer.pl `
It has been tested on:
- Ubuntu
However, it should work on any glpi-agent-linux-installer.pl supported OS
#### How to use it
To use GLPI-Agent-Utils, all you need to do is:
1. Download it
2. Make it executable (chmod +x)
2. Run it as sudo
There are three parameters:
1. --install
2. --update
3. --help
#### --install
It works as a wrapper to the plugin, making the installation pass the parameters to the script.
At least a --server or --local is needed to install and generate an inventory.
All the installations are silent by default. If you want them lengthy, use the official script.
Alternatively, you can run this one-liner:
`curl -s https://raw.githubusercontent.com/ticgal/glpiagentutils/master/glpi-agent-wrapper.sh | sudo bash /dev/stdin --install --server="https://yourserver.tld/" [add any other parameters needed]`
#### --update
This is a helpful parameter since the official script won't update the agent, preserving the parameters nor the installed modules.
Running the agent with the `--update´ parameter will:
- Check for the last version of the agent
- Download it
- Save your agent settings
- Save your installed agent modules
- Install the new agent with the previously installed modules
- Retrieve previous settings
- Run the agent
Another convenient one-liner:
`curl -s https://raw.githubusercontent.com/ticgal/glpiagentutils/master/glpi-agent-wrapper.sh | sudo bash /dev/stdin --update`
#### --help
Self-explanatory :)
### [glpi-agent-autoupdater.sh](#glpi-agent-autoupdater.sh)
A deployable script to automate the creation of a service to update glpi-agent at computer startup
It relies on the `glpi-agent-wrapper.sh` to perform the update.
#### Supported OS
**`glpi-agent-autoupdater.sh`** should work with any operating system supported by the official `glpi-agent-linux-installer.pl` using **systemd**
It has been tested on:
- Ubuntu
#### How to use it
Just download and run
It was created to be distributed using GLPI Agent Deploy tasks ;)
# Contribute
PR, suggestions, or improvements are always welcome. Open an Issue and send a PR to be reviewed.