Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| services:olivetin [2025/05/06 06:29] – willy | services:olivetin [2025/05/11 18:27] (current) – [Configuration] willy | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Olivetin ====== | ====== Olivetin ====== | ||
| - | [[https:// | + | [[https:// |
| Line 21: | Line 21: | ||
| mv OliveTin-linux-amd64/ | mv OliveTin-linux-amd64/ | ||
| rmdir OliveTin-linux-amd64 | rmdir OliveTin-linux-amd64 | ||
| + | </ | ||
| + | |||
| + | As for the configuration file, i think it's a good idea to keep it under **/ | ||
| + | <code bash> | ||
| + | mkdir / | ||
| + | mv / | ||
| </ | </ | ||
| Line 29: | Line 35: | ||
| Please refer to [[selfhost: | Please refer to [[selfhost: | ||
| - | OliveTin | + | ==== OliveTin on subdomain ==== |
| + | |||
| + | This will enable your SSO login protection | ||
| + | <file - olivetin.conf> | ||
| + | server { | ||
| + | server_name olivetin.mydomain.com; | ||
| + | listen 8443 ssl; | ||
| + | listen 443 ssl; | ||
| + | |||
| + | access_log / | ||
| + | error_log / | ||
| + | | ||
| + | include " | ||
| + | |||
| + | location / { | ||
| + | include " | ||
| + | include " | ||
| + | | ||
| + | proxy_pass http:// | ||
| + | proxy_redirect http:// | ||
| + | } | ||
| + | | ||
| + | location /websocket { | ||
| + | include " | ||
| + | include " | ||
| + | |||
| + | proxy_set_header Upgrade " | ||
| + | proxy_set_header Connection " | ||
| + | proxy_pass http:// | ||
| + | } | ||
| + | | ||
| + | include com.mydomain/ | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ==== OliveTin on subpath ==== | ||
| + | |||
| + | OliveTin can be used on a subpath. While it is //not recomended//, | ||
| <file - olivetin.conf> | <file - olivetin.conf> | ||
| location /olivetin/ { | location /olivetin/ { | ||
| Line 54: | Line 97: | ||
| ===== Configuration ===== | ===== Configuration ===== | ||
| + | <file - config.yaml> | ||
| + | listenAddressSingleHTTPFrontend: | ||
| + | logLevel: " | ||
| + | themeName: home | ||
| + | |||
| + | checkForUpdates: | ||
| + | webUIDir: / | ||
| + | |||
| + | actions: | ||
| + | - title: Check Internet | ||
| + | shell: 'ping -c 1 1.1.1.1' | ||
| + | icon: ping | ||
| + | popupOnStart: | ||
| + | |||
| + | - title: ISP_1 | ||
| + | shell: 'ping -c 1 192.168.0.1' | ||
| + | icon: ping | ||
| + | popupOnStart: | ||
| + | |||
| + | - title: ISP_2 | ||
| + | shell: 'ping -c 1 192.168.1.254' | ||
| + | icon: ping | ||
| + | popupOnStart: | ||
| + | |||
| + | # Actions for containers | ||
| + | - title: Update containers | ||
| + | shell: '/ | ||
| + | hidden: true | ||
| + | execOnStartup: | ||
| + | execOnCron: '*/5 * * * *' | ||
| + | |||
| + | - title: Stop {{ container.name }} | ||
| + | shell: '{{ container.command }} stop' | ||
| + | icon: ping | ||
| + | popupOnStart: | ||
| + | entity: container | ||
| + | triggers: | ||
| + | - Update containers | ||
| + | |||
| + | - title: Update {{ container.name }} | ||
| + | shell: '{{ container.command }} update' | ||
| + | icon: ping | ||
| + | popupOnStart: | ||
| + | entity: container | ||
| + | triggers: | ||
| + | - Update containers | ||
| + | |||
| + | - title: Start {{ container.name }} | ||
| + | shell: '{{ container.command }} start' | ||
| + | icon: ping | ||
| + | popupOnStart: | ||
| + | entity: container | ||
| + | triggers: | ||
| + | - Update containers | ||
| + | |||
| + | # Actions for servers | ||
| + | - title: Update servers | ||
| + | shell: '/ | ||
| + | hidden: true | ||
| + | execOnStartup: | ||
| + | execOnCron: '*/5 * * * *' | ||
| + | |||
| + | - title: ping {{ server.ip }} | ||
| + | shell: 'ping {{ server.ip }} -c 1' | ||
| + | icon: ping | ||
| + | entity: server | ||
| + | |||
| + | entities: | ||
| + | - file: entities/ | ||
| + | name: server | ||
| + | |||
| + | - file: entities/ | ||
| + | name: container | ||
| + | |||
| + | dashboards: | ||
| + | - title: Home network | ||
| + | contents: | ||
| + | - title: Server {{ server.name }} | ||
| + | type: fieldset | ||
| + | entity: server | ||
| + | contents: | ||
| + | - type: display | ||
| + | cssClass: '{{ server.status }}' | ||
| + | title: | | ||
| + | < | ||
| + | < | ||
| + | - title: ping {{ server.ip }} | ||
| + | |||
| + | - title: servizi | ||
| + | contents: | ||
| + | - title: Servizio {{ container.name }} | ||
| + | type: fieldset | ||
| + | entity: container | ||
| + | contents: | ||
| + | - type: display | ||
| + | cssClass: '{{ container.state }}' | ||
| + | title: | | ||
| + | < | ||
| + | - title: "Start {{ container.name }}" | ||
| + | - title: "Stop {{ container.name }}" | ||
| + | - title: " | ||
| + | </ | ||
| + | |||
| + | <file - update_containers.sh> | ||
| + | #!/bin/bash | ||
| + | |||
| + | TARGET=/ | ||
| + | TARGET_TEMP=${TARGET}.tmp | ||
| + | |||
| + | test -e ${TARGET_TEMP} && rm -f ${TARGET_TEMP} | ||
| + | for i in / | ||
| + | do | ||
| + | name=${i## | ||
| + | $i status 2> /dev/null | grep started > /dev/null | ||
| + | if [ $? -eq 0 ] | ||
| + | then | ||
| + | running=running | ||
| + | else | ||
| + | running=stopped | ||
| + | fi | ||
| + | echo " | ||
| + | - name: $name | ||
| + | state: $running | ||
| + | command: $i | ||
| + | " >> ${TARGET_TEMP} | ||
| + | |||
| + | done | ||
| + | |||
| + | test -e ${TARGET_TEMP} && mv ${TARGET_TEMP} ${TARGET} | ||
| + | </ | ||
| + | |||
| + | <file - update_servers.sh> | ||
| + | #!/bin/bash | ||
| + | |||
| + | |||
| + | TARGET=/ | ||
| + | TARGET_TEMP=${TARGET}.tmp | ||
| + | |||
| + | test -e ${TARGET_TEMP} && rm -f ${TARGET_TEMP} | ||
| + | |||
| + | while read -r line | ||
| + | do | ||
| + | clean_line=${line%%# | ||
| + | ip=${clean_line%%[[: | ||
| + | name=${clean_line## | ||
| + | status=offline | ||
| + | if [ " | ||
| + | then | ||
| + | (ping -c 1 -w 1 $ip 2> /dev/null > /dev/null | ||
| + | if [ $? -eq 0 ] | ||
| + | then | ||
| + | status=online | ||
| + | fi | ||
| + | echo " | ||
| + | - name: $name | ||
| + | ip: $ip | ||
| + | status: $status" | ||
| + | fi | ||
| + | done < "/ | ||
| + | |||
| + | wait | ||
| + | test -e ${TARGET_TEMP} && mv ${TARGET_TEMP} ${TARGET} | ||
| + | </ | ||
| + | |||
| + | |||
| + | <file - theme.css> | ||
| + | div.display.running { | ||
| + | background-color: | ||
| + | color: white; | ||
| + | } | ||
| + | |||
| + | div.display.stopped { | ||
| + | background-color: | ||
| + | } | ||
| + | |||
| + | div.display.online { | ||
| + | background-color: | ||
| + | color: white; | ||
| + | } | ||
| + | |||
| + | div.display.offline { | ||
| + | background-color: | ||
| + | } | ||
| + | </ | ||
| ===== Autostart ===== | ===== Autostart ===== | ||
| - | OliveTin provides a SystemD service file. If you, like me, prefeer to use OpenRC, | + | OliveTin provides |
| Drop the following to **/ | Drop the following to **/ | ||
| Line 69: | Line 296: | ||
| command_background=true | command_background=true | ||
| command="/ | command="/ | ||
| - | command_args=" | + | command_args="" |
| output_log="/ | output_log="/ | ||
| output_err="/ | output_err="/ | ||