From 11dad79794fec0d499848fb1870270dacfa21f14 Mon Sep 17 00:00:00 2001
From: jamesread
-OliveTin gives **safe** and **simple** access to predefined shell commands from a web interface.
+OliveTin gives **safe** and **simple** access to predefined shell commands from a web interface.
[](https://discord.gg/jhYWWpNJ3v)
[](https://github.com/awesome-selfhosted/awesome-selfhosted#automation)
@@ -11,7 +11,7 @@ OliveTin gives **safe** and **simple** access to predefined shell commands from
[](https://goreportcard.com/report/github.com/OliveTin/OliveTin)
[](https://github.com/OliveTin/OliveTin/actions/workflows/build-snapshot.yml)
-## Use cases
+## Use cases
**Safely** give access to commands, for less technical people;
@@ -34,10 +34,10 @@ OliveTin gives **safe** and **simple** access to predefined shell commands from
## Features
* **Responsive, touch-friendly UI** - great for tablets and mobile
-* **Super simple config in YAML** - because if it's not YAML now-a-days, it's not "cloud native" :-)
+* **Super simple config in YAML** - because if it's not YAML now-a-days, it's not "cloud native" :-)
* **Dark mode** - for those of you that roll that way.
-* **Accessible** - passes all the accessibility checks in Firefox, and issues with accessibility are taken seriously.
-* **Container** - available for quickly testing and getting it up and running, great for the selfhosted community.
+* **Accessible** - passes all the accessibility checks in Firefox, and issues with accessibility are taken seriously.
+* **Container** - available for quickly testing and getting it up and running, great for the selfhosted community.
* **Integrate with anything** - OliveTin just runs Linux shell commands, so theoretially you could integrate with a bunch of stuff just by using curl, ping, etc. However, writing your own shell scripts is a great way to extend OliveTin.
* **Lightweight on resources** - uses only a few MB of RAM and barely any CPU. Written in Go, with a web interface written as a modern, responsive, Single Page App that uses the REST/gRPC API.
* **Good amount of unit tests and style checks** - helps potential contributors be consistent, and helps with maintainability.
@@ -48,17 +48,17 @@ Desktop web browser;

-Desktop web browser (dark mode);
+Desktop web browser (dark mode);

-Mobile screen size (responsive layout);
+Mobile screen size (responsive layout);

## Documentation
-All documentation can be found at http://docs.olivetin.app . This includes installation and usage guide, etc.
+All documentation can be found at http://docs.olivetin.app . This includes installation and usage guide, etc.
### Quickstart reference for `config.yaml`
@@ -75,19 +75,19 @@ Put this `config.yaml` in `/etc/OliveTin/` if you're running a standard service,
```yaml
# Listen on all addresses available, port 1337
-listenAddressSingleHTTPFrontend: 0.0.0.0:1337
+listenAddressSingleHTTPFrontend: 0.0.0.0:1337
# Choose from INFO (default), WARN and DEBUG
logLevel: "INFO"
# Actions (buttons) to show up on the WebUI:
-actions:
- # Docs: https://docs.olivetin.app/action-container-control.html
+actions:
+ # Docs: https://docs.olivetin.app/action-container-control.html
- title: Restart Plex
icon: restart
shell: docker restart plex
-
- # This will send 1 ping
+
+ # This will send 1 ping
# Docs: https://docs.olivetin.app/action-ping.html
- title: Ping host
shell: ping {{ host }} -c {{ count }}
@@ -102,7 +102,7 @@ actions:
title: Count
type: int
default: 1
-
+
# Restart http on host "webserver1"
# Docs: https://docs.olivetin.app/action-ssh.html
- title: restart httpd
@@ -111,4 +111,3 @@ actions:
```
A full example config can be found at in this repository - [config.yaml](https://github.com/OliveTin/OliveTin/blob/main/config.yaml).
-
diff --git a/SECURITY.md b/SECURITY.md
index e852ab0..f0a4010 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -2,7 +2,7 @@
## Supported Versions
-Currently, only the `main` branch is "supported".
+Currently, only the `main` branch is "supported".
| Version | Supported |
| ------- | ------------------ |
@@ -10,4 +10,4 @@ Currently, only the `main` branch is "supported".
## Reporting a Vulnerability
-Please email `contact@jread.com` for responsible disclosure. Accepted issues will be made public once patched, and you will be given credit.
+Please email `contact@jread.com` for responsible disclosure. Accepted issues will be made public once patched, and you will be given credit.
diff --git a/buf.gen.yaml b/buf.gen.yaml
index ae3bb91..c5b5b9b 100644
--- a/buf.gen.yaml
+++ b/buf.gen.yaml
@@ -17,4 +17,3 @@ plugins:
# - name: openapiv2
# out: reports/openapiv2
-
diff --git a/buf.yaml b/buf.yaml
index ef2ec64..a8230a7 100644
--- a/buf.yaml
+++ b/buf.yaml
@@ -1,5 +1,5 @@
version: v1
-deps:
+deps:
- buf.build/googleapis/googleapis
lint:
use:
diff --git a/config.yaml b/config.yaml
index a7ac3f3..4a03017 100644
--- a/config.yaml
+++ b/config.yaml
@@ -1,15 +1,15 @@
-# There is a built-in micro proxy that will host the webui and REST API all on
-# one port (this is called the "Single HTTP Frontend") and means you just need
-# one open port in the container/firewalls/etc.
+# There is a built-in micro proxy that will host the webui and REST API all on
+# one port (this is called the "Single HTTP Frontend") and means you just need
+# one open port in the container/firewalls/etc.
#
# Listen on all addresses available, port 1337
-listenAddressSingleHTTPFrontend: 0.0.0.0:1337
+listenAddressSingleHTTPFrontend: 0.0.0.0:1337
# Choose from INFO (default), WARN and DEBUG
logLevel: "INFO"
# Actions (buttons) to show up on the WebUI:
-actions:
+actions:
# This will run a simple script that you create.
- title: Run backup script
shell: /opt/backupScript.sh
@@ -32,15 +32,15 @@ actions:
type: int
default: 1
description: How many times to do you want to ping?
-
+
# Restart lightdm on host "server1"
# Docs: https://docs.olivetin.app/action-ping.html
- title: restart httpd
icon: restart
shell: ssh root@server1 'service httpd restart'
- # OliveTin can run long-running jobs like Ansible playbooks.
- #
+ # OliveTin can run long-running jobs like Ansible playbooks.
+ #
# For such jobs, you will need to install ansible-playbook on the host where
# you are running OliveTin, or in the container.
#
@@ -51,7 +51,7 @@ actions:
timeout: 120
# OliveTin can control containers - docker is just a command line app.
- #
+ #
# However, if you are running in a container you will need to do some setup,
# see the docs below.
#
@@ -76,4 +76,3 @@ actions:
shell: sleep 5
timeout: 5
icon: "😪"
-
diff --git a/integration-tests/Makefile b/integration-tests/Makefile
index a001d2f..e7dbf2c 100644
--- a/integration-tests/Makefile
+++ b/integration-tests/Makefile
@@ -1,6 +1,6 @@
cypress:
npm install
./cypressRun.sh "general"
- ./cypressRun.sh "hiddenNav"
+ ./cypressRun.sh "hiddenNav"
.PHONY: cypress container
diff --git a/integration-tests/README.md b/integration-tests/README.md
index f4ddc4b..491677f 100644
--- a/integration-tests/README.md
+++ b/integration-tests/README.md
@@ -1 +1 @@
-# OliveTin-integration-tests
\ No newline at end of file
+# OliveTin-integration-tests
diff --git a/integration-tests/Vagrantfile b/integration-tests/Vagrantfile
index c11afd7..a50228e 100644
--- a/integration-tests/Vagrantfile
+++ b/integration-tests/Vagrantfile
@@ -2,7 +2,7 @@
# (eg, snapshot builds on GitHub)
-Vagrant.configure("2") do |config|
+Vagrant.configure("2") do |config|
config.vm.box = "generic/centos8"
config.vm.provision "shell", inline: "mkdir /etc/OliveTin && chmod o+w /etc/OliveTin/", privileged: true
config.vm.provision "file", source: "configs/config.general.yaml/.", destination: "/etc/OliveTin/config.yaml"
diff --git a/integration-tests/configs/config.general.yaml b/integration-tests/configs/config.general.yaml
index a3b0b0e..eb34858 100644
--- a/integration-tests/configs/config.general.yaml
+++ b/integration-tests/configs/config.general.yaml
@@ -1,17 +1,17 @@
#
# Integration Test Config: General
-#
+#
-listenAddressSingleHTTPFrontend: 0.0.0.0:1337
+listenAddressSingleHTTPFrontend: 0.0.0.0:1337
logLevel: "DEBUG"
-checkForUpdates: false
+checkForUpdates: false
-actions:
+actions:
- title: Ping Google.com
shell: ping google.com -c 1
icon: ping
-
+
- title: restart lightdm
icon: poop
shell: ssh root@overseer 'service lightdm restart'
@@ -32,4 +32,3 @@ actions:
- title: Restart Plex
icon: smile
shell: docker restart plex
-
diff --git a/integration-tests/configs/config.hiddenFooter.yaml b/integration-tests/configs/config.hiddenFooter.yaml
index 9565139..a2fc7fa 100644
--- a/integration-tests/configs/config.hiddenFooter.yaml
+++ b/integration-tests/configs/config.hiddenFooter.yaml
@@ -1,12 +1,12 @@
#
# Integration Test Config: General
-#
+#
showFooter: false
-checkForUpdates: false
+checkForUpdates: false
# Actions (buttons) to show up on the WebUI:
-actions:
+actions:
- title: Ping example.com
shell: ping example.com -c 1
icon: ping
diff --git a/integration-tests/configs/config.hiddenNav.yaml b/integration-tests/configs/config.hiddenNav.yaml
index f3ec261..4f32e94 100644
--- a/integration-tests/configs/config.hiddenNav.yaml
+++ b/integration-tests/configs/config.hiddenNav.yaml
@@ -1,14 +1,14 @@
#
# Integration Test Config: General
-#
+#
-listenAddressSingleHTTPFrontend: 0.0.0.0:1337
+listenAddressSingleHTTPFrontend: 0.0.0.0:1337
showNavigation: false
-checkForUpdates: false
+checkForUpdates: false
# Actions (buttons) to show up on the WebUI:
-actions:
+actions:
- title: Ping example.com
shell: ping example.com -c 1
icon: ping
diff --git a/integration-tests/cypress/integration/general/defaultHomepageRender.spec.js b/integration-tests/cypress/integration/general/defaultHomepageRender.spec.js
index 8c54410..f6c38d4 100644
--- a/integration-tests/cypress/integration/general/defaultHomepageRender.spec.js
+++ b/integration-tests/cypress/integration/general/defaultHomepageRender.spec.js
@@ -17,5 +17,3 @@ describe('Homepage rendering', () => {
})
})
});
-
-
diff --git a/integration-tests/cypress/integration/hiddenFooter/hiddenFooter.spec.js b/integration-tests/cypress/integration/hiddenFooter/hiddenFooter.spec.js
index faf5f52..c19965f 100644
--- a/integration-tests/cypress/integration/hiddenFooter/hiddenFooter.spec.js
+++ b/integration-tests/cypress/integration/hiddenFooter/hiddenFooter.spec.js
@@ -10,5 +10,3 @@ describe('Hidden Footer', () => {
})
})
});
-
-
diff --git a/integration-tests/cypress/integration/hiddenNav/hiddenNav.spec.js b/integration-tests/cypress/integration/hiddenNav/hiddenNav.spec.js
index 387bf20..abb6602 100644
--- a/integration-tests/cypress/integration/hiddenNav/hiddenNav.spec.js
+++ b/integration-tests/cypress/integration/hiddenNav/hiddenNav.spec.js
@@ -14,5 +14,3 @@ describe('Hidden Nav', () => {
})
})
});
-
-
diff --git a/integration-tests/cypress/support/commands.js b/integration-tests/cypress/support/commands.js
index 72b085b..119ab03 100644
--- a/integration-tests/cypress/support/commands.js
+++ b/integration-tests/cypress/support/commands.js
@@ -23,4 +23,3 @@
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
-
diff --git a/integration-tests/cypressRun.sh b/integration-tests/cypressRun.sh
index 9732a15..da959c1 100755
--- a/integration-tests/cypressRun.sh
+++ b/integration-tests/cypressRun.sh
@@ -8,4 +8,3 @@ cp -f ./configs/config.$1.yaml ./configs/config.yaml
docker start olivetin
NO_COLOR=1 ./node_modules/.bin/cypress run --headless -s cypress/integration/$1/* || true
docker kill olivetin
-
diff --git a/var/initscript/OliveTin b/var/initscript/OliveTin
index 4942037..b8b6779 100755
--- a/var/initscript/OliveTin
+++ b/var/initscript/OliveTin
@@ -48,7 +48,7 @@ stop()
status() {
PID=$(pidof OliveTin)
- RETVAL=$?
+ RETVAL=$?
if [ $RETVAL -eq 1 ] ; then
echo "OliveTin is stopped"
diff --git a/var/openrc/OliveTin b/var/openrc/OliveTin
index 9d7f3d3..bf112ff 100755
--- a/var/openrc/OliveTin
+++ b/var/openrc/OliveTin
@@ -4,4 +4,4 @@ name=$RC_SVCNAME
description="OliveTin"
command="/usr/local/bin/OliveTin"
pidfile="/run/${RC_SVCNAME}.pid"
-command_background=true
\ No newline at end of file
+command_background=true
diff --git a/webui/index.html b/webui/index.html
index f806fca..4fd8298 100644
--- a/webui/index.html
+++ b/webui/index.html
@@ -63,10 +63,10 @@
@@ -124,7 +124,7 @@