From 12d8e423ba70b3fac25e0e80a767348d837c3620 Mon Sep 17 00:00:00 2001 From: STAM Date: Thu, 27 Feb 2020 15:51:10 +0300 Subject: [PATCH] cleanup --- _experemental/ovm/.docker-repository.yml | 1 - _experemental/ovm/.dockerignore | 3 - _experemental/ovm/Dockerfile | 50 ---------- _experemental/ovm/Makefile | 4 - _experemental/ovm/README.md | 30 ------ _experemental/ovm/container.ini | 6 -- _experemental/ovm/omv-startup | 121 ----------------------- _experemental/ovm/openmediavault.list | 2 - 8 files changed, 217 deletions(-) delete mode 100644 _experemental/ovm/.docker-repository.yml delete mode 100644 _experemental/ovm/.dockerignore delete mode 100644 _experemental/ovm/Dockerfile delete mode 100644 _experemental/ovm/Makefile delete mode 100644 _experemental/ovm/README.md delete mode 100644 _experemental/ovm/container.ini delete mode 100644 _experemental/ovm/omv-startup delete mode 100644 _experemental/ovm/openmediavault.list diff --git a/_experemental/ovm/.docker-repository.yml b/_experemental/ovm/.docker-repository.yml deleted file mode 100644 index 6bf9e2675..000000000 --- a/_experemental/ovm/.docker-repository.yml +++ /dev/null @@ -1 +0,0 @@ -repository: epicmorg/balancer diff --git a/_experemental/ovm/.dockerignore b/_experemental/ovm/.dockerignore deleted file mode 100644 index f5523d40c..000000000 --- a/_experemental/ovm/.dockerignore +++ /dev/null @@ -1,3 +0,0 @@ -.git -scripts -.idea diff --git a/_experemental/ovm/Dockerfile b/_experemental/ovm/Dockerfile deleted file mode 100644 index 887d1ae39..000000000 --- a/_experemental/ovm/Dockerfile +++ /dev/null @@ -1,50 +0,0 @@ -FROM debian:buster -MAINTAINER Anatoliy Zimovskiy - -ENV DEBIAN_FRONTEND noninteractive - -#editing sources list -RUN rm /etc/apt/sources.list -COPY sources.list /etc/apt/sources.list - -COPY locale.gen /etc/locale.gen - -# fix errors -RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections - -#installing utils -RUN apt-get update && apt-get install -y --allow-unauthenticated ca-certificates gnupg sudo apt-transport-https lsb-release apt-utils locales console-cyrillic wget curl htop mc tmux iftop cmatrix iputils-ping cmatrix-xfont lsof lynx fontconfig smbclient nano - - -#installing packages -RUN gpg --keyserver keyserver.ubuntu.com --recv 7E7A6C592EF35D13 -RUN gpg --keyserver keyserver.ubuntu.com --recv 24863F0C716B980B -RUN wget -qO - http://packages.openmediavault.org/public/archive.key | sudo apt-key add - -COPY openmediavault.list /etc/apt/sources.list.d/openmediavault.list -RUN apt-get update && apt-get install -y --allow-unauthenticated openmediavault-keyring postfix openmediavault - - -#After install fixes -#RUN localedef en_US.UTF-8 -i en_US -f UTF-8 -#RUN update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 -#RUN apt update -#RUN apt upgrade -y -#RUN apt dist-upgrade -y -#RUN apt-get clean autoclean -#RUN apt-get autoremove -y -#RUN rm -rf /var/lib/apt/lists/* - -#final config -# We need to make sure rrdcached uses /data for it's data -COPY defaults/rrdcached /etc/default - -# Add our startup script last because we don't want changes -# to it to require a full container rebuild -COPY omv-startup /usr/sbin/omv-startup -RUN chmod +x /usr/sbin/omv-startup - -EXPOSE 8080 8443 - -VOLUME /data - -ENTRYPOINT /usr/sbin/omv-startup diff --git a/_experemental/ovm/Makefile b/_experemental/ovm/Makefile deleted file mode 100644 index 80be0b359..000000000 --- a/_experemental/ovm/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -all: ovm - -ovm: - docker build --compress -t epicmorg/ovm . diff --git a/_experemental/ovm/README.md b/_experemental/ovm/README.md deleted file mode 100644 index 034784bc0..000000000 --- a/_experemental/ovm/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# Compose example - -```yml -version: '3.7' -services: - balancer: - image: epicmorg/balancer - restart: unless-stopped - ports: - - "0.0.0.0:80:80" - - "0.0.0.0:443:443" - volumes: - - /etc/localtime:/etc/localtime - - /etc/timezone:/etc/timezone - - /etc/letsencrypt:/etc/letsencrypt - - nginx:/etc/nginx - - nginx-usr:/usr/share/nginx/html - - /var/lib/nginx -# extra_hosts: -# - "example.com:192.168.0.11" - depends_on: - - websites - tmpfs: - - /tmp -volumes: - nginx: - external: true - nginx-usr: - external: true -``` diff --git a/_experemental/ovm/container.ini b/_experemental/ovm/container.ini deleted file mode 100644 index a18ed0174..000000000 --- a/_experemental/ovm/container.ini +++ /dev/null @@ -1,6 +0,0 @@ -[nginx] -httpPort = '8080'; -httpsPort = '8443'; - -[data] -alwaysClear = 'false'; diff --git a/_experemental/ovm/omv-startup b/_experemental/ovm/omv-startup deleted file mode 100644 index 48c7deb77..000000000 --- a/_experemental/ovm/omv-startup +++ /dev/null @@ -1,121 +0,0 @@ -#!/bin/bash - -set -e - -# Config parser code from https://github.com/chilladx/config-parser -config_parser () { - local iniFile="$1"; - local tmpFile=$( mktemp /tmp/`basename $iniFile`.XXXXXX ); - local intLines; - local binSED=$( which sed ); - - # copy the ini file to the temporary location - cp $iniFile $tmpFile; - - # remove tabs or spaces around the = - $binSED -i -e 's/[ \t]*=[ \t]*/=/g' $tmpFile; - - # transform section labels into function declaration - $binSED -i -e 's/\[\([A-Za-z0-9_]*\)\]/config.section.\1() \{/g' $tmpFile; - $binSED -i -e 's/config\.section\./\}\'$'\nconfig\.section\./g' $tmpFile; - - # remove first line - $binSED -i -e '1d' $tmpFile; - - # add the last brace - echo -e "\n}" >> $tmpFile; - - # now load the file - source $tmpFile; - - # clean up - rm -f $tmpFile; -} - -if [ -e /data/container.ini ]; then - config_parser "/data/container.ini" -fi - -if [[ "$(type -t config.section.data)" == "function" ]]; then - config.section.data -fi - -if [ "${alwaysClear}" = "true" ]; then - echo Clearing data because config says so... - - rm -Rf /data/etc - rm -Rf /data/var -fi - -if [ ! -e /data/etc ] || [ ! -e /data/var ]; then - FIRST_RUN=true - - if [ ! -e /data/etc ]; then - echo Creating initial configuration... - - mkdir -p /data/etc - - mv /etc/openmediavault /data/etc - mv /etc/default /data/etc - mv /etc/nginx /data/etc - fi - - if [ ! -e /data/var ]; then - echo Creating persistent data directory... - - mkdir /data/var - - mv /var/log /data/var/log - fi -else - FIRST_RUN=false - - rm -Rf /etc/openmediavault - rm -Rf /etc/default - rm -Rf /etc/nginx - - rm -Rf /var/log -fi - -echo Linking in configuration and data... -ln -s /data/etc/openmediavault /etc/openmediavault -ln -s /data/etc/default /etc/default -ln -s /data/etc/nginx /etc/nginx - -ln -s /data/var/log /var/log - -if [ "${FIRST_RUN}" = "true" ]; then - echo Initializing OpenMediaVault... - sed 's/OMV_DEBUG_\(.*\)=.*/OMV_DEBUG_\1="yes"/' -i /etc/default/openmediavault - omv-initsystem $(find /usr/share/openmediavault/initsystem ! -name '*rootfs' ! -name '*sysctl' -type f -printf "%f\n" | sort | xargs) -fi - -if [[ "$(type -t config.section.nginx)" == "function" ]]; then - config.section.nginx -fi - -if [ ! -z "${httpPort}" ]; then - sed -i "s|listen \(.*\):[0-9][0-9]* \(.*\)|listen \1:${httpPort} \2|g" /etc/nginx/sites-available/openmediavault-webgui -fi - -if [ ! -z "${httpsPort}" ]; then - sed -i "s|listen \(.*\):[0-9][0-9]* \(.*\) ssl \(.*\)|:listen \1:${httpsPort} \2 ssl \3|g" /etc/nginx/sites-available/openmediavault-webgui -fi - -SERVICES="motd openmediavault php5-fpm rrdcached rsyslog sudo anacron ntp openmediavault-engined cron postfix nginx collectd rc.local monit" - -for EACH in ${SERVICES}; do - /etc/init.d/${EACH} start -done - -if [[ -e /data/startup.sh ]]; then - /data/startup.sh -fi - -if [ -t 0 ]; then - /bin/bash -else - while true; do - sleep 1000 & wait $! - done -fi diff --git a/_experemental/ovm/openmediavault.list b/_experemental/ovm/openmediavault.list deleted file mode 100644 index 297a4a83b..000000000 --- a/_experemental/ovm/openmediavault.list +++ /dev/null @@ -1,2 +0,0 @@ -deb http://packages.openmediavault.org/public usul main partner -deb http://packages.openmediavault.org/public usul-proposed main