https://github.com/brunobord/lxcited
A bash-based remote control for LXC containers
https://github.com/brunobord/lxcited
bash lxc lxc-containers
Last synced: 11 months ago
JSON representation
A bash-based remote control for LXC containers
- Host: GitHub
- URL: https://github.com/brunobord/lxcited
- Owner: brunobord
- Created: 2015-08-26T14:43:18.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2018-08-21T09:24:54.000Z (almost 8 years ago)
- Last Synced: 2025-04-12T06:35:05.508Z (about 1 year ago)
- Topics: bash, lxc, lxc-containers
- Language: Shell
- Size: 19.5 KB
- Stars: 8
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
# LXCited
A bash-based remote control for LXC containers.
This script goal is to ease the common tasks when controlling LXC containers on a machine.
Why this? because is a [PITA](https://en.wiktionary.org/wiki/PITA) to constantly type the ``--name`` option while you *need* it (so it's not an option, it should be a mandatory argument for ``lxc-*`` commands).
## Install
It's a manual install. Don't worry, there aren't any hard step.
1. Copy the ``lxcited`` file somewhere in your ``$PATH``,
2. make sure it's executable (use ``chmod`` if necessary),
3. Copy the ``lxcited.autocomplete`` file somewhere,
4. Add the following to your ``.bashrc`` or ``.bash_profile``:
```sh
source /path/to/lxcited.autocomplete
```
### Trust me on this
This will install the latest master version of lxcited in your home environment.
```sh
mkdir -p ~/bin
curl -o ~/bin/lxcited https://raw.githubusercontent.com/brunobord/lxcited/master/lxcited
curl -o ~/bin/lxcited.autocomplete https://raw.githubusercontent.com/brunobord/lxcited/master/lxcited.autocomplete
chmod +x ~/bin/lxcited
echo '# LXCITED' >> .bashrc
echo 'export PATH=$HOME/bin/:$PATH' >> .bashrc
echo 'source $HOME/bin/lxcited.autocomplete' >> .bashrc
```
Next time you'll run "source .bashrc" (manually or when you'll log in), `lxcited` will be available.
If you want to simply update, just re-rerun the two cURL commands.
## Usage
**WARNING**: you **have** to be root to use this tool.
```sh
lxcited COMMAND
```
For example:
```sh
lxcited start what_a_beautiful_container
```
Get help with:
```sh
lxcited help
```
For more help on a specific command, simply type:
```sh
lxcited help destroy
```
### Autocomplete
You can autocomplete commands:
```
$ lxcited st
start stop
$ lxcited st
```
... or containers:
```
$ lxcited start deb
debian1 debian2 deborah
$ lxcited start deb
```
### Use lxcited along with `sudo`
For some reasons, when the `lxcited` executable is located in you ``~/bin`` or in some other custom path, ``sudo`` can't reach it and you can't run:
```sh
sudo lxcited
```
If you want to be able to run lxcited with ``sudo``, instead of installing it in a custom path, you can copy or symlink your file in ``/usr/local/bin`` or any other "well-known path" that will fit the ``sudo`` command.
## License
This piece of software is published under the terms of the WTFPL
See: http://www.wtfpl.net/ for more details, but here is its core term:
0. You just DO WHAT THE FUCK YOU WANT TO.