138 lines
3.7 KiB
YAML
138 lines
3.7 KiB
YAML
# 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
|
|
|
|
# Choose from INFO (default), WARN and DEBUG
|
|
logLevel: "INFO"
|
|
|
|
# Actions (buttons) to show up on the WebUI:
|
|
actions:
|
|
- title: Restart media container
|
|
shell: docker restart mediacontainer
|
|
icon: box
|
|
entity: container
|
|
|
|
- title: Check disk space
|
|
icon: disk
|
|
shell: df -h /media
|
|
popupOnStart: execution-dialog-stdout-only
|
|
|
|
- title: check dmesg logs
|
|
shell: dmesg | tail
|
|
icon: logs
|
|
popupOnStart: execution-dialog
|
|
|
|
|
|
# This will run a simple script that you create.
|
|
- title: Run backup script
|
|
shell: /opt/backupScript.sh
|
|
shellAfterCompleted: "apprise -t 'Notification: Backup script completed' -b 'The backup script completed with code {{ exitCode}}. The log is: \n {{ stdout }} '"
|
|
maxConcurrent: 1
|
|
timeout: 10
|
|
icon: backup
|
|
popupOnStart: execution-dialog
|
|
|
|
- title: date
|
|
shell: date
|
|
timeout: 6
|
|
icon: clock
|
|
popupOnStart: execution-button
|
|
|
|
# This will send 1 ping (-c 1)
|
|
# Docs: https://docs.olivetin.app/action-ping.html
|
|
- title: Ping host
|
|
shell: ping {{ host }} -c {{ count }}
|
|
icon: ping
|
|
timeout: 100
|
|
arguments:
|
|
- name: host
|
|
title: host
|
|
type: ascii_identifier
|
|
default: example.com
|
|
description: The host that you want to ping
|
|
|
|
- name: count
|
|
title: Count
|
|
type: int
|
|
default: 1
|
|
description: How many times to do you want to ping?
|
|
|
|
# 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.
|
|
#
|
|
# You probably want a much longer timeout as well (so that ansible completes).
|
|
- title: "Run Ansible Playbook"
|
|
icon: "🇦"
|
|
shell: ansible-playbook -i /etc/hosts /root/myRepo/myPlaybook.yaml
|
|
timeout: 120
|
|
|
|
# Restart httpd on host "server1"
|
|
# Docs: https://docs.olivetin.app/action-ping.html
|
|
- title: restart httpd on server1
|
|
titleAlias: restart_httpd
|
|
icon: restart
|
|
timeout: 1
|
|
shell: ssh root@server1 'service httpd restart'
|
|
|
|
# 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.
|
|
#
|
|
# Docs: https://docs.olivetin.app/action-container-control.html
|
|
- title: Restart Docker Container
|
|
icon: restart
|
|
shell: docker restart {{ container }}
|
|
arguments:
|
|
- name: container
|
|
title: Container name
|
|
choices:
|
|
- value: plex
|
|
- value: traefik
|
|
- value: grafana
|
|
|
|
- title: Delete old backups
|
|
icon: ashtonished
|
|
shell: rm -rf /opt/oldBackups/
|
|
arguments:
|
|
- type: confirmation
|
|
title: Are you sure?!
|
|
|
|
- title: Server1 Power Off
|
|
shell: echo "Power Off Server 1"
|
|
|
|
- title: Server2 Wake On LAN
|
|
shell: echo "Sending Wake on LAN to Server 2"
|
|
|
|
- title: Server2 Power Off
|
|
shell: echo "Power Off Server 2"
|
|
|
|
- title: Ping All Servers
|
|
shell: echo "Ping all servers"
|
|
icon: ping
|
|
|
|
dashboards:
|
|
- title: My Servers
|
|
contents:
|
|
- title: Server Power Controls
|
|
type: fieldset
|
|
contents:
|
|
- title: Server 1
|
|
contents:
|
|
- link: Server1 Power Off
|
|
|
|
- title: Server 2
|
|
contents:
|
|
- link: Server2 Wake On LAN
|
|
- link: Server2 Power Off
|
|
|
|
- title: Server Utilities
|
|
type: fieldset
|
|
contents:
|
|
- link: Ping All Servers
|