diff --git a/.markdownlint-cli2.jsonc b/.markdownlint-cli2.jsonc index 3c199541f..fbad9c8e5 100644 --- a/.markdownlint-cli2.jsonc +++ b/.markdownlint-cli2.jsonc @@ -1,23 +1,17 @@ { - // Markdownlint configuration to temporarily ignore problematic files - "globs": [ - "*.md", - "docs/**/*.md" - ], - "ignores": [ - "docs/build-server-setup.md", - "LOGO-IMPLEMENTATION.md" - ], - "config": { - // Allow some common formatting that's hard to fix automatically - "MD022": false, // blanks-around-headings - "MD032": false, // blanks-around-lists - "MD031": false, // blanks-around-fences - "MD009": false, // no-trailing-spaces - "MD012": false, // no-multiple-blanks - "MD026": false, // no-trailing-punctuation - "MD029": false, // ol-prefix - "MD040": false, // fenced-code-language - "MD047": false // single-trailing-newline - } -} \ No newline at end of file + // Markdownlint configuration to temporarily ignore problematic files + "globs": ["*.md", "docs/**/*.md"], + "ignores": ["docs/build-server-setup.md", "LOGO-IMPLEMENTATION.md"], + "config": { + // Allow some common formatting that's hard to fix automatically + "MD022": false, // blanks-around-headings + "MD032": false, // blanks-around-lists + "MD031": false, // blanks-around-fences + "MD009": false, // no-trailing-spaces + "MD012": false, // no-multiple-blanks + "MD026": false, // no-trailing-punctuation + "MD029": false, // ol-prefix + "MD040": false, // fenced-code-language + "MD047": false, // single-trailing-newline + }, +} diff --git a/.prettierrc.cjs b/.prettierrc.cjs index 36c78e8ac..56590bfe3 100644 --- a/.prettierrc.cjs +++ b/.prettierrc.cjs @@ -21,7 +21,7 @@ module.exports = { 'prettier-plugin-nginx', 'prettier-plugin-sh', 'prettier-plugin-sql', - ]) + ]), ], // PHP Settings phpVersion: '8.2', diff --git a/README.md b/README.md index 44aa13178..28c17b531 100644 --- a/README.md +++ b/README.md @@ -60,11 +60,13 @@ TulioCP provides an official APT repository for easy installation and updates. O ### ๐ŸŽฏ Quick Installation **Method 1: One-Line Installation (Recommended)** + ```bash curl -sSL https://apt.tuliocp.com/setup.sh | sudo bash ``` **Method 2: Direct Installer** + ```bash wget https://raw.githubusercontent.com/contaura/tuliocp/main/install/hst-install.sh sudo bash hst-install.sh @@ -73,9 +75,9 @@ sudo bash hst-install.sh ### ๐Ÿ“‹ Available Packages - **tuliocp** - Main control panel package (1.8MB) - **Available Now** -- **tulio-nginx** - Custom Nginx build optimized for TulioCP - *Coming Soon* -- **tulio-php** - Custom PHP-FPM build with enhanced performance - *Coming Soon* -- **tulio-web-terminal** - Browser-based terminal interface - *Coming Soon* +- **tulio-nginx** - Custom Nginx build optimized for TulioCP - _Coming Soon_ +- **tulio-php** - Custom PHP-FPM build with enhanced performance - _Coming Soon_ +- **tulio-web-terminal** - Browser-based terminal interface - _Coming Soon_ ### ๐Ÿ”ง Manual Repository Setup @@ -97,7 +99,7 @@ sudo apt install --allow-unauthenticated tuliocp ### ๐Ÿ—๏ธ System Requirements - **Operating Systems**: Debian 10/11/12, Ubuntu 20.04/22.04/24.04 LTS -- **Architecture**: amd64 (x86_64) - *arm64 coming soon* +- **Architecture**: amd64 (x86*64) - \_arm64 coming soon* - **Memory**: Minimum 1GB RAM (2GB+ recommended) - **Storage**: 10GB+ available disk space - **Network**: Internet connection for package installation @@ -111,18 +113,21 @@ sudo apt install --allow-unauthenticated tuliocp Our automated build system provides: #### ๐Ÿ“ฆ **Package Building** + - **Trigger**: Every push to `main` branch - **Build Server**: Self-hosted runner with TulioCP dependencies - **Process**: Automated DEB package compilation - **Output**: Production-ready `tuliocp_1.10.0~alpha_amd64.deb` packages #### ๐Ÿ”’ **Secure Deployment** + - **Webhook**: HTTPS webhook handler (port 8443) - **Authentication**: GitHub token-based secure deployment - **Target**: GitHub Pages with custom domain - **Structure**: Full Debian APT repository format #### ๐ŸŒ **Live Repository Features** + - **Custom Domain**: https://apt.tuliocp.com (via CNAME to contaura.github.io) - **Modern Interface**: Professional repository page with copy-to-clipboard commands - **Package Metadata**: Complete `Packages.gz` and `Release` files @@ -142,11 +147,13 @@ Our automated build system provides: ### ๐Ÿš€ Quick Installation **Method 1: One-Line Installation (Recommended)** + ```bash curl -sSL https://apt.tuliocp.com/setup.sh | sudo bash ``` **Method 2: Direct Installation** + ```bash # Download and run installer wget https://raw.githubusercontent.com/contaura/tuliocp/main/install/hst-install.sh @@ -154,6 +161,7 @@ sudo bash hst-install.sh ``` **Method 3: Manual APT Repository Setup** + ```bash # Manual repository configuration echo "deb https://apt.tuliocp.com stable main" | sudo tee /etc/apt/sources.list.d/tuliocp.list @@ -164,11 +172,13 @@ sudo apt install --allow-unauthenticated tuliocp ### ๐Ÿ”ง Connection Methods **Local Console:** + ```bash sudo bash hst-install.sh ``` **Remote SSH:** + ```bash ssh root@your.server wget https://raw.githubusercontent.com/contaura/tuliocp/main/install/hst-install.sh @@ -176,6 +186,7 @@ bash hst-install.sh ``` **SSL Certificate Issues:** + ```bash # If download fails due to SSL validation sudo apt update && sudo apt install ca-certificates @@ -197,6 +208,7 @@ bash hst-install.sh -h ``` Common options: + - `--interactive` - Interactive installation with prompts - `--force` - Skip compatibility checks - `--hostname` - Set custom hostname @@ -213,12 +225,14 @@ Common options: ### ๐Ÿ”ง Manual Updates **Via APT (Recommended):** + ```bash # Update package lists and upgrade TulioCP sudo apt update && sudo apt upgrade tuliocp ``` **Traditional Method:** + ```bash # System-wide updates (includes TulioCP) sudo apt update && sudo apt upgrade @@ -229,11 +243,13 @@ sudo apt update && sudo apt upgrade ### ๐Ÿš€ Quick Development Setup **Prerequisites:** + - Node.js 18+ (tested with v22.19.0) - Git - macOS/Linux development environment **One-Command Setup:** + ```bash # Clone repository and setup development environment git clone https://github.com/contaura/tuliocp.git @@ -254,11 +270,13 @@ The development environment provides: ### ๐Ÿ“ฆ Frontend Asset Building **Build all assets:** + ```bash npm run build ``` **Build outputs:** + - `web/js/dist/main.min.js` - Main application bundle - `web/js/dist/*.min.js` - External packages (Alpine.js, Chart.js, xterm, etc.) - `web/css/themes/*.min.css` - CSS themes with source maps @@ -311,11 +329,13 @@ After running `./dev-installer.sh`, you get convenient shortcuts: ### ๐Ÿ” Environment Debugging **Verify setup:** + ```bash ./debug-installer.sh ``` **Check build status:** + ```bash ~/.local/share/tuliocp-dev/status.sh ``` @@ -323,18 +343,21 @@ After running `./dev-installer.sh`, you get convenient shortcuts: ### ๐Ÿ—๏ธ Frontend Architecture **JavaScript Build:** + - **Tool**: esbuild for fast bundling and minification - **Entry**: `web/js/src/index.js` - **Output**: Bundled main.min.js + separate external packages - **Features**: Source maps, tree shaking, ES modules **CSS Build:** + - **Tool**: Lightning CSS for processing and optimization - **Source**: `web/css/src/themes/*.css` - **Output**: Minified themes with browser targeting - **Features**: CSS nesting, custom media queries, autoprefixer **Key Dependencies:** + - **Frontend**: Alpine.js (reactive), Chart.js (statistics), xterm.js (terminal) - **Build**: esbuild (JS), Lightning CSS (CSS), Browserslist (targets) - **Quality**: Biome (JS linting), Stylelint (CSS), Prettier (formatting) @@ -342,13 +365,15 @@ After running `./dev-installer.sh`, you get convenient shortcuts: ### ๐Ÿ”„ Development vs Production **Development Mode** (macOS/Linux): + - Use `dev-installer.sh` for local development - Frontend asset building and live reloading - Code quality tools and git hooks - Documentation development server **Production Mode** (Ubuntu/Debian): -- Use `hst-install.sh` for server deployment + +- Use `hst-install.sh` for server deployment - Full system installation with services - Web server configuration (Apache + Nginx) - Database, mail, and DNS server setup @@ -356,6 +381,7 @@ After running `./dev-installer.sh`, you get convenient shortcuts: ### ๐Ÿงช Testing & Quality **Linting Tools:** + - **JavaScript**: Biome for fast linting and formatting - **CSS**: Stylelint with standard configuration - **PHP**: Prettier with PHP plugin @@ -363,10 +389,12 @@ After running `./dev-installer.sh`, you get convenient shortcuts: - **Markdown**: Markdownlint for documentation **Git Hooks:** + - **Pre-commit**: Runs linting and formatting on staged files - **Pre-push**: Additional validation (configurable) **Quality Standards:** + - All code must pass linting before commit - Automatic formatting applied on staged files - Documentation linting for README and docs @@ -377,7 +405,7 @@ After running `./dev-installer.sh`, you get convenient shortcuts: For detailed installation guides, configuration instructions, and troubleshooting: - ๐Ÿ“š [Installation Guide](#installing-tulio-control-panel) - See above for quick start -- ๐Ÿ”ง [Configuration Reference](docs/) - Detailed setup and configuration guides +- ๐Ÿ”ง [Configuration Reference](docs/) - Detailed setup and configuration guides - ๐Ÿ› [Troubleshooting](docs/troubleshooting.md) - Common issues and solutions - ๐Ÿš€ [Quick Start Examples](#custom-installation) - Command line installation options - ๐Ÿ’ป [Development Setup](#development-environment) - Local development environment @@ -416,4 +444,3 @@ If you would like to contribute to the project, please [read our Contribution Gu ## License Tulio Control Panel is licensed under [GPL v3](https://github.com/contaura/tuliocp/blob/main/LICENSE) license. - diff --git a/WARP.md b/WARP.md index 3315bcb37..2ba6fa594 100644 --- a/WARP.md +++ b/WARP.md @@ -7,6 +7,7 @@ This file provides guidance to WARP (warp.dev) when working with code in this re TulioCP is an open-source Linux web server control panel. It's a comprehensive hosting control panel that provides web, mail, DNS, and database management capabilities with a modern web interface and extensive CLI toolkit. ### Key Features + - Apache2 and NGINX with PHP-FPM support (PHP 5.6-8.4) - DNS Server (Bind) with clustering capabilities - POP/IMAP/SMTP mail services with Anti-Virus, Anti-Spam, and Webmail @@ -17,33 +18,35 @@ TulioCP is an open-source Linux web server control panel. It's a comprehensive h ## Development Commands ### Building and Assets + ```bash # Install dependencies and setup development environment npm ci --ignore-scripts -npm run prepare # Sets up Husky git hooks +npm run prepare # Sets up Husky git hooks # Build JavaScript and CSS assets -npm run build # Builds all JS/CSS using esbuild and Lightning CSS -node build.js # Direct build script execution +npm run build # Builds all JS/CSS using esbuild and Lightning CSS +node build.js # Direct build script execution # Development server for documentation -npm run docs:dev # Start VitePress dev server -npm run docs:build # Build documentation -npm run docs:serve # Serve built documentation -npm run docs:test # Run documentation tests +npm run docs:dev # Start VitePress dev server +npm run docs:build # Build documentation +npm run docs:serve # Serve built documentation +npm run docs:test # Run documentation tests ``` ### Linting and Code Quality + ```bash # Run all lints (includes Prettier, Biome, Stylelint, and Markdownlint) npm run lint # Individual linting tools -npx prettier --check . # Check code formatting -npx prettier --write . # Format code -npx biome lint . # JavaScript/TypeScript linting -npx stylelint web/css/src/**/*.css # CSS linting -npx markdownlint-cli2 *.md docs/**/*.md # Markdown linting +npx prettier --check . # Check code formatting +npx prettier --write . # Format code +npx biome lint . # JavaScript/TypeScript linting +npx stylelint web/css/src/**/*.css # CSS linting +npx markdownlint-cli2 *.md docs/**/*.md # Markdown linting # Format code automatically npm run format @@ -53,22 +56,24 @@ npm run lint-staged ``` ### Testing + ```bash # Run BATS test suite (requires TulioCP installation) -./test/test.bats # Main comprehensive test suite -./test/api.bats # API functionality tests -./test/checks.bats # System checks and validation -./test/config-tests.bats # Configuration tests -./test/letsencrypt.bats # SSL certificate tests -./test/restore.bats # Backup/restore tests -./test/wildcard.bats # Wildcard SSL tests +./test/test.bats # Main comprehensive test suite +./test/api.bats # API functionality tests +./test/checks.bats # System checks and validation +./test/config-tests.bats # Configuration tests +./test/letsencrypt.bats # SSL certificate tests +./test/restore.bats # Backup/restore tests +./test/wildcard.bats # Wildcard SSL tests # Shell script validation -./test/shellcheck.sh # Run ShellCheck on shell scripts -./test/lint_script.sh # Custom script linting +./test/shellcheck.sh # Run ShellCheck on shell scripts +./test/lint_script.sh # Custom script linting ``` ### Building Packages + ```bash # Build DEB packages (requires Debian/Ubuntu environment) ./src/hst_autocompile.sh --tuliocp --debug --cross --noinstall --keepbuild @@ -77,18 +82,18 @@ npm run lint-staged ./src/hst_generate_clidocs.sh # LXD/Container builds -./src/lxd_build_all.sh # Build for all supported distributions -./src/lxd_compile.sh # Single container build +./src/lxd_build_all.sh # Build for all supported distributions +./src/lxd_compile.sh # Single container build ``` ## Architecture Overview ### Directory Structure -- **`/bin/`** - CLI commands (500+ v-* scripts for all system operations) +- **`/bin/`** - CLI commands (500+ v-\* scripts for all system operations) - `v-add-*` - Add/create operations (users, domains, databases, etc.) - `v-delete-*` - Delete operations - - `v-list-*` - List/query operations + - `v-list-*` - List/query operations - `v-update-*` - Update/modify operations - `v-suspend-*` / `v-unsuspend-*` - Suspension management @@ -130,18 +135,21 @@ npm run lint-staged ## Frontend Build System ### JavaScript Build Process + - **Tool**: esbuild for fast bundling and minification - **Entry Point**: `web/js/src/index.js` - **Output**: `web/js/dist/main.min.js` (bundled) + individual external packages - **External Packages**: Chart.js, Alpine.js, xterm, etc. built separately for optimal loading -### CSS Build Process +### CSS Build Process + - **Tool**: Lightning CSS for processing and optimization - **Source**: `web/css/src/themes/*.css` (multiple themes) - **Output**: `web/css/themes/*.min.css` with source maps - **Features**: CSS nesting, custom media queries, automatic browser targeting ### Key Dependencies + - **Frontend**: Alpine.js (reactive), Chart.js (statistics), xterm.js (terminal), Floating Vue (tooltips) - **Build**: esbuild (JS), Lightning CSS (CSS), Browserslist (targets) - **Quality**: Biome (JS linting), Stylelint (CSS), Prettier (formatting), Markdownlint (docs) @@ -153,6 +161,7 @@ npm run lint-staged - **`release`** - Production-ready code matching official packages Always create feature branches from `main` using the naming convention: + - `feature/issue-description` or `feature/123-new-feature` - `fix/issue-description` or `fix/123-bug-fix` - `refactor/component-name` @@ -160,18 +169,21 @@ Always create feature branches from `main` using the naming convention: ## Code Quality Standards ### Shell Scripts + - Follow existing patterns in `/func/main.sh` for error handling - Use `check_result()` function for consistent error reporting - Source required function libraries at script start - Include proper logging with `log_event()` and `log_history()` ### Frontend Code + - Use Alpine.js patterns for interactive components - Maintain ES modules structure for JavaScript - Follow existing CSS naming conventions and nesting patterns - Ensure responsive design compatibility ### Testing Requirements + - Add BATS tests for new CLI commands in `/test/` - Test both success and failure scenarios - Include validation functions for domain, mail, and database operations diff --git a/apt-repo/index.html b/apt-repo/index.html index 36619fab9..13586cc0b 100644 --- a/apt-repo/index.html +++ b/apt-repo/index.html @@ -1,301 +1,317 @@ - + - - - - TulioCP APT Repository - - - -
-
-

TulioCP APT Repository

-

Official package repository for TulioCP Control Panel

-
- -
-
-

๐Ÿ“ฆ Quick Installation

-

Install TulioCP with a single command (recommended):

-
curl -sSL https://apt.tuliocp.com/setup.sh | sudo bash
- -

Alternative installation method:

-
wget https://raw.githubusercontent.com/Contaura/tuliocp/main/install/hst-install.sh
+	
+		
+		
+		TulioCP APT Repository
+		
+	
+	
+		
+
+

TulioCP APT Repository

+

Official package repository for TulioCP Control Panel

+
+ +
+
+

๐Ÿ“ฆ Quick Installation

+

Install TulioCP with a single command (recommended):

+
curl -sSL https://apt.tuliocp.com/setup.sh | sudo bash
+ +

Alternative installation method:

+
wget https://raw.githubusercontent.com/Contaura/tuliocp/main/install/hst-install.sh
 sudo bash hst-install.sh
-
+
-
-

๐Ÿ”ง Manual Repository Setup

-

For advanced users who prefer manual configuration:

-
# Add TulioCP repository
+				
+

๐Ÿ”ง Manual Repository Setup

+

For advanced users who prefer manual configuration:

+
+ +
+# Add TulioCP repository
 echo "deb https://apt.tuliocp.com stable main" | sudo tee /etc/apt/sources.list.d/tuliocp.list
 
 # Update package lists
 sudo apt-get update
 
 # Install TulioCP (allow unsigned until GPG signing implemented)
-sudo apt-get install --allow-unauthenticated tuliocp
-
+sudo apt-get install --allow-unauthenticated tuliocp
+
+
-
- Current Release: TulioCP 1.10.0~alpha is now available with improved security, modern web interface, enhanced performance, and comprehensive development environment. -
+
+ Current Release: TulioCP 1.10.0~alpha is now available with improved + security, modern web interface, enhanced performance, and comprehensive development + environment. +
-
-

๐Ÿ’ป Development Environment

-

Set up a local development environment for TulioCP:

-
# Clone and setup development environment
+				
+

๐Ÿ’ป Development Environment

+

Set up a local development environment for TulioCP:

+
# Clone and setup development environment
 git clone https://github.com/contaura/tuliocp.git
 cd tuliocp
 ./dev-installer.sh
- -

Development Features:

-
    -
  • Frontend build system with esbuild + Lightning CSS
  • -
  • Code quality tools (Prettier, Biome, Stylelint)
  • -
  • Documentation development server
  • -
  • Git hooks for automated quality checks
  • -
-
- -

๐Ÿ“‹ Available Packages

-
    -
  • tuliocp - Main control panel package (1.8MB) - ๐Ÿš€ Available Now
  • -
  • tulio-nginx - Custom Nginx web server - ๐Ÿšง Coming Soon
  • -
  • tulio-php - Custom PHP-FPM server - ๐Ÿšง Coming Soon
  • -
  • tulio-web-terminal - Web-based terminal - ๐Ÿšง Coming Soon
  • -
- -

๐Ÿ—๏ธ Build System Status

-
    -
  • Automated Builds: โœ… Active on every commit
  • -
  • Repository Deployment: โœ… GitHub Pages with custom domain
  • -
  • Package Signing: ๐Ÿšง GPG signing planned
  • -
  • Multi-Architecture: ๐Ÿšง ARM64 support coming soon
  • -
- -

๐Ÿ—๏ธ Supported Architectures

-
    -
  • amd64 (x86_64) - Available now
  • -
  • arm64 (aarch64) - Coming soon
  • -
- -

๐ŸŒ Supported Distributions

-
    -
  • Debian: 10, 11, 12
  • -
  • Ubuntu: 20.04, 22.04, 24.04 LTS
  • -
- -

๐Ÿ“š System Requirements

-
    -
  • Minimum 1GB RAM (2GB+ recommended)
  • -
  • 10GB+ available disk space
  • -
  • Internet connection for installation
  • -
  • Root or sudo access
  • -
-
- - -
- - - - \ No newline at end of file + +

Development Features:

+ +
+ +

๐Ÿ“‹ Available Packages

+ + +

๐Ÿ—๏ธ Build System Status

+ + +

๐Ÿ—๏ธ Supported Architectures

+ + +

๐ŸŒ Supported Distributions

+ + +

๐Ÿ“š System Requirements

+ +
+ + + + + + + diff --git a/apt-repo/setup.sh b/apt-repo/setup.sh index 71980d061..4ba5ec904 100644 --- a/apt-repo/setup.sh +++ b/apt-repo/setup.sh @@ -18,57 +18,57 @@ echo "==================================" # Check if running as root if [ "$EUID" -ne 0 ]; then - echo -e "${RED}โŒ This script must be run as root (use sudo)${NC}" - exit 1 + echo -e "${RED}โŒ This script must be run as root (use sudo)${NC}" + exit 1 fi # Check if running on supported OS if [ -f /etc/os-release ]; then - . /etc/os-release - OS=$ID - VERSION=$VERSION_ID + . /etc/os-release + OS=$ID + VERSION=$VERSION_ID else - echo -e "${RED}โŒ Cannot detect operating system${NC}" - exit 1 + echo -e "${RED}โŒ Cannot detect operating system${NC}" + exit 1 fi # Check OS compatibility case $OS in - ubuntu) - case $VERSION in - "20.04"|"22.04"|"24.04") - echo -e "${GREEN}โœ… Ubuntu $VERSION detected - supported${NC}" - ;; - *) - echo -e "${YELLOW}โš ๏ธ Ubuntu $VERSION may not be fully supported${NC}" - echo -e "${YELLOW} Officially supported: 20.04, 22.04, 24.04 LTS${NC}" - ;; - esac - ;; - debian) - case $VERSION in - "10"|"11"|"12") - echo -e "${GREEN}โœ… Debian $VERSION detected - supported${NC}" - ;; - *) - echo -e "${YELLOW}โš ๏ธ Debian $VERSION may not be fully supported${NC}" - echo -e "${YELLOW} Officially supported: 10, 11, 12${NC}" - ;; - esac - ;; - *) - echo -e "${RED}โŒ Unsupported operating system: $OS${NC}" - echo -e "${RED} Supported: Ubuntu 20.04/22.04/24.04 LTS, Debian 10/11/12${NC}" - exit 1 - ;; + ubuntu) + case $VERSION in + "20.04" | "22.04" | "24.04") + echo -e "${GREEN}โœ… Ubuntu $VERSION detected - supported${NC}" + ;; + *) + echo -e "${YELLOW}โš ๏ธ Ubuntu $VERSION may not be fully supported${NC}" + echo -e "${YELLOW} Officially supported: 20.04, 22.04, 24.04 LTS${NC}" + ;; + esac + ;; + debian) + case $VERSION in + "10" | "11" | "12") + echo -e "${GREEN}โœ… Debian $VERSION detected - supported${NC}" + ;; + *) + echo -e "${YELLOW}โš ๏ธ Debian $VERSION may not be fully supported${NC}" + echo -e "${YELLOW} Officially supported: 10, 11, 12${NC}" + ;; + esac + ;; + *) + echo -e "${RED}โŒ Unsupported operating system: $OS${NC}" + echo -e "${RED} Supported: Ubuntu 20.04/22.04/24.04 LTS, Debian 10/11/12${NC}" + exit 1 + ;; esac # Check architecture ARCH=$(dpkg --print-architecture) if [ "$ARCH" != "amd64" ]; then - echo -e "${RED}โŒ Unsupported architecture: $ARCH${NC}" - echo -e "${RED} Only amd64 (x86_64) is currently supported${NC}" - exit 1 + echo -e "${RED}โŒ Unsupported architecture: $ARCH${NC}" + echo -e "${RED} Only amd64 (x86_64) is currently supported${NC}" + exit 1 fi echo -e "${GREEN}โœ… Architecture: $ARCH - supported${NC}" @@ -90,7 +90,7 @@ echo "deb https://apt.tuliocp.com stable main" > /etc/apt/sources.list.d/tuliocp # Update package lists again echo -e "${BLUE}๐Ÿ”„ Updating package lists with TulioCP repository...${NC}" apt-get update > /dev/null 2>&1 || { - echo -e "${YELLOW}โš ๏ธ APT update completed with warnings (unsigned repository)${NC}" + echo -e "${YELLOW}โš ๏ธ APT update completed with warnings (unsigned repository)${NC}" } echo "" @@ -99,30 +99,30 @@ echo "" # Check if tuliocp package is available echo -e "${BLUE}๐Ÿ” Checking package availability...${NC}" if apt-cache show tuliocp > /dev/null 2>&1; then - echo -e "${GREEN}โœ… TulioCP package is available in repository${NC}" - echo "" - echo -e "${BLUE}๐Ÿ“‹ Install TulioCP:${NC}" - echo -e " ${YELLOW}sudo apt install --allow-unauthenticated tuliocp${NC}" + echo -e "${GREEN}โœ… TulioCP package is available in repository${NC}" + echo "" + echo -e "${BLUE}๐Ÿ“‹ Install TulioCP:${NC}" + echo -e " ${YELLOW}sudo apt install --allow-unauthenticated tuliocp${NC}" else - echo -e "${YELLOW}โš ๏ธ TulioCP package not yet available in repository${NC}" - echo -e "${BLUE}๐Ÿ”„ Automatically using direct installer instead...${NC}" - echo "" - - # Download and run the installer directly - echo -e "${BLUE}๐Ÿ“ฅ Downloading TulioCP installer...${NC}" - if curl -sSL https://raw.githubusercontent.com/contaura/tuliocp/main/install/hst-install.sh -o /tmp/hst-install.sh; then - echo -e "${GREEN}โœ… Installer downloaded successfully${NC}" - echo -e "${BLUE}๐Ÿš€ Running TulioCP installer with --force flag...${NC}" - echo -e "${YELLOW} (This will handle any existing admin users/groups automatically)${NC}" - echo "" - bash /tmp/hst-install.sh --force - exit 0 - else - echo -e "${RED}โŒ Failed to download installer${NC}" - echo -e "${YELLOW}๐Ÿ“‹ Manual installation steps:${NC}" - echo -e " ${YELLOW}wget https://raw.githubusercontent.com/contaura/tuliocp/main/install/hst-install.sh${NC}" - echo -e " ${YELLOW}sudo bash hst-install.sh${NC}" - fi + echo -e "${YELLOW}โš ๏ธ TulioCP package not yet available in repository${NC}" + echo -e "${BLUE}๐Ÿ”„ Automatically using direct installer instead...${NC}" + echo "" + + # Download and run the installer directly + echo -e "${BLUE}๐Ÿ“ฅ Downloading TulioCP installer...${NC}" + if curl -sSL https://raw.githubusercontent.com/contaura/tuliocp/main/install/hst-install.sh -o /tmp/hst-install.sh; then + echo -e "${GREEN}โœ… Installer downloaded successfully${NC}" + echo -e "${BLUE}๐Ÿš€ Running TulioCP installer with --force flag...${NC}" + echo -e "${YELLOW} (This will handle any existing admin users/groups automatically)${NC}" + echo "" + bash /tmp/hst-install.sh --force + exit 0 + else + echo -e "${RED}โŒ Failed to download installer${NC}" + echo -e "${YELLOW}๐Ÿ“‹ Manual installation steps:${NC}" + echo -e " ${YELLOW}wget https://raw.githubusercontent.com/contaura/tuliocp/main/install/hst-install.sh${NC}" + echo -e " ${YELLOW}sudo bash hst-install.sh${NC}" + fi fi echo "" echo -e "${BLUE}โ„น๏ธ Repository Information:${NC}" @@ -132,4 +132,4 @@ echo -e " โ€ข Status: Unsigned (requires --allow-unauthenticated)" echo -e " โ€ข Support: https://github.com/contaura/tuliocp" echo "" echo -e "${YELLOW}๐Ÿ“ Note: The repository is currently unsigned. GPG signing will be${NC}" -echo -e "${YELLOW} implemented in a future update for enhanced security.${NC}" \ No newline at end of file +echo -e "${YELLOW} implemented in a future update for enhanced security.${NC}" diff --git a/bin/v-acknowledge-user-notification b/bin/v-acknowledge-user-notification index 120dd371a..4c83854fc 100755 --- a/bin/v-acknowledge-user-notification +++ b/bin/v-acknowledge-user-notification @@ -18,11 +18,10 @@ id=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-add-access-key b/bin/v-add-access-key index b6b82dce9..344b4e691 100755 --- a/bin/v-add-access-key +++ b/bin/v-add-access-key @@ -5,7 +5,7 @@ # example: v-add-access-key admin v-purge-nginx-cache,v-list-mail-accounts comment json # # The "PERMISSIONS" argument is optional for the admin user only. -# This function creates a key file in $HESTIA/data/access-keys/ +# This function creates a key file in $TULIO/data/access-keys/ #----------------------------------------------------------# # Variables & Functions # @@ -21,11 +21,10 @@ format=${4-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" keygen() { local LENGTH=${1:-20} @@ -71,29 +70,29 @@ is_key_permissions_format_valid "$permissions" "$user" # Action # #----------------------------------------------------------# -if [ ! -d "$HESTIA/data/access-keys/" ]; then - mkdir -p $HESTIA/data/access-keys/ - chown root:root $HESTIA/data/access-keys/ - chmod 750 $HESTIA/data/access-keys/ +if [ ! -d "$TULIO/data/access-keys/" ]; then + mkdir -p $TULIO/data/access-keys/ + chown root:root $TULIO/data/access-keys/ + chmod 750 $TULIO/data/access-keys/ fi -if [[ -e "$HESTIA/data/access-keys/${access_key_id}" ]]; then - while [[ -e "$HESTIA/data/access-keys/${access_key_id}" ]]; do +if [[ -e "$TULIO/data/access-keys/${access_key_id}" ]]; then + while [[ -e "$TULIO/data/access-keys/${access_key_id}" ]]; do access_key_id=$(keygen) done fi -echo "SECRET_ACCESS_KEY='$secret_access_key'" > "$HESTIA/data/access-keys/${access_key_id}" -echo "USER='$user'" >> "$HESTIA/data/access-keys/${access_key_id}" -echo "PERMISSIONS='$permissions'" >> "$HESTIA/data/access-keys/${access_key_id}" -echo "COMMENT='$comment'" >> "$HESTIA/data/access-keys/${access_key_id}" -echo "TIME='$time'" >> "$HESTIA/data/access-keys/${access_key_id}" -echo "DATE='$date'" >> "$HESTIA/data/access-keys/${access_key_id}" +echo "SECRET_ACCESS_KEY='$secret_access_key'" > "$TULIO/data/access-keys/${access_key_id}" +echo "USER='$user'" >> "$TULIO/data/access-keys/${access_key_id}" +echo "PERMISSIONS='$permissions'" >> "$TULIO/data/access-keys/${access_key_id}" +echo "COMMENT='$comment'" >> "$TULIO/data/access-keys/${access_key_id}" +echo "TIME='$time'" >> "$TULIO/data/access-keys/${access_key_id}" +echo "DATE='$date'" >> "$TULIO/data/access-keys/${access_key_id}" # TODO Index reserved for future implementation -echo "EXPIRES_IN=''" >> "$HESTIA/data/access-keys/${access_key_id}" -echo "IP=''" >> "$HESTIA/data/access-keys/${access_key_id}" +echo "EXPIRES_IN=''" >> "$TULIO/data/access-keys/${access_key_id}" +echo "IP=''" >> "$TULIO/data/access-keys/${access_key_id}" -chmod 640 "$HESTIA/data/access-keys/${access_key_id}" +chmod 640 "$TULIO/data/access-keys/${access_key_id}" $BIN/v-list-access-key "$access_key_id" "$format" diff --git a/bin/v-add-backup-host b/bin/v-add-backup-host index 603a20104..cda040fb2 100755 --- a/bin/v-add-backup-host +++ b/bin/v-add-backup-host @@ -28,15 +28,14 @@ arch=$(arch) # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/backup.sh -source $HESTIA/func/backup.sh +source $TULIO/func/backup.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Fetch current verison B2 CLI tool -source_conf "$HESTIA/install/upgrade/upgrade.conf" +source_conf "$TULIO/install/upgrade/upgrade.conf" # Paths b2cli="/usr/local/bin/b2" @@ -207,19 +206,19 @@ if [ $type == 'ftp' ] || [ $type = 'sftp' ]; then new_timestamp str="HOST='$host'\nUSERNAME='$user'\nPASSWORD='$password'\nPRIVATEKEY='$privatekey'" str="$str\nBPATH='$path'\nPORT='$port'\nTIME='$time'\nDATE='$date'" - echo -e "$str" > $HESTIA/conf/$type.backup.conf - chmod 660 $HESTIA/conf/$type.backup.conf + echo -e "$str" > $TULIO/conf/$type.backup.conf + chmod 660 $TULIO/conf/$type.backup.conf elif [ $type == 'b2' ]; then new_timestamp str="BUCKET='$host'\nB2_KEYID='$user'\nB2_KEY='$raw_password'" str="$str\nTIME='$time'\nDATE='$date'" - echo -e "$str" > $HESTIA/conf/$type.backup.conf - chmod 660 $HESTIA/conf/$type.backup.conf + echo -e "$str" > $TULIO/conf/$type.backup.conf + chmod 660 $TULIO/conf/$type.backup.conf elif [ $type == "rclone" ]; then new_timestamp str="HOST='$host'\nBPATH='$path'" str="$str\nTIME='$time'\nDATE='$date'" - echo -e "$str" > $HESTIA/conf/$type.backup.conf + echo -e "$str" > $TULIO/conf/$type.backup.conf fi #----------------------------------------------------------# @@ -227,15 +226,15 @@ fi #----------------------------------------------------------# # Update tulio.conf -if [ -z "$(grep BACKUP_SYSTEM $HESTIA/conf/tulio.conf)" ]; then - echo "BACKUP_SYSTEM='$type'" >> $HESTIA/conf/tulio.conf +if [ -z "$(grep BACKUP_SYSTEM $TULIO/conf/tulio.conf)" ]; then + echo "BACKUP_SYSTEM='$type'" >> $TULIO/conf/tulio.conf else bckp=$(echo "$BACKUP_SYSTEM,$type" \ | sed "s/,/\n/g" \ | sort -r -u \ | sed "/^$/d" \ | sed ':a;N;$!ba;s/\n/,/g') - sed -i "s/BACKUP_SYSTEM=.*/BACKUP_SYSTEM='$bckp'/g" $HESTIA/conf/tulio.conf + sed -i "s/BACKUP_SYSTEM=.*/BACKUP_SYSTEM='$bckp'/g" $TULIO/conf/tulio.conf fi # Logging diff --git a/bin/v-add-backup-host-restic b/bin/v-add-backup-host-restic index 8bbf3e2eb..fa5794710 100755 --- a/bin/v-add-backup-host-restic +++ b/bin/v-add-backup-host-restic @@ -26,13 +26,12 @@ arch=$(arch) # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Fetch current verison B2 CLI tool -source_conf "$HESTIA/install/upgrade/upgrade.conf" +source_conf "$TULIO/install/upgrade/upgrade.conf" is_negative_one_or_int() { if [[ "$1" != '-1' ]]; then diff --git a/bin/v-add-cron-job b/bin/v-add-cron-job index 19ff0b3da..0e9de2bb0 100755 --- a/bin/v-add-cron-job +++ b/bin/v-add-cron-job @@ -26,11 +26,10 @@ restart=$9 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" HIDE=7 @@ -66,10 +65,10 @@ str="JOB='$job' MIN='$min' HOUR='$hour' DAY='$day' MONTH='$month' WDAY='$wday'" str="$str CMD='$cron_command' SUSPENDED='no' TIME='$time' DATE='$date'" # Adding to crontab -echo "$str" >> $HESTIA/data/users/$user/cron.conf +echo "$str" >> $TULIO/data/users/$user/cron.conf # Changing permissions -chmod 660 $HESTIA/data/users/$user/cron.conf +chmod 660 $TULIO/data/users/$user/cron.conf # Sort jobs by id number sort_cron_jobs diff --git a/bin/v-add-cron-letsencrypt-job b/bin/v-add-cron-letsencrypt-job index c997527d8..298df84e8 100755 --- a/bin/v-add-cron-letsencrypt-job +++ b/bin/v-add-cron-letsencrypt-job @@ -12,11 +12,10 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-add-cron-reports b/bin/v-add-cron-reports index 2e075ff47..ed044c825 100755 --- a/bin/v-add-cron-reports +++ b/bin/v-add-cron-reports @@ -18,11 +18,10 @@ user=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-add-cron-restart-job b/bin/v-add-cron-restart-job index 33fca6668..4f7337b2e 100755 --- a/bin/v-add-cron-restart-job +++ b/bin/v-add-cron-restart-job @@ -12,11 +12,10 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-add-cron-tulio-autoupdate b/bin/v-add-cron-tulio-autoupdate index e06de3227..aa58dadca 100755 --- a/bin/v-add-cron-tulio-autoupdate +++ b/bin/v-add-cron-tulio-autoupdate @@ -16,11 +16,10 @@ mode=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-add-database b/bin/v-add-database index 2e509cb99..8c10654db 100755 --- a/bin/v-add-database +++ b/bin/v-add-database @@ -31,13 +31,12 @@ charset=$(echo "$charset" | tr '[:lower:]' '[:upper:]') # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/db.sh -source $HESTIA/func/db.sh +source $TULIO/func/db.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" if [ "$type" = "pgsql" ]; then database=$(echo "$user"_"$2" | tr '[:upper:]' '[:lower:]') diff --git a/bin/v-add-database-host b/bin/v-add-database-host index 2cdbdbb89..ac88aa90c 100755 --- a/bin/v-add-database-host +++ b/bin/v-add-database-host @@ -29,13 +29,12 @@ port=${8} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/db.sh -source $HESTIA/func/db.sh +source $TULIO/func/db.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" is_mysql_host_alive() { mycnf=$(mktemp) @@ -149,19 +148,19 @@ esac #----------------------------------------------------------# # Adding host to conf -echo "$str" >> $HESTIA/conf/$type.conf -chmod 660 $HESTIA/conf/$type.conf +echo "$str" >> $TULIO/conf/$type.conf +chmod 660 $TULIO/conf/$type.conf # Updating tulio.conf -if [ -z "$(grep DB_SYSTEM $HESTIA/conf/tulio.conf)" ]; then - echo "DB_SYSTEM='$type'" >> $HESTIA/conf/tulio.conf +if [ -z "$(grep DB_SYSTEM $TULIO/conf/tulio.conf)" ]; then + echo "DB_SYSTEM='$type'" >> $TULIO/conf/tulio.conf else db=$(echo "$DB_SYSTEM,$type" \ | sed "s/,/\n/g" \ | sort -r -u \ | sed "/^$/d" \ | sed ':a;N;$!ba;s/\n/,/g') - sed -i "s/DB_SYSTEM=.*/DB_SYSTEM='$db'/g" $HESTIA/conf/tulio.conf + sed -i "s/DB_SYSTEM=.*/DB_SYSTEM='$db'/g" $TULIO/conf/tulio.conf fi # Logging diff --git a/bin/v-add-database-temp-user b/bin/v-add-database-temp-user index 05db28fb0..5084f9a2d 100755 --- a/bin/v-add-database-temp-user +++ b/bin/v-add-database-temp-user @@ -27,13 +27,12 @@ fi # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/db.sh -source $HESTIA/func/db.sh +source $TULIO/func/db.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-add-dns-domain b/bin/v-add-dns-domain index b4fad032d..9a4251031 100755 --- a/bin/v-add-dns-domain +++ b/bin/v-add-dns-domain @@ -33,15 +33,14 @@ dnssec=${13} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/rebuild.sh -source $HESTIA/func/rebuild.sh +source $TULIO/func/rebuild.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain @@ -203,7 +202,7 @@ rebuild_dns_domain_conf # Updating dns-cluster queue if [ "$DNS_CLUSTER" = "yes" ]; then cmd="$BIN/v-add-remote-dns-domain $user $domain yes" - echo "$cmd" >> $HESTIA/data/queue/dns-cluster.pipe + echo "$cmd" >> $TULIO/data/queue/dns-cluster.pipe fi #----------------------------------------------------------# diff --git a/bin/v-add-dns-on-web-alias b/bin/v-add-dns-on-web-alias index bca8584ea..b6791e3ac 100755 --- a/bin/v-add-dns-on-web-alias +++ b/bin/v-add-dns-on-web-alias @@ -20,13 +20,12 @@ restart=$4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-add-dns-record b/bin/v-add-dns-record index 406891de9..943ced727 100755 --- a/bin/v-add-dns-record +++ b/bin/v-add-dns-record @@ -35,15 +35,14 @@ fi # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/rebuild.sh -source $HESTIA/func/rebuild.sh +source $TULIO/func/rebuild.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Null priority for none MX/SRV records if [ "$rtype" != 'MX' ] && [ "$rtype" != 'SRV' ]; then @@ -143,10 +142,10 @@ fi # Updating dns-cluster queue if [ "$DNS_CLUSTER" = "yes" ]; then # Check for first sync - dlock=$(grep "domain $user $domain" $HESTIA/data/queue/dns-cluster.pipe) + dlock=$(grep "domain $user $domain" $TULIO/data/queue/dns-cluster.pipe) if [ -z "$dlock" ]; then cmd="$BIN/v-add-remote-dns-record $user $domain $id" - echo "$cmd" >> $HESTIA/data/queue/dns-cluster.pipe + echo "$cmd" >> $TULIO/data/queue/dns-cluster.pipe fi fi diff --git a/bin/v-add-domain b/bin/v-add-domain index 9f8890b40..0b8b392de 100755 --- a/bin/v-add-domain +++ b/bin/v-add-domain @@ -20,13 +20,12 @@ restart=$4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-add-fastcgi-cache b/bin/v-add-fastcgi-cache index 329e59c1f..25669de61 100755 --- a/bin/v-add-fastcgi-cache +++ b/bin/v-add-fastcgi-cache @@ -22,11 +22,10 @@ restart=${4-no} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-add-firewall-ban b/bin/v-add-firewall-ban index abd50e66e..de42bf268 100755 --- a/bin/v-add-firewall-ban +++ b/bin/v-add-firewall-ban @@ -21,13 +21,12 @@ iptables="/sbin/iptables" # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/firewall.sh -source $HESTIA/func/firewall.sh +source $TULIO/func/firewall.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -48,19 +47,19 @@ check_tulio_demo_mode heal_iptables_links # Checking server ip -if [ -e "$HESTIA/data/ips/$ipv4_cidr" ] || [ "$ipv4_cidr" = '127.0.0.1' ]; then +if [ -e "$TULIO/data/ips/$ipv4_cidr" ] || [ "$ipv4_cidr" = '127.0.0.1' ]; then exit fi # Checking ip exclusions -excludes="$HESTIA/data/firewall/excludes.conf" +excludes="$TULIO/data/firewall/excludes.conf" check_excludes=$(grep "^$ipv4_cidr$" $excludes 2> /dev/null) if [ -n "$check_excludes" ]; then exit fi # Checking ip in banlist -conf="$HESTIA/data/firewall/banlist.conf" +conf="$TULIO/data/firewall/banlist.conf" check_ip=$(grep "IP='$ipv4_cidr' CHAIN='$chain'" $conf 2> /dev/null) if [ -n "$check_ip" ]; then exit diff --git a/bin/v-add-firewall-chain b/bin/v-add-firewall-chain index d50174f74..44c2cd58e 100755 --- a/bin/v-add-firewall-chain +++ b/bin/v-add-firewall-chain @@ -25,16 +25,15 @@ iptables="/sbin/iptables" # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source "$HESTIA/func/main.sh" +source "$TULIO/func/main.sh" # shellcheck source=/usr/local/tulio/func/firewall.sh -source "$HESTIA/func/firewall.sh" +source "$TULIO/func/firewall.sh" # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Get tulio port by reading nginx.conf -tulioport=$(sed -ne "/listen/{s/.*listen[^0-9]*\([0-9][0-9]*\)[ \t]*ssl\;/\1/p;q}" "$HESTIA/nginx/conf/nginx.conf") +tulioport=$(sed -ne "/listen/{s/.*listen[^0-9]*\([0-9][0-9]*\)[ \t]*ssl\;/\1/p;q}" "$TULIO/nginx/conf/nginx.conf") if [ -z "$tulioport" ]; then tulioport=8083 fi @@ -87,7 +86,7 @@ case $chain in port='3306,5432' protocol=TCP ;; - HESTIA) + TULIO) port=$tulioport protocol=TCP ;; @@ -113,7 +112,7 @@ if [ $? -eq 0 ]; then fi # Preserving chain -chains="$HESTIA/data/firewall/chains.conf" +chains="$TULIO/data/firewall/chains.conf" check_chain="" [ -f "$chains" ] && check_chain=$(grep "CHAIN='$chain'" "$chains") if [ -z "$check_chain" ]; then diff --git a/bin/v-add-firewall-ipset b/bin/v-add-firewall-ipset index 2887ddb8d..543308486 100755 --- a/bin/v-add-firewall-ipset +++ b/bin/v-add-firewall-ipset @@ -20,11 +20,10 @@ refresh=${5:-no} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -42,7 +41,7 @@ check_tulio_demo_mode # Define variables for ipset configuration ipset_hstobject='../../../data/firewall/ipset' IPSET_BIN="$(command -v ipset)" -IPSET_PATH="$HESTIA/data/firewall/ipset" +IPSET_PATH="$TULIO/data/firewall/ipset" # Ensure ipset is installed if [ -z "$IPSET_BIN" ]; then @@ -55,8 +54,8 @@ fi # Ensure ipset configuration path and master file exist before attempting to parse mkdir -p "$IPSET_PATH" -if [ ! -f "$HESTIA/data/firewall/ipset.conf" ]; then - touch $HESTIA/data/firewall/ipset.conf +if [ ! -f "$TULIO/data/firewall/ipset.conf" ]; then + touch $TULIO/data/firewall/ipset.conf fi if [ -z "$data_source" ]; then @@ -163,7 +162,7 @@ if [ ! -f "${IPSET_PATH}.conf" ] || [ -z "$(get_object_value "$ipset_hstobject" str="LISTNAME='$ip_name' IP_VERSION='$ip_version' SOURCE='$data_source'" str="$str AUTOUPDATE='$autoupdate' SUSPENDED='no'" str="$str TIME='$time' DATE='$date'" - echo "$str" >> $HESTIA/data/firewall/ipset.conf + echo "$str" >> $TULIO/data/firewall/ipset.conf log_type="added" elif [ "$refresh" = "yes" ]; then @@ -176,13 +175,13 @@ elif [ "$refresh" = "yes" ]; then fi # Changing permissions -chmod 660 $HESTIA/data/firewall/ipset.conf +chmod 660 $TULIO/data/firewall/ipset.conf chmod 660 "${IPSET_PATH}/${IPSET_FILE}.iplist" # Install ipset daily cron updater -if ! grep --silent --no-messages "v-update-firewall-ipset" $HESTIA/data/queue/daily.pipe; then +if ! grep --silent --no-messages "v-update-firewall-ipset" $TULIO/data/queue/daily.pipe; then cmd="$BIN/v-update-firewall-ipset yes" - echo "$cmd" >> $HESTIA/data/queue/daily.pipe + echo "$cmd" >> $TULIO/data/queue/daily.pipe fi #----------------------------------------------------------# diff --git a/bin/v-add-firewall-rule b/bin/v-add-firewall-rule index 144ecf7c5..82084484d 100755 --- a/bin/v-add-firewall-rule +++ b/bin/v-add-firewall-rule @@ -23,26 +23,25 @@ rule=$6 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Get next firewall rule id get_next_fw_rule() { if [ -z "$rule" ]; then - curr_str=$(grep "RULE=" $HESTIA/data/firewall/rules.conf \ + curr_str=$(grep "RULE=" $TULIO/data/firewall/rules.conf \ | cut -f 2 -d \' | sort -n | tail -n1) rule="$((curr_str + 1))" fi } sort_fw_rules() { - cat $HESTIA/data/firewall/rules.conf \ - | sort -n -k 2 -t \' > $HESTIA/data/firewall/rules.conf.tmp - mv -f $HESTIA/data/firewall/rules.conf.tmp \ - $HESTIA/data/firewall/rules.conf + cat $TULIO/data/firewall/rules.conf \ + | sort -n -k 2 -t \' > $TULIO/data/firewall/rules.conf.tmp + mv -f $TULIO/data/firewall/rules.conf.tmp \ + $TULIO/data/firewall/rules.conf } #----------------------------------------------------------# @@ -84,10 +83,10 @@ str="$str IP='$ipv4_cidr' COMMENT='$comment' SUSPENDED='no'" str="$str TIME='$time' DATE='$date'" # Adding to config -echo "$str" >> $HESTIA/data/firewall/rules.conf +echo "$str" >> $TULIO/data/firewall/rules.conf # Changing permissions -chmod 660 $HESTIA/data/firewall/rules.conf +chmod 660 $TULIO/data/firewall/rules.conf # Sorting firewall rules by id number sort_fw_rules diff --git a/bin/v-add-fs-archive b/bin/v-add-fs-archive index 1a8f5d6a4..5d7341021 100755 --- a/bin/v-add-fs-archive +++ b/bin/v-add-fs-archive @@ -17,9 +17,8 @@ archive=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh #----------------------------------------------------------# # Verifications # diff --git a/bin/v-add-fs-directory b/bin/v-add-fs-directory index f6b3e470b..79c75fe49 100755 --- a/bin/v-add-fs-directory +++ b/bin/v-add-fs-directory @@ -17,9 +17,8 @@ dst_dir=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh #----------------------------------------------------------# # Verifications # diff --git a/bin/v-add-fs-file b/bin/v-add-fs-file index 6422154e9..1ccbbb29a 100755 --- a/bin/v-add-fs-file +++ b/bin/v-add-fs-file @@ -17,9 +17,8 @@ dst_file=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh #----------------------------------------------------------# # Verifications # diff --git a/bin/v-add-letsencrypt-domain b/bin/v-add-letsencrypt-domain index 7e74b9da5..12f1f05e1 100755 --- a/bin/v-add-letsencrypt-domain +++ b/bin/v-add-letsencrypt-domain @@ -21,13 +21,12 @@ mail=${4// /} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # LE API LE_API='https://acme-v02.api.letsencrypt.org' @@ -159,8 +158,8 @@ domain: ${domain} # Registering LetsEncrypt user account $BIN/v-add-letsencrypt-user $user if [ "$?" -ne 0 ]; then - touch $HESTIA/data/queue/letsencrypt.pipe - sed -i "/ $domain /d" $HESTIA/data/queue/letsencrypt.pipe + touch $TULIO/data/queue/letsencrypt.pipe + sed -i "/ $domain /d" $TULIO/data/queue/letsencrypt.pipe send_notice "LETSENCRYPT" "Account registration failed ($user)" check_result "$E_CONNECT" "LE account registration ($user)" > /dev/null fi @@ -172,7 +171,7 @@ source $USER_DATA/ssl/le.conf if [ "$aliases" = "*.$domain" ]; then wildcard='yes' proto="dns-01" - if [ ! -e "$HESTIA/data/users/$user/dns/$domain.conf" ]; then + if [ ! -e "$TULIO/data/users/$user/dns/$domain.conf" ]; then check_result "$E_NOTEXIST" "DNS domain $domain doesn't exist" fi else @@ -580,8 +579,8 @@ fi if [ "$?" -ne '0' ]; then [ -d "$ssl_dir" ] && rm -rf "$ssl_dir" - touch $HESTIA/data/queue/letsencrypt.pipe - sed -i "/ $domain /d" $HESTIA/data/queue/letsencrypt.pipe + touch $TULIO/data/queue/letsencrypt.pipe + sed -i "/ $domain /d" $TULIO/data/queue/letsencrypt.pipe send_notice 'LETSENCRYPT' "$domain certificate installation failed ($domain)" check_result $? "SSL install" > /dev/null fi @@ -636,8 +635,8 @@ fi #----------------------------------------------------------# # Deleting task from queue -touch $HESTIA/data/queue/letsencrypt.pipe -sed -i "/ $domain /d" $HESTIA/data/queue/letsencrypt.pipe +touch $TULIO/data/queue/letsencrypt.pipe +sed -i "/ $domain /d" $TULIO/data/queue/letsencrypt.pipe # Notifying user send_notice 'LETSENCRYPT' "$domain SSL has been installed successfully" diff --git a/bin/v-add-letsencrypt-host b/bin/v-add-letsencrypt-host index b5cacd420..d6ed722c8 100755 --- a/bin/v-add-letsencrypt-host +++ b/bin/v-add-letsencrypt-host @@ -15,13 +15,12 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Perform verification if read-only mode is enabled check_tulio_demo_mode @@ -34,7 +33,7 @@ fi user="$($BIN/v-search-domain-owner "$domain" web)" [[ -z "$user" ]] && user="$ROOT_USER" -USER_DATA=$HESTIA/data/users/$user +USER_DATA=$TULIO/data/users/$user #----------------------------------------------------------# # Verifications # diff --git a/bin/v-add-letsencrypt-user b/bin/v-add-letsencrypt-user index 003cae9fd..fc82e3a62 100755 --- a/bin/v-add-letsencrypt-user +++ b/bin/v-add-letsencrypt-user @@ -17,11 +17,10 @@ user=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # LE API LE_API='https://acme-v02.api.letsencrypt.org' diff --git a/bin/v-add-mail-account b/bin/v-add-mail-account index 627fe94c9..ef542acf3 100755 --- a/bin/v-add-mail-account +++ b/bin/v-add-mail-account @@ -23,15 +23,14 @@ quota=${5-unlimited} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/syshealth.sh -source $HESTIA/func/syshealth.sh +source $TULIO/func/syshealth.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting if [[ "$account" =~ [[:upper:]] ]]; then diff --git a/bin/v-add-mail-account-alias b/bin/v-add-mail-account-alias index d4a642cb2..07bf81953 100755 --- a/bin/v-add-mail-account-alias +++ b/bin/v-add-mail-account-alias @@ -21,13 +21,12 @@ malias=$4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-add-mail-account-autoreply b/bin/v-add-mail-account-autoreply index 4d8be6b52..eb3e82635 100755 --- a/bin/v-add-mail-account-autoreply +++ b/bin/v-add-mail-account-autoreply @@ -21,13 +21,12 @@ autoreply=$4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Define mail user if [ "$MAIL_SYSTEM" = 'exim4' ]; then diff --git a/bin/v-add-mail-account-forward b/bin/v-add-mail-account-forward index efdfebfa1..c304c2991 100755 --- a/bin/v-add-mail-account-forward +++ b/bin/v-add-mail-account-forward @@ -21,13 +21,12 @@ email_forward=$4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-add-mail-account-fwd-only b/bin/v-add-mail-account-fwd-only index e95823998..e9ce4c41c 100755 --- a/bin/v-add-mail-account-fwd-only +++ b/bin/v-add-mail-account-fwd-only @@ -20,13 +20,12 @@ account=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Define mail user if [ "$MAIL_SYSTEM" = 'exim4' ]; then diff --git a/bin/v-add-mail-domain b/bin/v-add-mail-domain index 60ca91b79..3e50026f2 100755 --- a/bin/v-add-mail-domain +++ b/bin/v-add-mail-domain @@ -24,17 +24,16 @@ reject=${8-no} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # shellcheck source=/usr/local/tulio/func/syshealth.sh -source $HESTIA/func/syshealth.sh +source $TULIO/func/syshealth.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Define mail user if [ "$MAIL_SYSTEM" = 'exim4' ]; then @@ -202,8 +201,8 @@ if [ -n "$WEB_SYSTEM" ] || [ -n "$PROXY_SYSTEM" ]; then fi # Run extension trigger -if [ -x "$HESTIA/data/extensions/add-mail-domain.sh" ]; then - $HESTIA/data/extensions/add-mail-domain.sh "$user" "$domain" +if [ -x "$TULIO/data/extensions/add-mail-domain.sh" ]; then + $TULIO/data/extensions/add-mail-domain.sh "$user" "$domain" fi #----------------------------------------------------------# diff --git a/bin/v-add-mail-domain-antispam b/bin/v-add-mail-domain-antispam index aea1b185f..9caaa3099 100755 --- a/bin/v-add-mail-domain-antispam +++ b/bin/v-add-mail-domain-antispam @@ -19,13 +19,12 @@ domain_idn=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-add-mail-domain-antivirus b/bin/v-add-mail-domain-antivirus index 8089c038c..38968c9df 100755 --- a/bin/v-add-mail-domain-antivirus +++ b/bin/v-add-mail-domain-antivirus @@ -19,13 +19,12 @@ domain_idn=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-add-mail-domain-catchall b/bin/v-add-mail-domain-catchall index 5838bc504..ca09bba8e 100755 --- a/bin/v-add-mail-domain-catchall +++ b/bin/v-add-mail-domain-catchall @@ -20,13 +20,12 @@ email="$3" # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-add-mail-domain-dkim b/bin/v-add-mail-domain-dkim index 3311ad29c..4de6a7eaf 100755 --- a/bin/v-add-mail-domain-dkim +++ b/bin/v-add-mail-domain-dkim @@ -20,13 +20,12 @@ dkim_size=${3-2048} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Define mail user if [ "$MAIL_SYSTEM" = 'exim4' ]; then diff --git a/bin/v-add-mail-domain-reject b/bin/v-add-mail-domain-reject index 1e5a40bef..7a6b00cbb 100755 --- a/bin/v-add-mail-domain-reject +++ b/bin/v-add-mail-domain-reject @@ -20,13 +20,12 @@ domain_idn=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-add-mail-domain-smtp-relay b/bin/v-add-mail-domain-smtp-relay index 7872da5df..fdc86edc2 100755 --- a/bin/v-add-mail-domain-smtp-relay +++ b/bin/v-add-mail-domain-smtp-relay @@ -22,11 +22,10 @@ port=${6-587} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-add-mail-domain-ssl b/bin/v-add-mail-domain-ssl index 6c52959a4..cfa41e565 100755 --- a/bin/v-add-mail-domain-ssl +++ b/bin/v-add-mail-domain-ssl @@ -34,15 +34,14 @@ domain_idn=$(idn2 --quiet "$domain") # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-add-mail-domain-webmail b/bin/v-add-mail-domain-webmail index abbef94da..bf13f4c8e 100755 --- a/bin/v-add-mail-domain-webmail +++ b/bin/v-add-mail-domain-webmail @@ -38,15 +38,14 @@ fi # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain @@ -134,7 +133,7 @@ else if [ "$WEB_SYSTEM" = "nginx" ]; then WEBMAIL_TEMPLATE="web_system" fi - elif [ -f "$HESTIA/data/templates/mail/$WEB_SYSTEM/$webmail.tpl" ]; then + elif [ -f "$TULIO/data/templates/mail/$WEB_SYSTEM/$webmail.tpl" ]; then WEBMAIL_TEMPLATE="$webmail" if [ -n "$PROXY_SYSTEM" ]; then PROXY_TEMPLATE="default_$webmail" diff --git a/bin/v-add-remote-dns-domain b/bin/v-add-remote-dns-domain index f6b3baddb..62636c6ab 100755 --- a/bin/v-add-remote-dns-domain +++ b/bin/v-add-remote-dns-domain @@ -19,13 +19,12 @@ flush=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/remote.sh -source $HESTIA/func/remote.sh +source $TULIO/func/remote.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -50,7 +49,7 @@ check_tulio_demo_mode # Parsing domain record str=$(grep "DOMAIN='$domain'" $USER_DATA/dns.conf 2> /dev/null) if [ -z "$str" ]; then - pipe="$HESTIA/data/queue/dns-cluster.pipe" + pipe="$TULIO/data/queue/dns-cluster.pipe" queue_str=$(grep -n "$SCRIPT $1 $2 " $pipe | cut -f1 -d: | head -n1) if [ -n "$queue_str" ]; then sed -i "$queue_str d" $pipe @@ -61,7 +60,7 @@ if [ "$DNS_CLUSTER_SYSTEM" = "tulio-zone" ]; then str=$(echo "$str" | sed "s/SLAVE='no'/SLAVE='yes'/g") str=$(echo "$str" | sed "s/SLAVE=''/SLAVE='yes'/g") ip=$(ip addr | grep 'inet ' | grep global | head -n1 | awk '{print $2}' | cut -f1 -d/) - source_conf $HESTIA/data/ips/$ip + source_conf $TULIO/data/ips/$ip if [ -z $NAT ]; then str=$(echo "$str" | sed "s/MASTER=''/MASTER='$ip'/g") else @@ -70,7 +69,7 @@ if [ "$DNS_CLUSTER_SYSTEM" = "tulio-zone" ]; then fi IFS=$'\n' -for cluster in $(grep "SUSPENDED='no'" $HESTIA/conf/dns-cluster.conf); do +for cluster in $(grep "SUSPENDED='no'" $TULIO/conf/dns-cluster.conf); do # Reset user, password and hash vars clear_dns_cluster_settings @@ -117,7 +116,7 @@ fi # Updating pipe rm -f $tmpfile -pipe="$HESTIA/data/queue/dns-cluster.pipe" +pipe="$TULIO/data/queue/dns-cluster.pipe" str=$(grep -n "$SCRIPT $1 $2 " $pipe | cut -f1 -d: | head -n1) if [ -n "$str" ]; then sed -i "$str d" $pipe diff --git a/bin/v-add-remote-dns-host b/bin/v-add-remote-dns-host index 9f346bf33..591ddfa3b 100755 --- a/bin/v-add-remote-dns-host +++ b/bin/v-add-remote-dns-host @@ -35,13 +35,12 @@ DNS_USER=$dns_user # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/remote.sh -source $HESTIA/func/remote.sh +source $TULIO/func/remote.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -91,14 +90,14 @@ else fi # Adding host to dns-cluster.conf -echo "$str" >> $HESTIA/conf/dns-cluster.conf -chmod 660 $HESTIA/conf/dns-cluster.conf +echo "$str" >> $TULIO/conf/dns-cluster.conf +chmod 660 $TULIO/conf/dns-cluster.conf # Enabling DNS_CLUSTER -if [ -z "$(grep DNS_CLUSTER= $HESTIA/conf/tulio.conf)" ]; then - sed -i "s/^STATS_/DNS_CLUSTER='yes'\nSTATS_/g" $HESTIA/conf/tulio.conf +if [ -z "$(grep DNS_CLUSTER= $TULIO/conf/tulio.conf)" ]; then + sed -i "s/^STATS_/DNS_CLUSTER='yes'\nSTATS_/g" $TULIO/conf/tulio.conf else - sed -i "s/DNS_CLUSTER=.*/DNS_CLUSTER='yes'/g" $HESTIA/conf/tulio.conf + sed -i "s/DNS_CLUSTER=.*/DNS_CLUSTER='yes'/g" $TULIO/conf/tulio.conf fi # Enabling remote dns-cluster queue diff --git a/bin/v-add-remote-dns-record b/bin/v-add-remote-dns-record index 42fa0101a..291a266bf 100755 --- a/bin/v-add-remote-dns-record +++ b/bin/v-add-remote-dns-record @@ -19,13 +19,12 @@ id=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/remote.sh -source $HESTIA/func/remote.sh +source $TULIO/func/remote.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -49,7 +48,7 @@ check_tulio_demo_mode # Parsing record str=$(grep "ID='$id'" $USER_DATA/dns/$domain.conf) if [ -z "$str" ]; then - pipe="$HESTIA/data/queue/dns-cluster.pipe" + pipe="$TULIO/data/queue/dns-cluster.pipe" queue_str=$(grep -n "$SCRIPT $1 $2 $3$" $pipe | cut -f1 -d: | head -n1) if [ -n "$queue_str" ]; then sed -i "$queue_str d" $pipe @@ -60,7 +59,7 @@ fi if [ "$DNS_CLUSTER_SYSTEM" != "tulio-zone" ]; then IFS=$'\n' - for cluster in $(grep "SUSPENDED='no'" $HESTIA/conf/dns-cluster.conf); do + for cluster in $(grep "SUSPENDED='no'" $TULIO/conf/dns-cluster.conf); do # Reset user, password and hash vars clear_dns_cluster_settings @@ -91,7 +90,7 @@ fi #----------------------------------------------------------# # Updating pipe -pipe="$HESTIA/data/queue/dns-cluster.pipe" +pipe="$TULIO/data/queue/dns-cluster.pipe" str=$(grep -n "$SCRIPT $1 $2 $3$" $pipe | cut -f1 -d: | head -n1) if [ -n "$str" ]; then sed -i "$str d" $pipe diff --git a/bin/v-add-sys-api-ip b/bin/v-add-sys-api-ip index b4befbf21..443a11557 100755 --- a/bin/v-add-sys-api-ip +++ b/bin/v-add-sys-api-ip @@ -14,13 +14,12 @@ ip46=${1// /} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-add-sys-cgroups b/bin/v-add-sys-cgroups index edb974eb0..4fd7471a5 100755 --- a/bin/v-add-sys-cgroups +++ b/bin/v-add-sys-cgroups @@ -12,11 +12,10 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-add-sys-dependencies b/bin/v-add-sys-dependencies index 34c675290..2a3f01288 100755 --- a/bin/v-add-sys-dependencies +++ b/bin/v-add-sys-dependencies @@ -12,19 +12,18 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # upgrade config file -source "$HESTIA/install/upgrade/upgrade.conf" +source "$TULIO/install/upgrade/upgrade.conf" MODE=$1 user="$ROOT_USER" -PM_INSTALL_DIR="$HESTIA/web/inc" -QUICK_INSTALL_DIR="$HESTIA/web/src" +PM_INSTALL_DIR="$TULIO/web/inc" +QUICK_INSTALL_DIR="$TULIO/web/src" COMPOSER_BIN="$HOMEDIR/$user/.composer/composer" #----------------------------------------------------------# @@ -37,12 +36,12 @@ if [ "x$(id -u)" != 'x0' ]; then exit 10 fi -# Ensure that $HESTIA (/usr/local/tulio/) and other variables are valid. -if [ -z "$HESTIA" ]; then - HESTIA="/usr/local/tulio" +# Ensure that $TULIO (/usr/local/tulio/) and other variables are valid. +if [ -z "$TULIO" ]; then + TULIO="/usr/local/tulio" fi -if [ -z "$HOMEDIR" ] || [ -z "$HESTIA_INSTALL_DIR" ]; then +if [ -z "$HOMEDIR" ] || [ -z "$TULIO_INSTALL_DIR" ]; then echo "ERROR: Environment variables not present, installation aborted." exit 2 fi @@ -63,25 +62,25 @@ check_tulio_demo_mode # Action # #----------------------------------------------------------# -system_php=$(command -v php 2>/dev/null || true) +system_php=$(command -v php 2> /dev/null || true) if [ -z "$system_php" ] && [ -x "/usr/bin/php" ]; then - system_php="/usr/bin/php" + system_php="/usr/bin/php" fi -php_binary="$HESTIA_PHP" +php_binary="$TULIO_PHP" if [ -z "$php_binary" ] || [ ! -x "$php_binary" ]; then - php_binary="$system_php" + php_binary="$system_php" fi if [ -z "$php_binary" ] || [ ! -x "$php_binary" ]; then - echo "ERROR: Unable to locate a PHP binary required for installing Tulio dependencies." - exit 1 + echo "ERROR: Unable to locate a PHP binary required for installing Tulio dependencies." + exit 1 fi -openssl_installed=$("$php_binary" -m 2>/dev/null | grep openssl || true) +openssl_installed=$("$php_binary" -m 2> /dev/null | grep openssl || true) if [ -z "$system_php" ] || [ ! -x "$system_php" ]; then - system_php="$php_binary" + system_php="$php_binary" fi cd "$PM_INSTALL_DIR" @@ -90,9 +89,9 @@ mkdir -p ${PM_INSTALL_DIR}/vendor chown $user: -R ${PM_INSTALL_DIR}/vendor if [ -z "$openssl_installed" ]; then - COMPOSER_HOME="$HOMEDIR/$user/.config/composer" user_exec "$system_php" "$COMPOSER_BIN" --quiet --no-dev install + COMPOSER_HOME="$HOMEDIR/$user/.config/composer" user_exec "$system_php" "$COMPOSER_BIN" --quiet --no-dev install else - COMPOSER_HOME="$HOMEDIR/$user/.config/composer" user_exec "$php_binary" "$COMPOSER_BIN" --quiet --no-dev install + COMPOSER_HOME="$HOMEDIR/$user/.config/composer" user_exec "$php_binary" "$COMPOSER_BIN" --quiet --no-dev install fi # Check if installation was successful, if not abort script and throw error message notification and clean-up @@ -114,9 +113,9 @@ mkdir -p ${QUICK_INSTALL_DIR}/vendor chown $user: -R ${QUICK_INSTALL_DIR}/vendor if [ -z "$openssl_installed" ]; then - COMPOSER_HOME="$HOMEDIR/$user/.config/composer" user_exec "$system_php" "$COMPOSER_BIN" --quiet --no-dev install + COMPOSER_HOME="$HOMEDIR/$user/.config/composer" user_exec "$system_php" "$COMPOSER_BIN" --quiet --no-dev install else - COMPOSER_HOME="$HOMEDIR/$user/.config/composer" user_exec "$php_binary" "$COMPOSER_BIN" --quiet --no-dev install + COMPOSER_HOME="$HOMEDIR/$user/.config/composer" user_exec "$php_binary" "$COMPOSER_BIN" --quiet --no-dev install fi # Set permissions diff --git a/bin/v-add-sys-filemanager b/bin/v-add-sys-filemanager index 71052fddb..666a10fbe 100755 --- a/bin/v-add-sys-filemanager +++ b/bin/v-add-sys-filemanager @@ -13,18 +13,17 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # load config file -source_conf "$HESTIA/install/upgrade/upgrade.conf" +source_conf "$TULIO/install/upgrade/upgrade.conf" MODE=$1 user="$ROOT_USER" -FM_INSTALL_DIR="$HESTIA/web/fm" +FM_INSTALL_DIR="$TULIO/web/fm" FM_FILE="filegator_latest" FM_URL="https://github.com/filegator/static/raw/master/builds/filegator_latest.zip" COMPOSER_BIN="$HOMEDIR/$user/.composer/composer" @@ -39,12 +38,12 @@ if [ "x$(id -u)" != 'x0' ]; then exit 10 fi -# Ensure that $HESTIA (/usr/local/tulio/) and other variables are valid. -if [ -z "$HESTIA" ]; then - HESTIA="/usr/local/tulio" +# Ensure that $TULIO (/usr/local/tulio/) and other variables are valid. +if [ -z "$TULIO" ]; then + TULIO="/usr/local/tulio" fi -if [ -z "$HOMEDIR" ] || [ -z "$HESTIA_INSTALL_DIR" ]; then +if [ -z "$HOMEDIR" ] || [ -z "$TULIO_INSTALL_DIR" ]; then echo "ERROR: Environment variables not present, installation aborted." exit 2 fi @@ -65,25 +64,25 @@ check_tulio_demo_mode # Action # #----------------------------------------------------------# -system_php=$(command -v php 2>/dev/null || true) +system_php=$(command -v php 2> /dev/null || true) if [ -z "$system_php" ] && [ -x "/usr/bin/php" ]; then - system_php="/usr/bin/php" + system_php="/usr/bin/php" fi -php_binary="$HESTIA_PHP" +php_binary="$TULIO_PHP" if [ -z "$php_binary" ] || [ ! -x "$php_binary" ]; then - php_binary="$system_php" + php_binary="$system_php" fi if [ -z "$php_binary" ] || [ ! -x "$php_binary" ]; then - echo "ERROR: Unable to locate a PHP binary required for the File Manager installation." - exit 1 + echo "ERROR: Unable to locate a PHP binary required for the File Manager installation." + exit 1 fi -openssl_installed=$("$php_binary" -m 2>/dev/null | grep openssl || true) +openssl_installed=$("$php_binary" -m 2> /dev/null | grep openssl || true) if [ -z "$system_php" ] || [ ! -x "$system_php" ]; then - system_php="$php_binary" + system_php="$php_binary" fi rm --recursive --force "$FM_INSTALL_DIR" @@ -97,14 +96,14 @@ mv --force ${FM_INSTALL_DIR}/filegator/* "${FM_INSTALL_DIR}" rm --recursive --force ${FM_INSTALL_DIR}/${FM_FILE} [[ -f "${FM_INSTALL_DIR}/${FM_FILE}" ]] && rm "${FM_INSTALL_DIR}/${FM_FILE}" -cp --recursive --force ${HESTIA_INSTALL_DIR}/filemanager/filegator/* "${FM_INSTALL_DIR}" +cp --recursive --force ${TULIO_INSTALL_DIR}/filemanager/filegator/* "${FM_INSTALL_DIR}" chown $user: -R "${FM_INSTALL_DIR}" if [ -z "$openssl_installed" ]; then - COMPOSER_HOME="$HOMEDIR/$user/.config/composer" user_exec "$system_php" "$COMPOSER_BIN" --quiet --no-dev install + COMPOSER_HOME="$HOMEDIR/$user/.config/composer" user_exec "$system_php" "$COMPOSER_BIN" --quiet --no-dev install else - COMPOSER_HOME="$HOMEDIR/$user/.config/composer" user_exec "$php_binary" "$COMPOSER_BIN" --quiet --no-dev install + COMPOSER_HOME="$HOMEDIR/$user/.config/composer" user_exec "$php_binary" "$COMPOSER_BIN" --quiet --no-dev install fi # Check if installation was successful, if not abort script and throw error message notification and clean-up @@ -121,10 +120,10 @@ if [ $? -ne 0 ]; then fi # Add configuration file -cp -f $HESTIA_INSTALL_DIR/filemanager/filegator/configuration.php $HESTIA/web/fm/configuration.php +cp -f $TULIO_INSTALL_DIR/filemanager/filegator/configuration.php $TULIO/web/fm/configuration.php # Path to the file manager configuration file where the change will be made. -config_file="$HESTIA/web/fm/configuration.php" +config_file="$TULIO/web/fm/configuration.php" app_name="File Manager - $APP_NAME" # Sed replaces only the value after "File Manager -" diff --git a/bin/v-add-sys-firewall b/bin/v-add-sys-firewall index 6128d9397..5a0049fd5 100755 --- a/bin/v-add-sys-firewall +++ b/bin/v-add-sys-firewall @@ -14,11 +14,10 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -36,9 +35,9 @@ check_tulio_demo_mode #----------------------------------------------------------# # Adding default ruleset -if [ -z "$(ls -A $HESTIA/data/firewall 2> /dev/null)" ]; then - cp -rf $HESTIA_COMMON_DIR/firewall $HESTIA/data/ - rm -f $HESTIA/data/firewall/ipset/blacklist.sh $HESTIA/data/firewall/ipset/blacklist.ipv6.sh +if [ -z "$(ls -A $TULIO/data/firewall 2> /dev/null)" ]; then + cp -rf $TULIO_COMMON_DIR/firewall $TULIO/data/ + rm -f $TULIO/data/firewall/ipset/blacklist.sh $TULIO/data/firewall/ipset/blacklist.ipv6.sh fi # Updating FIREWAL_SYSTEM value diff --git a/bin/v-add-sys-ip b/bin/v-add-sys-ip index 53554275d..818efb939 100755 --- a/bin/v-add-sys-ip +++ b/bin/v-add-sys-ip @@ -37,17 +37,16 @@ nat_ip="$7" # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/syshealth.sh -source "$HESTIA/func/syshealth.sh" +source "$TULIO/func/syshealth.sh" # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" if [ -z "$4" ]; then user="$ROOT_USER" @@ -133,8 +132,8 @@ INTERFACE='$iface' NETMASK='$netmask' NAT='$nat_ip' TIME='$time' -DATE='$date'" > $HESTIA/data/ips/$ip -chmod 660 $HESTIA/data/ips/$ip +DATE='$date'" > $TULIO/data/ips/$ip +chmod 660 $TULIO/data/ips/$ip # WEB support if [ -n "$WEB_SYSTEM" ]; then @@ -146,12 +145,12 @@ if [ -n "$WEB_SYSTEM" ]; then echo "NameVirtualHost $ip:$WEB_PORT" > "$web_conf" fi echo "Listen $ip:$WEB_PORT" >> "$web_conf" - cat $HESTIA_INSTALL_DIR/apache2/unassigned.conf >> "$web_conf" + cat $TULIO_INSTALL_DIR/apache2/unassigned.conf >> "$web_conf" sed -i 's/directIP/'$ip'/g' "$web_conf" sed -i 's/directPORT/'$WEB_PORT'/g' "$web_conf" elif [ "$WEB_SYSTEM" = 'nginx' ]; then - cp -f $HESTIA_INSTALL_DIR/nginx/unassigned.inc "$web_conf" + cp -f $TULIO_INSTALL_DIR/nginx/unassigned.inc "$web_conf" sed -i 's/directIP/'$ip'/g' "$web_conf" process_http2_directive "$web_conf" fi @@ -201,7 +200,7 @@ if [ -n "$PROXY_SYSTEM" ]; then fi fi -# Adapt Port Listing in HESTIA NGINX Backend +# Adapt Port Listing in TULIO NGINX Backend syshealth_adapt_tulio_nginx_listen_ports # Also update resolver syshealth_adapt_nginx_resolver diff --git a/bin/v-add-sys-pma-sso b/bin/v-add-sys-pma-sso index 4f7e33b56..c2f411761 100755 --- a/bin/v-add-sys-pma-sso +++ b/bin/v-add-sys-pma-sso @@ -16,11 +16,10 @@ MODE=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" PMA_INSTALL="/usr/share/phpmyadmin" PMA_CONFIG="/etc/phpmyadmin" @@ -67,14 +66,14 @@ phpmyadminkey=$(generate_password) apikey=$($BIN/v-add-access-key "$ROOT_USER" 'phpmyadmin-sso' 'phpMyAdmin' 'plain') # copy config dir to /usr/share/phpmyadmin/ -cp -f $HESTIA_INSTALL_DIR/phpmyadmin/tulio-sso.php $PMA_INSTALL/tulio-sso.php +cp -f $TULIO_INSTALL_DIR/phpmyadmin/tulio-sso.php $PMA_INSTALL/tulio-sso.php chmod 640 $PMA_INSTALL/tulio-sso.php chown root:tuliomail $PMA_INSTALL/tulio-sso.php sed -i "s/%PHPMYADMIN_KEY%/$phpmyadminkey/g" $PMA_INSTALL/tulio-sso.php sed -i "s/%API_KEY%/$apikey/g" $PMA_INSTALL/tulio-sso.php sed -i "s/%API_HOST_NAME%/$(hostname)/g" $PMA_INSTALL/tulio-sso.php -sed -i "s/%API_HESTIA_PORT%/$BACKEND_PORT/g" $PMA_INSTALL/tulio-sso.php +sed -i "s/%API_TULIO_PORT%/$BACKEND_PORT/g" $PMA_INSTALL/tulio-sso.php # Check if config already contains the keys touch $PMA_CONFIG/tulio-sso.inc.php diff --git a/bin/v-add-sys-quota b/bin/v-add-sys-quota index 96300272e..42c59e518 100755 --- a/bin/v-add-sys-quota +++ b/bin/v-add-sys-quota @@ -14,10 +14,9 @@ # Includes # shellcheck source=/usr/local/tulio/func/main.sh : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" -source "$HESTIA/func/main.sh" +source "$TULIO/func/main.sh" # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-add-sys-roundcube b/bin/v-add-sys-roundcube index 720ec84e8..52bc8d9a2 100755 --- a/bin/v-add-sys-roundcube +++ b/bin/v-add-sys-roundcube @@ -12,14 +12,13 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh -source $HESTIA/func/db.sh +source $TULIO/func/main.sh +source $TULIO/func/db.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # upgrade config file -source "$HESTIA/install/upgrade/upgrade.conf" +source "$TULIO/install/upgrade/upgrade.conf" MODE=$2 UPDATE="no" @@ -44,12 +43,12 @@ if [ "x$(id -u)" != 'x0' ]; then exit 10 fi -# Ensure that $HESTIA (/usr/local/tulio/) and other variables are valid. -if [ -z "$HESTIA" ]; then - HESTIA="/usr/local/tulio" +# Ensure that $TULIO (/usr/local/tulio/) and other variables are valid. +if [ -z "$TULIO" ]; then + TULIO="/usr/local/tulio" fi -if [ -z "$HOMEDIR" ] || [ -z "$HESTIA_COMMON_DIR" ]; then +if [ -z "$HOMEDIR" ] || [ -z "$TULIO_COMMON_DIR" ]; then echo "ERROR: Environment variables not present, installation aborted." exit 2 fi @@ -100,21 +99,21 @@ if [ "$UPDATE" == "no" ]; then rm -f -r $RC_INSTALL_DIR/config/ ln -s $RC_CONFIG_DIR/ ./config # Replace with Tulio config - cp -f $HESTIA_COMMON_DIR/roundcube/main.inc.php $RC_CONFIG_DIR/config.inc.php - cp -f $HESTIA_COMMON_DIR/roundcube/mimetypes.php $RC_CONFIG_DIR/mimetypes.php + cp -f $TULIO_COMMON_DIR/roundcube/main.inc.php $RC_CONFIG_DIR/config.inc.php + cp -f $TULIO_COMMON_DIR/roundcube/mimetypes.php $RC_CONFIG_DIR/mimetypes.php chmod 644 $RC_CONFIG_DIR/*.php - cp -f $HESTIA_COMMON_DIR/roundcube/tulio.php $RC_INSTALL_DIR/plugins/password/drivers/ + cp -f $TULIO_COMMON_DIR/roundcube/tulio.php $RC_INSTALL_DIR/plugins/password/drivers/ mkdir -p $RC_CONFIG_DIR/plugins/password mkdir -p $RC_CONFIG_DIR/plugins/newmail_notifier mkdir -p $RC_CONFIG_DIR/plugins/zipdownload # Allow changes to the respective config / Create symlinks to /etc/roundcube/ - cp -f $HESTIA_COMMON_DIR/roundcube/config.inc.php $RC_CONFIG_DIR/plugins/password/config.inc.php + cp -f $TULIO_COMMON_DIR/roundcube/config.inc.php $RC_CONFIG_DIR/plugins/password/config.inc.php ln -s $RC_CONFIG_DIR/plugins/password/config.inc.php ./plugins/password/config.inc.php - cp -f $HESTIA_COMMON_DIR/roundcube/plugins/config_newmail_notifier.inc.php $RC_CONFIG_DIR/plugins/newmail_notifier/config.inc.php + cp -f $TULIO_COMMON_DIR/roundcube/plugins/config_newmail_notifier.inc.php $RC_CONFIG_DIR/plugins/newmail_notifier/config.inc.php ln -s $RC_CONFIG_DIR/plugins/newmail_notifier/config.inc.php ./plugins/newmail_notifier/config.inc.php - cp -f $HESTIA_COMMON_DIR/roundcube/plugins/config_zipdownload.inc.php $RC_CONFIG_DIR/plugins/zipdownload/config.inc.php + cp -f $TULIO_COMMON_DIR/roundcube/plugins/config_zipdownload.inc.php $RC_CONFIG_DIR/plugins/zipdownload/config.inc.php ln -s $RC_CONFIG_DIR/plugins/zipdownload/config.inc.php ./plugins/zipdownload/config.inc.php # Set up correct permissions roundcube @@ -168,7 +167,7 @@ if [ "$UPDATE" == "no" ]; then rm -f -r $RC_INSTALL_DIR/$RC_EXTRACT # Updating tulio.conf - if [ -z "$(grep WEBMAIL_SYSTEM $HESTIA/conf/tulio.conf)" ]; then + if [ -z "$(grep WEBMAIL_SYSTEM $TULIO/conf/tulio.conf)" ]; then $BIN/v-change-sys-config-value 'WEBMAIL_SYSTEM' 'roundcube' else if [ -z "$(echo "$WEBMAIL_SYSTEM" | grep -w 'roundcube')" ]; then diff --git a/bin/v-add-sys-sftp-jail b/bin/v-add-sys-sftp-jail index c96d3d52b..e30dbc7f5 100755 --- a/bin/v-add-sys-sftp-jail +++ b/bin/v-add-sys-sftp-jail @@ -14,11 +14,10 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" restart=$1 @@ -60,7 +59,7 @@ fi # Validating opensshd config if [ "$restart" = 'yes' ]; then subj="OpenSSH restart failed" - email=$(grep CONTACT "$HESTIA/data/users/$ROOT_USER/user.conf" | cut -f 2 -d \') + email=$(grep CONTACT "$TULIO/data/users/$ROOT_USER/user.conf" | cut -f 2 -d \') /usr/sbin/sshd -t > /dev/null 2>&1 if [ "$?" -ne 0 ]; then mail_text="OpenSSH can not be restarted. Please check config: diff --git a/bin/v-add-sys-smtp b/bin/v-add-sys-smtp index 6d2a0c904..bd6264fc7 100755 --- a/bin/v-add-sys-smtp +++ b/bin/v-add-sys-smtp @@ -23,11 +23,10 @@ email=$6 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-add-sys-smtp-relay b/bin/v-add-sys-smtp-relay index eebc8579d..721d5ab4e 100755 --- a/bin/v-add-sys-smtp-relay +++ b/bin/v-add-sys-smtp-relay @@ -20,11 +20,10 @@ port=${4-587} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-add-sys-snappymail b/bin/v-add-sys-snappymail index 26854d502..c215e14ed 100755 --- a/bin/v-add-sys-snappymail +++ b/bin/v-add-sys-snappymail @@ -12,13 +12,12 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # upgrade config file -source "$HESTIA/install/upgrade/upgrade.conf" +source "$TULIO/install/upgrade/upgrade.conf" MODE=$1 UPDATE="no" @@ -46,12 +45,12 @@ if [ "x$(id -u)" != 'x0' ]; then exit 10 fi -# Ensure that $HESTIA (/usr/local/tulio/) and other variables are valid. -if [ -z "$HESTIA" ]; then - HESTIA="/usr/local/tulio" +# Ensure that $TULIO (/usr/local/tulio/) and other variables are valid. +if [ -z "$TULIO" ]; then + TULIO="/usr/local/tulio" fi -if [ -z "$HOMEDIR" ] || [ -z "$HESTIA_INSTALL_DIR" ]; then +if [ -z "$HOMEDIR" ] || [ -z "$TULIO_INSTALL_DIR" ]; then echo "ERROR: Environment variables not present, installation aborted." exit 2 fi @@ -127,7 +126,7 @@ if [ "$UPDATE" == "no" ]; then fi # Temporarily set the permissions to www-data chown -R www-data:www-data $SM_CONFIG_DIR/ - php -f $HESTIA_COMMON_DIR/snappymail/install.php "admin_$key" "admin_$suffix" "$admin_password" "$r" "$BACKEND_PORT" + php -f $TULIO_COMMON_DIR/snappymail/install.php "admin_$key" "admin_$suffix" "$admin_password" "$r" "$BACKEND_PORT" # Set the permissions back to tuliomail chown -R tuliomail:www-data $SM_CONFIG_DIR/ @@ -139,7 +138,7 @@ if [ "$UPDATE" == "no" ]; then echo "Disallow: /" >> $SM_INSTALL_DIR/robots.txt # Updating tulio.conf - if [ -z "$(grep WEBMAIL_SYSTEM $HESTIA/conf/tulio.conf)" ]; then + if [ -z "$(grep WEBMAIL_SYSTEM $TULIO/conf/tulio.conf)" ]; then $BIN/v-change-sys-config-value 'WEBMAIL_SYSTEM' 'snappymail' else if [ -z "$(echo "$WEBMAIL_SYSTEM" | grep -w 'snappymail')" ]; then diff --git a/bin/v-add-sys-ssh-jail b/bin/v-add-sys-ssh-jail index 16b5ed5e5..7e531600f 100755 --- a/bin/v-add-sys-ssh-jail +++ b/bin/v-add-sys-ssh-jail @@ -14,11 +14,10 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -38,12 +37,12 @@ check_tulio_demo_mode # Move jailbash to /usr/sbin if [ ! -x /usr/sbin/jailbash ]; then - cp -f $HESTIA_COMMON_DIR/bubblewrap/jailbash /usr/sbin/jailbash + cp -f $TULIO_COMMON_DIR/bubblewrap/jailbash /usr/sbin/jailbash chmod +x /usr/sbin/jailbash # only install the apparmor profile is abi 4.0 is available if [ -f /etc/apparmor.d/abi/4.0 ]; then - cp -f $HESTIA_COMMON_DIR/bubblewrap/bwrap-userns-restrict /etc/apparmor.d/bwrap-userns-restrict + cp -f $TULIO_COMMON_DIR/bubblewrap/bwrap-userns-restrict /etc/apparmor.d/bwrap-userns-restrict fi service apparmor reload > /dev/null 2>&1 diff --git a/bin/v-add-sys-web-terminal b/bin/v-add-sys-web-terminal index 701be7ecb..e9c749bfe 100755 --- a/bin/v-add-sys-web-terminal +++ b/bin/v-add-sys-web-terminal @@ -14,11 +14,10 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -61,7 +60,7 @@ else fi fi -if [ ! -f "$HESTIA/web-terminal/server.js" ]; then +if [ ! -f "$TULIO/web-terminal/server.js" ]; then apt-get -qq update apt-get -qq install tulio-web-terminal -y else diff --git a/bin/v-add-user b/bin/v-add-user index 7c07ad249..7926d6a4a 100755 --- a/bin/v-add-user +++ b/bin/v-add-user @@ -28,11 +28,10 @@ FROM_V_ADD_USER=true # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" is_user_free() { # these names may cause issues with MariaDB/MySQL database names and should be reserved: @@ -73,7 +72,7 @@ check_tulio_demo_mode #----------------------------------------------------------# # Parsing package data -pkg_data=$(cat $HESTIA/data/packages/$package.pkg | egrep -v "TIME|DATE") +pkg_data=$(cat $TULIO/data/packages/$package.pkg | egrep -v "TIME|DATE") # Checking shell shell_conf=$(echo "$pkg_data" | grep -m1 'SHELL' | cut -f 2 -d \') @@ -189,18 +188,18 @@ chmod 660 $USER_DATA/backup.conf \ $USER_DATA/cron.conf # Updating queue pipes -echo "$BIN/v-update-user-disk $user" >> $HESTIA/data/queue/disk.pipe +echo "$BIN/v-update-user-disk $user" >> $TULIO/data/queue/disk.pipe if [ -n "$WEB_SYSTEM" ]; then echo "$BIN/v-update-web-domains-traff $user" \ - >> $HESTIA/data/queue/traffic.pipe - echo "$BIN/v-update-web-domains-disk $user" >> $HESTIA/data/queue/disk.pipe + >> $TULIO/data/queue/traffic.pipe + echo "$BIN/v-update-web-domains-disk $user" >> $TULIO/data/queue/disk.pipe fi if [ -n "$MAIL_SYSTEM" ]; then - echo "$BIN/v-update-mail-domains-disk $user" >> $HESTIA/data/queue/disk.pipe + echo "$BIN/v-update-mail-domains-disk $user" >> $TULIO/data/queue/disk.pipe fi if [ -n "$DB_SYSTEM" ]; then - echo "$BIN/v-update-databases-disk $user" >> $HESTIA/data/queue/disk.pipe + echo "$BIN/v-update-databases-disk $user" >> $TULIO/data/queue/disk.pipe fi # Generating timestamp @@ -283,8 +282,8 @@ if [ "$user" != "$ROOT_USER" ]; then fi # Run template trigger -if [ -x "$HESTIA/data/packages/$package.sh" ]; then - $HESTIA/data/packages/$package.sh "$user" "$email" "$name" +if [ -x "$TULIO/data/packages/$package.sh" ]; then + $TULIO/data/packages/$package.sh "$user" "$email" "$name" fi # Adding jailed sftp env diff --git a/bin/v-add-user-2fa b/bin/v-add-user-2fa index b89558a01..de18454f5 100755 --- a/bin/v-add-user-2fa +++ b/bin/v-add-user-2fa @@ -17,11 +17,10 @@ user=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -48,7 +47,7 @@ if [ -n "$TWOFA" ]; then fi # Get secret and qr code from 2fa library -data=$($HESTIA_PHP $HESTIA/web/inc/2fa/secret.php) +data=$($TULIO_PHP $TULIO/web/inc/2fa/secret.php) # Split to secret and qrcode using delimiter IFS='-' read -r -a array <<< "$data" diff --git a/bin/v-add-user-composer b/bin/v-add-user-composer index 306bf45ad..e9038a8ad 100755 --- a/bin/v-add-user-composer +++ b/bin/v-add-user-composer @@ -16,19 +16,18 @@ user=$1 version=${2-2} update=$3 -if [ -z "$HESTIA" ]; then - HESTIA="/usr/local/tulio" +if [ -z "$TULIO" ]; then + TULIO="/usr/local/tulio" fi # Includes # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-add-user-notification b/bin/v-add-user-notification index 92405c253..614062406 100755 --- a/bin/v-add-user-notification +++ b/bin/v-add-user-notification @@ -19,11 +19,10 @@ priority=$5 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-add-user-package b/bin/v-add-user-package index d5156fe96..5c3d9e684 100755 --- a/bin/v-add-user-package +++ b/bin/v-add-user-package @@ -17,13 +17,12 @@ rewrite=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" is_package_consistent() { source_conf "$tmpfile" @@ -155,9 +154,9 @@ BACKUPS='$BACKUPS' BACKUPS_INCREMENTAL='$BACKUPS_INCREMENTAL' TIME='$time' DATE='$date' -" > "$HESTIA/data/packages/$package.pkg" +" > "$TULIO/data/packages/$package.pkg" -chmod 644 "$HESTIA/data/packages/$package.pkg" +chmod 644 "$TULIO/data/packages/$package.pkg" #----------------------------------------------------------# # TulioCP # diff --git a/bin/v-add-user-sftp-jail b/bin/v-add-user-sftp-jail index f71ec5635..d06b95af3 100755 --- a/bin/v-add-user-sftp-jail +++ b/bin/v-add-user-sftp-jail @@ -18,11 +18,10 @@ restart=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-add-user-sftp-key b/bin/v-add-user-sftp-key index bce76f350..8686739d9 100755 --- a/bin/v-add-user-sftp-key +++ b/bin/v-add-user-sftp-key @@ -16,11 +16,10 @@ ttl=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-add-user-ssh-key b/bin/v-add-user-ssh-key index c90f9b2d7..e684a9e6f 100755 --- a/bin/v-add-user-ssh-key +++ b/bin/v-add-user-ssh-key @@ -19,11 +19,10 @@ key=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-add-user-wp-cli b/bin/v-add-user-wp-cli index f3cbd4e95..ca34fdb9b 100755 --- a/bin/v-add-user-wp-cli +++ b/bin/v-add-user-wp-cli @@ -14,18 +14,17 @@ user=$1 update=$2 -if [ -z "$HESTIA" ]; then - HESTIA="/usr/local/tulio" +if [ -z "$TULIO" ]; then + TULIO="/usr/local/tulio" fi # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-add-web-domain b/bin/v-add-web-domain index 500f7626f..3c08345f7 100755 --- a/bin/v-add-web-domain +++ b/bin/v-add-web-domain @@ -28,17 +28,16 @@ proxy_ext=$6 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # shellcheck source=/usr/local/tulio/func/syshealth.sh -source $HESTIA/func/syshealth.sh +source $TULIO/func/syshealth.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-add-web-domain-alias b/bin/v-add-web-domain-alias index 394bb5089..445ff7ebd 100755 --- a/bin/v-add-web-domain-alias +++ b/bin/v-add-web-domain-alias @@ -22,15 +22,14 @@ restart="$4" # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-add-web-domain-allow-users b/bin/v-add-web-domain-allow-users index da7541555..f8f9735a8 100755 --- a/bin/v-add-web-domain-allow-users +++ b/bin/v-add-web-domain-allow-users @@ -22,15 +22,14 @@ domain_idn=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-add-web-domain-backend b/bin/v-add-web-domain-backend index 4434da8c0..34b3a2edb 100755 --- a/bin/v-add-web-domain-backend +++ b/bin/v-add-web-domain-backend @@ -20,15 +20,14 @@ restart=$4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio.conf/tulio.conf -source $HESTIA/conf/tulio.conf +source $TULIO/conf/tulio.conf # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-add-web-domain-ftp b/bin/v-add-web-domain-ftp index 630f13e9e..33b66e826 100755 --- a/bin/v-add-web-domain-ftp +++ b/bin/v-add-web-domain-ftp @@ -23,13 +23,12 @@ ftp_path=$5 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-add-web-domain-httpauth b/bin/v-add-web-domain-httpauth index 24ea4dd9e..3cb4c62b7 100755 --- a/bin/v-add-web-domain-httpauth +++ b/bin/v-add-web-domain-httpauth @@ -22,13 +22,12 @@ restart=${5-yes} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Defining htpasswd file htpasswd="$HOMEDIR/$user/conf/web/$domain/htpasswd" diff --git a/bin/v-add-web-domain-proxy b/bin/v-add-web-domain-proxy index a994232ce..b45f3a517 100755 --- a/bin/v-add-web-domain-proxy +++ b/bin/v-add-web-domain-proxy @@ -24,15 +24,14 @@ restart="$5" # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-add-web-domain-redirect b/bin/v-add-web-domain-redirect index 323514ec1..c464abed0 100755 --- a/bin/v-add-web-domain-redirect +++ b/bin/v-add-web-domain-redirect @@ -26,11 +26,10 @@ restart=${5-no} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -47,10 +46,10 @@ is_object_unsuspended 'web' 'DOMAIN' "$domain" requesturi=0 if [[ "$3" =~ http://|https:// ]]; then scheme_check=1 - scheme=$($HESTIA_PHP -r '$url=parse_url($argv[1]); echo $url["scheme"];' "$redirect") - host=$($HESTIA_PHP -r '$url=parse_url($argv[1]); echo $url["host"];' "$redirect") - path=$($HESTIA_PHP -r '$url=parse_url($argv[1]); if(!empty($url["path"])){echo $url["path"];}' "$redirect") - port=$($HESTIA_PHP -r '$url=parse_url($argv[1]); if(!empty($url["port"])){echo $url["port"];}' "$redirect") + scheme=$($TULIO_PHP -r '$url=parse_url($argv[1]); echo $url["scheme"];' "$redirect") + host=$($TULIO_PHP -r '$url=parse_url($argv[1]); echo $url["host"];' "$redirect") + path=$($TULIO_PHP -r '$url=parse_url($argv[1]); if(!empty($url["path"])){echo $url["path"];}' "$redirect") + port=$($TULIO_PHP -r '$url=parse_url($argv[1]); if(!empty($url["port"])){echo $url["port"];}' "$redirect") host=$(idn2 --quiet "$host") redirect="$scheme://$host$path" @@ -63,9 +62,9 @@ if [[ "$3" =~ http://|https:// ]]; then check_result $E_INVALID "Invalid redirect" fi else - host=$($HESTIA_PHP -r '$url=parse_url($argv[1]); echo $url["host"];' "http://$redirect") - path=$($HESTIA_PHP -r '$url=parse_url($argv[1]); if(!empty($url["path"])){echo $url["path"];}' "http://$redirect") - port=$($HESTIA_PHP -r '$url=parse_url($argv[1]); if(!empty($url["port"])){echo $url["port"];}' "$redirect") + host=$($TULIO_PHP -r '$url=parse_url($argv[1]); echo $url["host"];' "http://$redirect") + path=$($TULIO_PHP -r '$url=parse_url($argv[1]); if(!empty($url["path"])){echo $url["path"];}' "http://$redirect") + port=$($TULIO_PHP -r '$url=parse_url($argv[1]); if(!empty($url["port"])){echo $url["port"];}' "$redirect") host=$(idn2 --quiet "$host") diff --git a/bin/v-add-web-domain-ssl b/bin/v-add-web-domain-ssl index 2ce2be0e1..edc6c548e 100755 --- a/bin/v-add-web-domain-ssl +++ b/bin/v-add-web-domain-ssl @@ -29,15 +29,14 @@ domain_idn=$(idn2 --quiet "$domain") # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-add-web-domain-ssl-force b/bin/v-add-web-domain-ssl-force index fff97a6f6..f26a878c2 100755 --- a/bin/v-add-web-domain-ssl-force +++ b/bin/v-add-web-domain-ssl-force @@ -20,11 +20,10 @@ quiet="$4" # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-add-web-domain-ssl-hsts b/bin/v-add-web-domain-ssl-hsts index 59da71330..bb48cc064 100755 --- a/bin/v-add-web-domain-ssl-hsts +++ b/bin/v-add-web-domain-ssl-hsts @@ -18,11 +18,10 @@ quiet="$4" # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-add-web-domain-ssl-preset b/bin/v-add-web-domain-ssl-preset index 2664b4941..95b3877c8 100755 --- a/bin/v-add-web-domain-ssl-preset +++ b/bin/v-add-web-domain-ssl-preset @@ -20,11 +20,10 @@ ssl=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-add-web-domain-stats b/bin/v-add-web-domain-stats index 692a745f0..390b2bd7c 100755 --- a/bin/v-add-web-domain-stats +++ b/bin/v-add-web-domain-stats @@ -23,13 +23,12 @@ type=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain @@ -96,7 +95,7 @@ fi #----------------------------------------------------------# # Schedule statistic processing -echo "$BIN/v-update-web-domain-stat $user $domain" >> $HESTIA/data/queue/webstats.pipe +echo "$BIN/v-update-web-domain-stat $user $domain" >> $TULIO/data/queue/webstats.pipe # Update config update_object_value 'web' 'DOMAIN' "$domain" '$STATS' "$type" diff --git a/bin/v-add-web-domain-stats-user b/bin/v-add-web-domain-stats-user index c557e7fce..cf2552837 100755 --- a/bin/v-add-web-domain-stats-user +++ b/bin/v-add-web-domain-stats-user @@ -22,13 +22,12 @@ restart=$5 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-add-web-php b/bin/v-add-web-php index 4fd090cd2..612eb7291 100755 --- a/bin/v-add-web-php +++ b/bin/v-add-web-php @@ -17,12 +17,11 @@ version=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" -source_conf "$HESTIA/install/upgrade/upgrade.conf" +source_conf "$TULIO/conf/tulio.conf" +source_conf "$TULIO/install/upgrade/upgrade.conf" #----------------------------------------------------------# # Verifications # #----------------------------------------------------------# @@ -44,7 +43,7 @@ if [[ ! $version =~ ^[0-9]+\.[0-9]+ ]]; then fi # Check if php version already exists -if [ -f "$php_fpm" ] && [ -f "$HESTIA/data/templates/web/php-fpm/PHP-${version/\./_}.tpl" ]; then +if [ -f "$php_fpm" ] && [ -f "$TULIO/data/templates/web/php-fpm/PHP-${version/\./_}.tpl" ]; then echo "ERROR: Specified PHP version is already installed." exit "$E_INVALID" fi @@ -124,9 +123,9 @@ fi update-rc.d php$version-fpm defaults > /dev/null 2>&1 v_tpl=${version//./} rm -f /etc/php/$version/fpm/pool.d/* -cp -f $HESTIA_INSTALL_DIR/php-fpm/dummy.conf /etc/php/$version/fpm/pool.d/ +cp -f $TULIO_INSTALL_DIR/php-fpm/dummy.conf /etc/php/$version/fpm/pool.d/ sed -i "s/%backend_version%/$version/g" /etc/php/$version/fpm/pool.d/dummy.conf -cp -f $HESTIA_INSTALL_DIR/php-fpm/php-fpm.conf /etc/php/$version/fpm/ +cp -f $TULIO_INSTALL_DIR/php-fpm/php-fpm.conf /etc/php/$version/fpm/ sed -i "s/fpm_v/$version/g" /etc/php/$version/fpm/php-fpm.conf # Increase max upload and max post size @@ -146,8 +145,8 @@ sed -i "s/;opcache.memory_consumption=128/opcache.memory_consumption=512/g" /etc sed -i "s/;opcache.max_accelerated_files=10000/opcache.max_accelerated_files=100000/g" /etc/php/$version/fpm/php.ini # Install backend template -cp -f $HESTIA_INSTALL_DIR/php-fpm/multiphp.tpl \ - $HESTIA/data/templates/web/php-fpm/PHP-${version/\./_}.tpl +cp -f $TULIO_INSTALL_DIR/php-fpm/multiphp.tpl \ + $TULIO/data/templates/web/php-fpm/PHP-${version/\./_}.tpl #----------------------------------------------------------# # TulioCP # diff --git a/bin/v-backup-user b/bin/v-backup-user index 8fd42aabf..e019eff99 100755 --- a/bin/v-backup-user +++ b/bin/v-backup-user @@ -18,17 +18,16 @@ notify=${2-no} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/db.sh -source $HESTIA/func/db.sh +source $TULIO/func/db.sh # shellcheck source=/usr/local/tulio/func/backup.sh -source $HESTIA/func/backup.sh +source $TULIO/func/backup.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Return Disk Usage get_user_disk_usage() { @@ -176,7 +175,7 @@ start_time=$(date '+%s') # Set notification email and subject subj="$user โ†’ backup failed" -email=$(grep CONTACT "$HESTIA/data/users/$ROOT_USER/user.conf" | cut -f 2 -d \') +email=$(grep CONTACT "$TULIO/data/users/$ROOT_USER/user.conf" | cut -f 2 -d \') # Validate available disk space (take usage * 2, due to the backup handling) let u_disk=$(($(get_user_disk_usage) * 2)) @@ -187,7 +186,7 @@ if [ "$u_disk" -gt "$v_disk" ]; then # Always notify on failure echo "Not enough disk space available ($v_disk mb) to perform the backup of $user. ( $u_disk_original mb * 2 = $u_disk mb). https://tuliocp.com/docs/server-administration/backup-restore.html" | $SENDMAIL -s "$subj" "$email" "yes" # Deleting task from queue - sed -i "/v-backup-user $user /d" $HESTIA/data/queue/backup.pipe + sed -i "/v-backup-user $user /d" $TULIO/data/queue/backup.pipe check_result "$E_LIMIT" "not enough disk space available ($v_disk mb) to perform the backup of $user. ( $u_disk_original mb * 2 = $u_disk mb)." fi @@ -201,7 +200,7 @@ tmpdir=$(mktemp -p $BACKUP_TEMP -d) if [ "$?" -ne 0 ]; then echo "Can't create tmp dir $tmpdir" | $SENDMAIL -s "$subj" "$email" "yes" # Deleting task from queue - sed -i "/v-backup-user $user /d" $HESTIA/data/queue/backup.pipe + sed -i "/v-backup-user $user /d" $TULIO/data/queue/backup.pipe check_result "$E_NOTEXIST" "can't create tmp dir" fi @@ -342,17 +341,17 @@ if [ -n "$WEB_SYSTEM" ] && [ "$WEB" != '*' ]; then mkdir template/php-fpm/ if [ $WEB_BACKEND == 'php-fpm' ]; then - cp $HESTIA/data/templates/web/$WEB_SYSTEM/php-fpm/$TPL.tpl template/$WEB_SYSTEM/ - cp $HESTIA/data/templates/web/$WEB_SYSTEM/php-fpm/$TPL.stpl template/$WEB_SYSTEM/ - cp $HESTIA/data/templates/web/php-fpm/$BACKEND.tpl template/php-fpm/ + cp $TULIO/data/templates/web/$WEB_SYSTEM/php-fpm/$TPL.tpl template/$WEB_SYSTEM/ + cp $TULIO/data/templates/web/$WEB_SYSTEM/php-fpm/$TPL.stpl template/$WEB_SYSTEM/ + cp $TULIO/data/templates/web/php-fpm/$BACKEND.tpl template/php-fpm/ else - cp $HESTIA/data/templates/web/$WEB_SYSTEM/$TPL.tpl template/$WEB_SYSTEM/ - cp $HESTIA/data/templates/web/$WEB_SYSTEM/$TPL.stpl template/$WEB_SYSTEM/ + cp $TULIO/data/templates/web/$WEB_SYSTEM/$TPL.tpl template/$WEB_SYSTEM/ + cp $TULIO/data/templates/web/$WEB_SYSTEM/$TPL.stpl template/$WEB_SYSTEM/ fi if [ -n "$PROXY_SYSTEM" ] && [ -n "$PROXY" ]; then mkdir template/$PROXY_SYSTEM - cp $HESTIA/data/templates/web/$PROXY_SYSTEM/$PROXY.tpl template/$PROXY_SYSTEM/ - cp $HESTIA/data/templates/web/$PROXY_SYSTEM/$PROXY.stpl template/$PROXY_SYSTEM/ + cp $TULIO/data/templates/web/$PROXY_SYSTEM/$PROXY.tpl template/$PROXY_SYSTEM/ + cp $TULIO/data/templates/web/$PROXY_SYSTEM/$PROXY.stpl template/$PROXY_SYSTEM/ fi # Backup ssl certificates @@ -780,7 +779,7 @@ chmod 660 $USER_DATA/backup.conf chmod 660 $BACKUP/$user.log # Deleting task from queue -sed -i "/v-backup-user $user /d" $HESTIA/data/queue/backup.pipe +sed -i "/v-backup-user $user /d" $TULIO/data/queue/backup.pipe U_BACKUPS=$(grep BACKUP $USER_DATA/backup.conf | wc -l) update_user_value "$user" '$U_BACKUPS' "$U_BACKUPS" diff --git a/bin/v-backup-user-config b/bin/v-backup-user-config index 675abce48..c6395eaa0 100755 --- a/bin/v-backup-user-config +++ b/bin/v-backup-user-config @@ -17,17 +17,16 @@ user=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/db.sh -source $HESTIA/func/db.sh +source $TULIO/func/db.sh # shellcheck source=/usr/local/tulio/func/backup.sh -source $HESTIA/func/backup.sh +source $TULIO/func/backup.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -191,17 +190,17 @@ if [ -n "$WEB_SYSTEM" ] && [ "$WEB" != '*' ]; then mkdir -p template/php-fpm/ if [ $WEB_BACKEND == 'php-fpm' ]; then - cp $HESTIA/data/templates/web/$WEB_SYSTEM/php-fpm/$TPL.tpl template/$WEB_SYSTEM/ - cp $HESTIA/data/templates/web/$WEB_SYSTEM/php-fpm/$TPL.stpl template/$WEB_SYSTEM/ - cp $HESTIA/data/templates/web/php-fpm/$BACKEND.tpl template/php-fpm/ + cp $TULIO/data/templates/web/$WEB_SYSTEM/php-fpm/$TPL.tpl template/$WEB_SYSTEM/ + cp $TULIO/data/templates/web/$WEB_SYSTEM/php-fpm/$TPL.stpl template/$WEB_SYSTEM/ + cp $TULIO/data/templates/web/php-fpm/$BACKEND.tpl template/php-fpm/ else - cp $HESTIA/data/templates/web/$WEB_SYSTEM/$TPL.tpl template/$WEB_SYSTEM/ - cp $HESTIA/data/templates/web/$WEB_SYSTEM/$TPL.stpl template/$WEB_SYSTEM/ + cp $TULIO/data/templates/web/$WEB_SYSTEM/$TPL.tpl template/$WEB_SYSTEM/ + cp $TULIO/data/templates/web/$WEB_SYSTEM/$TPL.stpl template/$WEB_SYSTEM/ fi if [ -n "$PROXY_SYSTEM" ] && [ -n "$PROXY" ]; then mkdir -p template/$PROXY_SYSTEM - cp $HESTIA/data/templates/web/$PROXY_SYSTEM/$PROXY.tpl template/$PROXY_SYSTEM/ - cp $HESTIA/data/templates/web/$PROXY_SYSTEM/$PROXY.stpl template/$PROXY_SYSTEM/ + cp $TULIO/data/templates/web/$PROXY_SYSTEM/$PROXY.tpl template/$PROXY_SYSTEM/ + cp $TULIO/data/templates/web/$PROXY_SYSTEM/$PROXY.stpl template/$PROXY_SYSTEM/ fi # Backup ssl certificates diff --git a/bin/v-backup-user-restic b/bin/v-backup-user-restic index e6ffaa55e..8e8ba8b50 100755 --- a/bin/v-backup-user-restic +++ b/bin/v-backup-user-restic @@ -17,17 +17,16 @@ notify=${2-no} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/db.sh -source $HESTIA/func/db.sh +source $TULIO/func/db.sh # shellcheck source=/usr/local/tulio/func/backup.sh -source $HESTIA/func/backup.sh +source $TULIO/func/backup.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -49,9 +48,9 @@ check_tulio_demo_mode # Set notification email and subject subj="$user โ†’ backup failed" -email=$(grep CONTACT "$HESTIA/data/users/$ROOT_USER/user.conf" | cut -f 2 -d \') +email=$(grep CONTACT "$TULIO/data/users/$ROOT_USER/user.conf" | cut -f 2 -d \') -source_conf $HESTIA/conf/restic.conf +source_conf $TULIO/conf/restic.conf if [ ! -f "$USER_DATA/restic.conf" ]; then password=$(generate_password '' '32') @@ -109,7 +108,7 @@ if [ -e "$BACKUP/$user.log" ] && [ "$notify" = "yes" ]; then fi # Deleting task from queue -sed -i "/v-backup-user-restic $user /d" $HESTIA/data/queue/backup.pipe +sed -i "/v-backup-user-restic $user /d" $TULIO/data/queue/backup.pipe # Logging $BIN/v-log-action "$user" "Info" "Backup" "Backup created." diff --git a/bin/v-backup-users b/bin/v-backup-users index 2a13c4996..9de0e49eb 100755 --- a/bin/v-backup-users +++ b/bin/v-backup-users @@ -14,11 +14,10 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Perform verification if read-only mode is enabled check_tulio_demo_mode @@ -34,14 +33,14 @@ if [ -z "$BACKUP_SYSTEM" ]; then exit fi for user in $("$BIN/v-list-users" list); do - check_suspend=$(grep "SUSPENDED='no'" $HESTIA/data/users/$user/user.conf) - log=$HESTIA/log/backup.log - if [ ! -f "$HESTIA/data/users/$user/user.conf" ]; then + check_suspend=$(grep "SUSPENDED='no'" $TULIO/data/users/$user/user.conf) + log=$TULIO/log/backup.log + if [ ! -f "$TULIO/data/users/$user/user.conf" ]; then continue fi check_backup_conditions - check_suspend=$(grep "SUSPENDED='no'" $HESTIA/data/users/$user/user.conf) - log=$HESTIA/log/backup.log + check_suspend=$(grep "SUSPENDED='no'" $TULIO/data/users/$user/user.conf) + log=$TULIO/log/backup.log if [ -n "$check_suspend" ]; then echo -e "================================" >> $log echo -e "$user" >> $log diff --git a/bin/v-backup-users-restic b/bin/v-backup-users-restic index 6d007b2bb..0620a1b8b 100755 --- a/bin/v-backup-users-restic +++ b/bin/v-backup-users-restic @@ -14,11 +14,10 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Perform verification if read-only mode is enabled check_tulio_demo_mode @@ -35,14 +34,14 @@ if [ "$BACKUP_INCREMENTAL" != "yes" ]; then fi for user in $($BIN/v-list-sys-users plain); do - check_suspend=$(grep "SUSPENDED='no'" $HESTIA/data/users/$user/user.conf) - log=$HESTIA/log/backup.log - if [ ! -f "$HESTIA/data/users/$user/user.conf" ]; then + check_suspend=$(grep "SUSPENDED='no'" $TULIO/data/users/$user/user.conf) + log=$TULIO/log/backup.log + if [ ! -f "$TULIO/data/users/$user/user.conf" ]; then continue fi check_backup_conditions - check_suspend=$(grep "SUSPENDED='no'" $HESTIA/data/users/$user/user.conf) - log=$HESTIA/log/backup.log + check_suspend=$(grep "SUSPENDED='no'" $TULIO/data/users/$user/user.conf) + log=$TULIO/log/backup.log if [ -n "$check_suspend" ]; then echo -e "================================" >> $log echo -e "$user" >> $log diff --git a/bin/v-change-cron-job b/bin/v-change-cron-job index 3814d82c2..1d44eec68 100755 --- a/bin/v-change-cron-job +++ b/bin/v-change-cron-job @@ -25,11 +25,10 @@ cron_command=$8 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-change-database-host-password b/bin/v-change-database-host-password index 3afb257c6..1ff8d7654 100755 --- a/bin/v-change-database-host-password +++ b/bin/v-change-database-host-password @@ -21,13 +21,12 @@ HIDE=4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/db.sh -source $HESTIA/func/db.sh +source $TULIO/func/db.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -47,7 +46,7 @@ check_tulio_demo_mode #----------------------------------------------------------# # Define email -email=$(grep CONTACT "$HESTIA/data/users/$ROOT_USER/user.conf" | cut -f2 -d \') +email=$(grep CONTACT "$TULIO/data/users/$ROOT_USER/user.conf" | cut -f2 -d \') subj="v-change-database-host-password $*" case $type in diff --git a/bin/v-change-database-owner b/bin/v-change-database-owner index 8794ccd3c..e5ee79bb6 100755 --- a/bin/v-change-database-owner +++ b/bin/v-change-database-owner @@ -18,15 +18,14 @@ user=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/db.sh -source $HESTIA/func/db.sh +source $TULIO/func/db.sh # shellcheck source=/usr/local/tulio/func/rebuild.sh -source $HESTIA/func/rebuild.sh +source $TULIO/func/rebuild.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -40,7 +39,7 @@ is_object_unsuspended 'user' 'USER' "$user" # Check owner existence owner=$(echo $database | cut -f 1 -d '_') -if [ ! -d "$HESTIA/data/users/$owner" ]; then +if [ ! -d "$TULIO/data/users/$owner" ]; then echo "Error: database owner doesn't exist" log_event "$E_NOTEXIST" "$ARGUMENTS" exit "$E_NOTEXIST" @@ -52,7 +51,7 @@ if [ "$owner" = "$user" ]; then fi # Check db existence -db_data=$(grep "DB='$database'" $HESTIA/data/users/$owner/db.conf) +db_data=$(grep "DB='$database'" $TULIO/data/users/$owner/db.conf) if [ -z "$db_data" ]; then echo "Error: database $database doesn't exist" log_event "$E_NOTEXIST" "$ARGUMENTS" @@ -69,7 +68,7 @@ fi # Check if database name is uniqe new_db=$(echo $database | sed "s/^${owner}_/${usersmall}_/") -check_db=$(grep "DB='$new_db'" $HESTIA/data/users/$user/db.conf) +check_db=$(grep "DB='$new_db'" $TULIO/data/users/$user/db.conf) if [ -n "$check_db" ]; then echo "Error: $new_db database exists" log_event "$E_EXISTS" "$ARGUMENTS" @@ -99,7 +98,7 @@ esac # Import configuration db_data=$(echo "$db_data" | sed "s/'${owner}_/'${usersmall}_/g") -echo "$db_data" >> $HESTIA/data/users/$user/db.conf +echo "$db_data" >> $TULIO/data/users/$user/db.conf parse_object_kv_list "$db_data" # Unsuspend db diff --git a/bin/v-change-database-password b/bin/v-change-database-password index a97848029..2a6d85d34 100755 --- a/bin/v-change-database-password +++ b/bin/v-change-database-password @@ -21,13 +21,12 @@ HIDE=3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/db.sh -source $HESTIA/func/db.sh +source $TULIO/func/db.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-change-database-user b/bin/v-change-database-user index 477d329cb..369ee9b14 100755 --- a/bin/v-change-database-user +++ b/bin/v-change-database-user @@ -21,15 +21,14 @@ HIDE=4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/db.sh -source $HESTIA/func/db.sh +source $TULIO/func/db.sh # shellcheck source=/usr/local/tulio/func/rebuild.sh -source $HESTIA/func/rebuild.sh +source $TULIO/func/rebuild.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-change-dns-domain-dnssec b/bin/v-change-dns-domain-dnssec index b5a28dea0..773c26ba8 100755 --- a/bin/v-change-dns-domain-dnssec +++ b/bin/v-change-dns-domain-dnssec @@ -18,17 +18,16 @@ status=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/rebuild.sh -source $HESTIA/func/rebuild.sh +source $TULIO/func/rebuild.sh # shellcheck source=/usr/local/tulio/func/syshealth.sh -source $HESTIA/func/syshealth.sh +source $TULIO/func/syshealth.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain @@ -66,8 +65,8 @@ fi # Action # #----------------------------------------------------------# -if [ -f "$HESTIA/data/queue/dns-cluster.pipe" ]; then - bash $HESTIA/data/queue/dns-cluster.pipe +if [ -f "$TULIO/data/queue/dns-cluster.pipe" ]; then + bash $TULIO/data/queue/dns-cluster.pipe fi syshealth_repair_dns_config @@ -91,10 +90,10 @@ fi # Updating dns-cluster queue if [ "$DNS_CLUSTER" = "yes" ]; then # Check for first sync - dlock=$(grep "domain $user $domain" $HESTIA/data/queue/dns-cluster.pipe) + dlock=$(grep "domain $user $domain" $TULIO/data/queue/dns-cluster.pipe) if [ -z "$dlock" ]; then cmd="$BIN/v-add-remote-dns-domain $user $domain yes" - echo "$cmd" >> $HESTIA/data/queue/dns-cluster.pipe + echo "$cmd" >> $TULIO/data/queue/dns-cluster.pipe fi fi diff --git a/bin/v-change-dns-domain-exp b/bin/v-change-dns-domain-exp index ae3c8ba91..591a2a8f8 100755 --- a/bin/v-change-dns-domain-exp +++ b/bin/v-change-dns-domain-exp @@ -21,11 +21,10 @@ exp=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain @@ -57,10 +56,10 @@ update_object_value 'dns' 'DOMAIN' "$domain" '$EXP' "$exp" # Updating dns-cluster queue if [ "$DNS_CLUSTER" = "yes" ]; then # Check for first sync - dlock=$(grep "domain $user $domain" $HESTIA/data/queue/dns-cluster.pipe) + dlock=$(grep "domain $user $domain" $TULIO/data/queue/dns-cluster.pipe) if [ -z "$dlock" ]; then cmd="$BIN/v-change-remote-dns-domain-exp $user $domain $exp" - echo "$cmd" >> $HESTIA/data/queue/dns-cluster.pipe + echo "$cmd" >> $TULIO/data/queue/dns-cluster.pipe fi fi diff --git a/bin/v-change-dns-domain-ip b/bin/v-change-dns-domain-ip index 3c97f87b8..24db36e29 100755 --- a/bin/v-change-dns-domain-ip +++ b/bin/v-change-dns-domain-ip @@ -21,15 +21,14 @@ restart=$4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/rebuild.sh -source $HESTIA/func/rebuild.sh +source $TULIO/func/rebuild.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain @@ -75,10 +74,10 @@ fi # Updating dns-cluster queue if [ "$DNS_CLUSTER" = "yes" ]; then # Check for first sync - dlock=$(grep "domain $user $domain" $HESTIA/data/queue/dns-cluster.pipe) + dlock=$(grep "domain $user $domain" $TULIO/data/queue/dns-cluster.pipe) if [ -z "$dlock" ]; then cmd="$BIN/v-add-remote-dns-domain $user $domain yes" - echo "$cmd" >> $HESTIA/data/queue/dns-cluster.pipe + echo "$cmd" >> $TULIO/data/queue/dns-cluster.pipe fi fi diff --git a/bin/v-change-dns-domain-soa b/bin/v-change-dns-domain-soa index c79a862fe..d4e525cf3 100755 --- a/bin/v-change-dns-domain-soa +++ b/bin/v-change-dns-domain-soa @@ -22,15 +22,14 @@ restart=$4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/rebuild.sh -source $HESTIA/func/rebuild.sh +source $TULIO/func/rebuild.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain @@ -69,10 +68,10 @@ fi # Updating dns-cluster queue if [ "$DNS_CLUSTER" = "yes" ]; then # Check for first sync - dlock=$(grep "domain $user $domain" $HESTIA/data/queue/dns-cluster.pipe) + dlock=$(grep "domain $user $domain" $TULIO/data/queue/dns-cluster.pipe) if [ -z "$dlock" ]; then cmd="$BIN/v-change-remote-dns-domain-soa $user $domain $soa" - echo "$cmd" >> $HESTIA/data/queue/dns-cluster.pipe + echo "$cmd" >> $TULIO/data/queue/dns-cluster.pipe fi fi diff --git a/bin/v-change-dns-domain-tpl b/bin/v-change-dns-domain-tpl index f56822f35..e2b101c46 100755 --- a/bin/v-change-dns-domain-tpl +++ b/bin/v-change-dns-domain-tpl @@ -23,15 +23,14 @@ restart=$4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/rebuild.sh -source $HESTIA/func/rebuild.sh +source $TULIO/func/rebuild.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain @@ -143,10 +142,10 @@ fi # Updating dns-cluster queue if [ "$DNS_CLUSTER" = "yes" ]; then # Check for first sync - dlock=$(grep "domain $user $domain" $HESTIA/data/queue/dns-cluster.pipe) + dlock=$(grep "domain $user $domain" $TULIO/data/queue/dns-cluster.pipe) if [ -z "$dlock" ]; then cmd="$BIN/v-add-remote-dns-domain $user $domain domain" - echo "$cmd" >> $HESTIA/data/queue/dns-cluster.pipe + echo "$cmd" >> $TULIO/data/queue/dns-cluster.pipe fi fi diff --git a/bin/v-change-dns-domain-ttl b/bin/v-change-dns-domain-ttl index 052eb8100..4f17febda 100755 --- a/bin/v-change-dns-domain-ttl +++ b/bin/v-change-dns-domain-ttl @@ -21,15 +21,14 @@ restart=$4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/rebuild.sh -source $HESTIA/func/rebuild.sh +source $TULIO/func/rebuild.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain @@ -68,10 +67,10 @@ fi # Updating dns-cluster queue if [ "$DNS_CLUSTER" = "yes" ]; then # Check for first sync - dlock=$(grep "domain $user $domain" $HESTIA/data/queue/dns-cluster.pipe) + dlock=$(grep "domain $user $domain" $TULIO/data/queue/dns-cluster.pipe) if [ -z "$dlock" ]; then cmd="$BIN/v-change-remote-dns-domain-ttl $user $domain $ttl" - echo "$cmd" >> $HESTIA/data/queue/dns-cluster.pipe + echo "$cmd" >> $TULIO/data/queue/dns-cluster.pipe fi fi diff --git a/bin/v-change-dns-record b/bin/v-change-dns-record index 90649cbf3..0ccc1b381 100755 --- a/bin/v-change-dns-record +++ b/bin/v-change-dns-record @@ -26,15 +26,14 @@ ttl=$9 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/rebuild.sh -source $HESTIA/func/rebuild.sh +source $TULIO/func/rebuild.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain @@ -148,10 +147,10 @@ fi # Updating dns-cluster queue if [ "$DNS_CLUSTER" = "yes" ]; then # Check for first sync - dlock=$(grep "domain $user $domain" $HESTIA/data/queue/dns-cluster.pipe) + dlock=$(grep "domain $user $domain" $TULIO/data/queue/dns-cluster.pipe) if [ -z "$dlock" ]; then cmd="$BIN/v-add-remote-dns-domain $user $domain records" - echo "$cmd" >> $HESTIA/data/queue/dns-cluster.pipe + echo "$cmd" >> $TULIO/data/queue/dns-cluster.pipe fi fi diff --git a/bin/v-change-dns-record-id b/bin/v-change-dns-record-id index f1973f50d..8c0aa9211 100755 --- a/bin/v-change-dns-record-id +++ b/bin/v-change-dns-record-id @@ -22,15 +22,14 @@ restart=$5 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/rebuild.sh -source $HESTIA/func/rebuild.sh +source $TULIO/func/rebuild.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain @@ -74,10 +73,10 @@ fi # Updating dns-cluster queue if [ "$DNS_CLUSTER" = "yes" ]; then # Check for first sync - dlock=$(grep "domain $user $domain" $HESTIA/data/queue/dns-cluster.pipe) + dlock=$(grep "domain $user $domain" $TULIO/data/queue/dns-cluster.pipe) if [ -z "$dlock" ]; then cmd="$BIN/v-add-remote-dns-domain $user $domain records" - echo "$cmd" >> $HESTIA/data/queue/dns-cluster.pipe + echo "$cmd" >> $TULIO/data/queue/dns-cluster.pipe fi fi diff --git a/bin/v-change-domain-owner b/bin/v-change-domain-owner index 61eeebb43..ad3526668 100755 --- a/bin/v-change-domain-owner +++ b/bin/v-change-domain-owner @@ -18,13 +18,12 @@ user=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -53,7 +52,7 @@ check_tulio_demo_mode echo "Moving $domain from $owner to $user, please wait..." # WEB domain -web_data=$(grep "DOMAIN='$domain'" $HESTIA/data/users/$owner/web.conf) +web_data=$(grep "DOMAIN='$domain'" $TULIO/data/users/$owner/web.conf) if [ -n "$web_data" ]; then echo "[*] Moving web domain..." $BIN/v-suspend-web-domain "$owner" "$domain" >> /dev/null 2>&1 @@ -96,14 +95,14 @@ if [ -n "$web_data" ]; then # Check SSL if [ "$SSL" = 'yes' ]; then - ssl_crt=$HESTIA/data/users/$owner/ssl/$domain.crt - ssl_key=$HESTIA/data/users/$owner/ssl/$domain.key - ssl_ca=$HESTIA/data/users/$owner/ssl/$domain.ca - ssl_pem=$HESTIA/data/users/$owner/ssl/$domain.pem - cp $ssl_crt $HESTIA/data/users/$user/ssl/ - cp $ssl_key $HESTIA/data/users/$user/ssl/ - cp $ssl_ca $HESTIA/data/users/$user/ssl/ >> /dev/null 2>&1 - cp $ssl_pem $HESTIA/data/users/$user/ssl/ >> /dev/null 2>&1 + ssl_crt=$TULIO/data/users/$owner/ssl/$domain.crt + ssl_key=$TULIO/data/users/$owner/ssl/$domain.key + ssl_ca=$TULIO/data/users/$owner/ssl/$domain.ca + ssl_pem=$TULIO/data/users/$owner/ssl/$domain.pem + cp $ssl_crt $TULIO/data/users/$user/ssl/ + cp $ssl_key $TULIO/data/users/$user/ssl/ + cp $ssl_ca $TULIO/data/users/$user/ssl/ >> /dev/null 2>&1 + cp $ssl_pem $TULIO/data/users/$user/ssl/ >> /dev/null 2>&1 fi # Check ftp user account @@ -115,8 +114,8 @@ if [ -n "$web_data" ]; then fi # Move config - sed -i "/DOMAIN='$domain'/d" $HESTIA/data/users/$owner/web.conf - echo "$web_data" >> $HESTIA/data/users/$user/web.conf + sed -i "/DOMAIN='$domain'/d" $TULIO/data/users/$owner/web.conf + echo "$web_data" >> $TULIO/data/users/$user/web.conf # Move data mv $HOMEDIR/$owner/web/$domain $HOMEDIR/$user/web/ @@ -144,7 +143,7 @@ if [ -n "$web_data" ]; then fi # DNS domain -dns_data=$(grep "DOMAIN='$domain'" $HESTIA/data/users/$owner/dns.conf) +dns_data=$(grep "DOMAIN='$domain'" $TULIO/data/users/$owner/dns.conf) if [ -n "$dns_data" ]; then echo "[*] Moving DNS zone and records..." parse_object_kv_list "$dns_data" @@ -152,16 +151,16 @@ if [ -n "$dns_data" ]; then # Change IP if [ -n "$ip" ]; then dns_data=$(echo "$dns_data" | sed "s/IP='$IP'/IP='$ip'/") - sed -i "s/$IP/$ip/g" $HESTIA/data/users/$owner/dns/$domain.conf + sed -i "s/$IP/$ip/g" $TULIO/data/users/$owner/dns/$domain.conf fi # Move config - sed -i "/DOMAIN='$domain'/d" $HESTIA/data/users/$owner/dns.conf - echo "$dns_data" >> $HESTIA/data/users/$user/dns.conf + sed -i "/DOMAIN='$domain'/d" $TULIO/data/users/$owner/dns.conf + echo "$dns_data" >> $TULIO/data/users/$user/dns.conf # Move dns records - mv $HESTIA/data/users/$owner/dns/$domain.conf \ - $HESTIA/data/users/$user/dns/ + mv $TULIO/data/users/$owner/dns/$domain.conf \ + $TULIO/data/users/$user/dns/ # Rebuild config $BIN/v-unsuspend-dns-domain "$user" "$domain" no >> /dev/null 2>&1 @@ -178,7 +177,7 @@ if [ -n "$dns_data" ]; then fi # MAIL domain -mail_data=$(grep "DOMAIN='$domain'" $HESTIA/data/users/$owner/mail.conf) +mail_data=$(grep "DOMAIN='$domain'" $TULIO/data/users/$owner/mail.conf) if [ -n "$mail_data" ]; then $BIN/v-suspend-mail-domain "$owner" "$domain" >> /dev/null 2>&1 echo "[*] Moving mail domain and accounts..." @@ -191,41 +190,41 @@ if [ -n "$mail_data" ]; then fi # Move config - sed -i "/DOMAIN='$domain'/d" $HESTIA/data/users/$owner/mail.conf + sed -i "/DOMAIN='$domain'/d" $TULIO/data/users/$owner/mail.conf mail_data=$(echo "$mail_data" | sed "s/SUSPENDED='no'/SUSPENDED='yes'/") - echo "$mail_data" >> $HESTIA/data/users/$user/mail.conf - mv -f $HESTIA/data/users/$owner/mail/$domain.conf \ - $HESTIA/data/users/$user/mail/ + echo "$mail_data" >> $TULIO/data/users/$user/mail.conf + mv -f $TULIO/data/users/$owner/mail/$domain.conf \ + $TULIO/data/users/$user/mail/ # Move DKIM - if [ -e "$HESTIA/data/users/$owner/mail/$domain.pem" ]; then - mv -f $HESTIA/data/users/$owner/mail/$domain.pem \ - $HESTIA/data/users/$user/mail/ - mv -f $HESTIA/data/users/$owner/mail/$domain.pub \ - $HESTIA/data/users/$user/mail/ + if [ -e "$TULIO/data/users/$owner/mail/$domain.pem" ]; then + mv -f $TULIO/data/users/$owner/mail/$domain.pem \ + $TULIO/data/users/$user/mail/ + mv -f $TULIO/data/users/$owner/mail/$domain.pub \ + $TULIO/data/users/$user/mail/ fi # Move SSL certificates if [ "$SSL" = 'yes' ]; then # Ensure that SSL directory exists and move certificates - mkdir -p $HESTIA/data/users/$user/ssl/ + mkdir -p $TULIO/data/users/$user/ssl/ mkdir -p $HOMEDIR/$user/conf/mail/$domain/ssl/ - ssl_crt=$HESTIA/data/users/$owner/ssl/mail.$domain.crt - ssl_key=$HESTIA/data/users/$owner/ssl/mail.$domain.key - ssl_ca=$HESTIA/data/users/$owner/ssl/mail.$domain.ca - ssl_pem=$HESTIA/data/users/$owner/ssl/mail.$domain.pem - mv $ssl_crt $HESTIA/data/users/$user/ssl/ - mv $ssl_key $HESTIA/data/users/$user/ssl/ - mv $ssl_ca $HESTIA/data/users/$user/ssl/ >> /dev/null 2>&1 - mv $ssl_pem $HESTIA/data/users/$user/ssl/ >> /dev/null 2>&1 + ssl_crt=$TULIO/data/users/$owner/ssl/mail.$domain.crt + ssl_key=$TULIO/data/users/$owner/ssl/mail.$domain.key + ssl_ca=$TULIO/data/users/$owner/ssl/mail.$domain.ca + ssl_pem=$TULIO/data/users/$owner/ssl/mail.$domain.pem + mv $ssl_crt $TULIO/data/users/$user/ssl/ + mv $ssl_key $TULIO/data/users/$user/ssl/ + mv $ssl_ca $TULIO/data/users/$user/ssl/ >> /dev/null 2>&1 + mv $ssl_pem $TULIO/data/users/$user/ssl/ >> /dev/null 2>&1 # Add certificate to user home directory - cp -f $HESTIA/data/users/$user/ssl/mail.$domain.crt $HOMEDIR/$user/conf/mail/$domain/ssl/$domain.crt - cp -f $HESTIA/data/users/$user/ssl/mail.$domain.key $HOMEDIR/$user/conf/mail/$domain/ssl/$domain.key - cp -f $HESTIA/data/users/$user/ssl/mail.$domain.pem $HOMEDIR/$user/conf/mail/$domain/ssl/$domain.pem - if [ -e "$HESTIA/data/users/$user/ssl/mail.$domain.ca" ]; then - cp -f $HESTIA/data/users/$user/ssl/mail.$domain.ca $HOMEDIR/$user/conf/mail/$domain/ssl/$domain.ca + cp -f $TULIO/data/users/$user/ssl/mail.$domain.crt $HOMEDIR/$user/conf/mail/$domain/ssl/$domain.crt + cp -f $TULIO/data/users/$user/ssl/mail.$domain.key $HOMEDIR/$user/conf/mail/$domain/ssl/$domain.key + cp -f $TULIO/data/users/$user/ssl/mail.$domain.pem $HOMEDIR/$user/conf/mail/$domain/ssl/$domain.pem + if [ -e "$TULIO/data/users/$user/ssl/mail.$domain.ca" ]; then + cp -f $TULIO/data/users/$user/ssl/mail.$domain.ca $HOMEDIR/$user/conf/mail/$domain/ssl/$domain.ca fi # Add domain SSL configuration to dovecot @@ -283,8 +282,8 @@ if [ -n "$mail_data" ]; then if [ -e "$HOMEDIR/$owner/conf/mail/$domain" ]; then rm -rf "$HOMEDIR/$owner/conf/mail/$domain" fi - if [ -e "$HESTIA/data/users/$owner/mail/$domain.conf" ]; then - rm -f "$HESTIA/data/users/$owner/mail/$domain.conf" + if [ -e "$TULIO/data/users/$owner/mail/$domain.conf" ]; then + rm -f "$TULIO/data/users/$owner/mail/$domain.conf" fi # Rebuild config diff --git a/bin/v-change-firewall-rule b/bin/v-change-firewall-rule index 97df5c5bd..13f57614f 100755 --- a/bin/v-change-firewall-rule +++ b/bin/v-change-firewall-rule @@ -24,18 +24,17 @@ comment=$6 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Sort function sort_fw_rules() { - cat $HESTIA/data/firewall/rules.conf \ - | sort -n -k 2 -t \' > $HESTIA/data/firewall/rules.conf.tmp - mv -f $HESTIA/data/firewall/rules.conf.tmp \ - $HESTIA/data/firewall/rules.conf + cat $TULIO/data/firewall/rules.conf \ + | sort -n -k 2 -t \' > $TULIO/data/firewall/rules.conf.tmp + mv -f $TULIO/data/firewall/rules.conf.tmp \ + $TULIO/data/firewall/rules.conf } #----------------------------------------------------------# @@ -76,10 +75,10 @@ str="$str IP='$ipv4_cidr' COMMENT='$comment' SUSPENDED='no'" str="$str TIME='$time' DATE='$date'" # Deleting old rule -sed -i "/RULE='$rule' /d" $HESTIA/data/firewall/rules.conf +sed -i "/RULE='$rule' /d" $TULIO/data/firewall/rules.conf # Adding new -echo "$str" >> $HESTIA/data/firewall/rules.conf +echo "$str" >> $TULIO/data/firewall/rules.conf # Sorting firewall rules by id number sort_fw_rules diff --git a/bin/v-change-fs-file-permission b/bin/v-change-fs-file-permission index 1639ba592..a20bb14d7 100755 --- a/bin/v-change-fs-file-permission +++ b/bin/v-change-fs-file-permission @@ -14,11 +14,10 @@ permissions=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-change-mail-account-password b/bin/v-change-mail-account-password index 301233153..dea5d34bd 100755 --- a/bin/v-change-mail-account-password +++ b/bin/v-change-mail-account-password @@ -22,14 +22,13 @@ HIDE=4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/hest # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-change-mail-account-quota b/bin/v-change-mail-account-quota index b957c4711..49982d03d 100755 --- a/bin/v-change-mail-account-quota +++ b/bin/v-change-mail-account-quota @@ -21,13 +21,12 @@ quota=$4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-change-mail-account-rate-limit b/bin/v-change-mail-account-rate-limit index 008421a5d..94409d725 100755 --- a/bin/v-change-mail-account-rate-limit +++ b/bin/v-change-mail-account-rate-limit @@ -21,15 +21,14 @@ rate=$4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/syshealth.sh -source $HESTIA/func/syshealth.sh +source $TULIO/func/syshealth.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-change-mail-domain-catchall b/bin/v-change-mail-domain-catchall index 015a6d890..7ffec1bc5 100755 --- a/bin/v-change-mail-domain-catchall +++ b/bin/v-change-mail-domain-catchall @@ -20,13 +20,12 @@ email=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-change-mail-domain-rate-limit b/bin/v-change-mail-domain-rate-limit index 4673710b4..bd9de496f 100755 --- a/bin/v-change-mail-domain-rate-limit +++ b/bin/v-change-mail-domain-rate-limit @@ -20,13 +20,12 @@ rate=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-change-mail-domain-sslcert b/bin/v-change-mail-domain-sslcert index 358aaddce..e0e163fca 100755 --- a/bin/v-change-mail-domain-sslcert +++ b/bin/v-change-mail-domain-sslcert @@ -20,13 +20,12 @@ restart=$4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-change-remote-dns-domain-exp b/bin/v-change-remote-dns-domain-exp index e7fe34b6d..84c8b9f9f 100755 --- a/bin/v-change-remote-dns-domain-exp +++ b/bin/v-change-remote-dns-domain-exp @@ -16,13 +16,12 @@ domain=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/remote.sh -source $HESTIA/func/remote.sh +source $TULIO/func/remote.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -44,7 +43,7 @@ check_tulio_demo_mode #----------------------------------------------------------# IFS=$'\n' -for cluster in $(grep "SUSPENDED='no'" $HESTIA/conf/dns-cluster.conf); do +for cluster in $(grep "SUSPENDED='no'" $TULIO/conf/dns-cluster.conf); do # Reset user, password and hash vars clear_dns_cluster_settings @@ -76,7 +75,7 @@ done #----------------------------------------------------------# # Updating pipe -pipe="$HESTIA/data/queue/dns-cluster.pipe" +pipe="$TULIO/data/queue/dns-cluster.pipe" str=$(grep -n "$SCRIPT $1 $2 $3$" $pipe | cut -f1 -d: | head -n1) if [ -n "$str" ]; then sed -i "$str d" $pipe diff --git a/bin/v-change-remote-dns-domain-soa b/bin/v-change-remote-dns-domain-soa index 814bfc04e..26b77bc2c 100755 --- a/bin/v-change-remote-dns-domain-soa +++ b/bin/v-change-remote-dns-domain-soa @@ -18,13 +18,12 @@ domain=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/remote.sh -source $HESTIA/func/remote.sh +source $TULIO/func/remote.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -46,7 +45,7 @@ check_tulio_demo_mode #----------------------------------------------------------# IFS=$'\n' -for cluster in $(grep "SUSPENDED='no'" $HESTIA/conf/dns-cluster.conf); do +for cluster in $(grep "SUSPENDED='no'" $TULIO/conf/dns-cluster.conf); do # Reset user, password and hash vars clear_dns_cluster_settings @@ -84,7 +83,7 @@ done #----------------------------------------------------------# # Updating pipe -pipe="$HESTIA/data/queue/dns-cluster.pipe" +pipe="$TULIO/data/queue/dns-cluster.pipe" str=$(grep -n "$SCRIPT $1 $2 $3$" $pipe | cut -f1 -d: | head -n1) if [ -n "$str" ]; then sed -i "$str d" $pipe diff --git a/bin/v-change-remote-dns-domain-ttl b/bin/v-change-remote-dns-domain-ttl index e0c422a22..c2ae69391 100755 --- a/bin/v-change-remote-dns-domain-ttl +++ b/bin/v-change-remote-dns-domain-ttl @@ -18,13 +18,12 @@ domain=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/remote.sh -source $HESTIA/func/remote.sh +source $TULIO/func/remote.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -46,7 +45,7 @@ check_tulio_demo_mode #----------------------------------------------------------# IFS=$'\n' -for cluster in $(grep "SUSPENDED='no'" $HESTIA/conf/dns-cluster.conf); do +for cluster in $(grep "SUSPENDED='no'" $TULIO/conf/dns-cluster.conf); do # Reset user, password and hash vars clear_dns_cluster_settings @@ -84,7 +83,7 @@ done #----------------------------------------------------------# # Updating pipe -pipe="$HESTIA/data/queue/dns-cluster.pipe" +pipe="$TULIO/data/queue/dns-cluster.pipe" str=$(grep -n "$SCRIPT $1 $2 $3$" $pipe | cut -f1 -d: | head -n1) if [ -n "$str" ]; then sed -i "$str d" "$pipe" diff --git a/bin/v-change-sys-api b/bin/v-change-sys-api index 708cac927..6c87bca40 100755 --- a/bin/v-change-sys-api +++ b/bin/v-change-sys-api @@ -19,11 +19,10 @@ version=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Variables & Functions # @@ -39,21 +38,21 @@ check_tulio_demo_mode #----------------------------------------------------------# if [ "$status" = "enable" ]; then - if [ ! -f "$HESTIA/web/api/index.php" ]; then - wget -q https://raw.githubusercontent.com/contaura/tuliocp/$RELEASE_BRANCH/web/api/index.php -O $HESTIA/web/api/index.php - if [ ! -s "$HESTIA/web/api/index.php" ]; then - wget -q https://raw.githubusercontent.com/contaura/tuliocp/main/web/api/index.php -O $HESTIA/web/api/index.php - if [ ! -s "$HESTIA/web/api/index.php" ]; then + if [ ! -f "$TULIO/web/api/index.php" ]; then + wget -q https://raw.githubusercontent.com/contaura/tuliocp/$RELEASE_BRANCH/web/api/index.php -O $TULIO/web/api/index.php + if [ ! -s "$TULIO/web/api/index.php" ]; then + wget -q https://raw.githubusercontent.com/contaura/tuliocp/main/web/api/index.php -O $TULIO/web/api/index.php + if [ ! -s "$TULIO/web/api/index.php" ]; then # Throw error message to user echo "ERROR: API installation failed." # Remove empty file created by wget output - rm -f "$HESTIA/web/api/index.php" + rm -f "$TULIO/web/api/index.php" exit 1 fi fi else - sed -i 's|die("Error: Disabled");|//die("Error: Disabled");|g' $HESTIA/web/api/index.php - sed -i 's|////|//|g' $HESTIA/web/api/index.php + sed -i 's|die("Error: Disabled");|//die("Error: Disabled");|g' $TULIO/web/api/index.php + sed -i 's|////|//|g' $TULIO/web/api/index.php fi if [ "$version" = "legacy" ] || [ "$version" = "all" ]; then $BIN/v-change-sys-config-value "API" "yes"; fi if [ "$version" = "api" ] || [ "$version" = "all" ]; then $BIN/v-change-sys-config-value "API_SYSTEM" "1"; fi @@ -62,16 +61,16 @@ else $BIN/v-change-sys-config-value "API_ALLOWED_IP" "" $BIN/v-change-sys-config-value "API_SYSTEM" "0" if [ "$status" != "remove" ]; then - sed -i 's|//die("Error: Disabled");|die("Error: Disabled");|g' $HESTIA/web/api/index.php + sed -i 's|//die("Error: Disabled");|die("Error: Disabled");|g' $TULIO/web/api/index.php fi fi if [ "$status" = "remove" ]; then - if [ ! -f "$HESTIA/web/api/index.php" ]; then + if [ ! -f "$TULIO/web/api/index.php" ]; then echo "ERROR: API is not installed." exit 1 else - rm -f "$HESTIA/web/api/index.php" + rm -f "$TULIO/web/api/index.php" fi fi diff --git a/bin/v-change-sys-config-value b/bin/v-change-sys-config-value index 5e3baa7dd..4f8ad2fd8 100755 --- a/bin/v-change-sys-config-value +++ b/bin/v-change-sys-config-value @@ -19,11 +19,10 @@ value=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Perform verification if read-only mode is enabled check_tulio_demo_mode @@ -42,15 +41,15 @@ format_no_quotes "$value" 'value' change_sys_value "$key" "$value" # Sort configuration file in alphabetical order on change -sort $HESTIA/conf/tulio.conf -o /tmp/updconf -mv $HESTIA/conf/tulio.conf $HESTIA/conf/tulio.conf.bak -mv /tmp/updconf $HESTIA/conf/tulio.conf -rm -f $HESTIA/conf/tulio.conf.bak +sort $TULIO/conf/tulio.conf -o /tmp/updconf +mv $TULIO/conf/tulio.conf $TULIO/conf/tulio.conf.bak +mv /tmp/updconf $TULIO/conf/tulio.conf +rm -f $TULIO/conf/tulio.conf.bak # Check if the variable "$key" has the value "APP_NAME" if [ "$key" == "APP_NAME" ]; then # Path to the file manager configuration file where the change will be made. - config_file="$HESTIA/web/fm/configuration.php" + config_file="$TULIO/web/fm/configuration.php" new_app_name="File Manager - $value" # Verify if configuration.php exists and is writable diff --git a/bin/v-change-sys-db-alias b/bin/v-change-sys-db-alias index 6e1efb3a8..4bb6c7aa1 100755 --- a/bin/v-change-sys-db-alias +++ b/bin/v-change-sys-db-alias @@ -23,11 +23,10 @@ alias=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -54,7 +53,7 @@ if [ "$type" = "pma" ] || [ "$type" = "PMA" ] || [ "$type" = "phpmyadmin" ]; the # Replace old configuration files and update alias if [ -e "/etc/apache2/conf.d/phpmyadmin.inc" ]; then rm -f /etc/apache2/conf.d/phpmyadmin.inc - cp -f $HESTIA_INSTALL_DIR/pma/apache.conf /etc/apache2/conf.d/phpmyadmin.inc + cp -f $TULIO_INSTALL_DIR/pma/apache.conf /etc/apache2/conf.d/phpmyadmin.inc sed -i "s|%pma_alias%|$alias|g" /etc/apache2/conf.d/phpmyadmin.inc # Restart services @@ -63,7 +62,7 @@ if [ "$type" = "pma" ] || [ "$type" = "PMA" ] || [ "$type" = "phpmyadmin" ]; the if [ -e "/etc/nginx/conf.d/phpmyadmin.inc" ]; then rm -f /etc/nginx/conf.d/phpmyadmin.inc - cp -f $HESTIA_INSTALL_DIR/nginx/phpmyadmin.inc /etc/nginx/conf.d/phpmyadmin.inc + cp -f $TULIO_INSTALL_DIR/nginx/phpmyadmin.inc /etc/nginx/conf.d/phpmyadmin.inc sed -i "s|%pma_alias%|$alias|g" /etc/nginx/conf.d/phpmyadmin.inc # Restart services @@ -82,7 +81,7 @@ if [ "$type" = "pga" ] || [ "$type" = "PGA" ] || [ "$type" = "phppgadmin" ]; the # Replace old configuration files and update alias if [ -e "/etc/apache2/conf.d/phppgadmin.inc" ]; then rm -f /etc/apache2/conf.d/phppgadmin.inc - cp -f $HESTIA_INSTALL_DIR/pga/phppgadmin.conf /etc/apache2/conf.d/phppgadmin.inc + cp -f $TULIO_INSTALL_DIR/pga/phppgadmin.conf /etc/apache2/conf.d/phppgadmin.inc sed -i "s|%pga_alias%|$alias|g" /etc/apache2/conf.d/phppgadmin.inc # Restart services @@ -91,7 +90,7 @@ if [ "$type" = "pga" ] || [ "$type" = "PGA" ] || [ "$type" = "phppgadmin" ]; the if [ -e "/etc/nginx/conf.d/phppgadmin.inc" ]; then rm -f /etc/nginx/conf.d/phppgadmin.inc - cp -f $HESTIA_INSTALL_DIR/nginx/phppgadmin.inc /etc/nginx/conf.d/phppgadmin.inc + cp -f $TULIO_INSTALL_DIR/nginx/phppgadmin.inc /etc/nginx/conf.d/phppgadmin.inc sed -i "s|%pga_alias%|$alias|g" /etc/nginx/conf.d/phppgadmin.inc # Restart services diff --git a/bin/v-change-sys-demo-mode b/bin/v-change-sys-demo-mode index 633dbd379..56f57f277 100755 --- a/bin/v-change-sys-demo-mode +++ b/bin/v-change-sys-demo-mode @@ -18,11 +18,10 @@ active=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -42,7 +41,7 @@ if [ "$active" = "yes" ]; then $BIN/v-change-sys-config-value 'DEMO_MODE' 'yes' elif [ "$active" = "no" ]; then # Note even v-change-sys-demo-mode can be called v-change-sys-config-value is protected to disable demo mode call - # Use sed -i "s|^DEMO_MODE=.*'|DEMO_MODE='no'|g" $HESTIA/conf/tulio.conf + # Use sed -i "s|^DEMO_MODE=.*'|DEMO_MODE='no'|g" $TULIO/conf/tulio.conf #TODO: Instructions for enabling vhosts $BIN/v-change-sys-config-value 'DEMO_MODE' 'no' fi diff --git a/bin/v-change-sys-hostname b/bin/v-change-sys-hostname index cd3bf2592..504c3d750 100755 --- a/bin/v-change-sys-hostname +++ b/bin/v-change-sys-hostname @@ -17,11 +17,10 @@ domain=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-change-sys-ip-name b/bin/v-change-sys-ip-name index 4cbeadad9..9fa92e7e2 100755 --- a/bin/v-change-sys-ip-name +++ b/bin/v-change-sys-ip-name @@ -18,13 +18,12 @@ ip_name="$2" # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-change-sys-ip-nat b/bin/v-change-sys-ip-nat index 2b4582c79..0e6c5e6c6 100755 --- a/bin/v-change-sys-ip-nat +++ b/bin/v-change-sys-ip-nat @@ -19,13 +19,12 @@ restart="$3" # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -45,14 +44,14 @@ check_tulio_demo_mode #----------------------------------------------------------# # Updating IP -if [ -z "$(grep NAT= $HESTIA/data/ips/$ip)" ]; then - sed -i "s/^TIME/NAT='$nat_ip'\nTIME/g" $HESTIA/data/ips/$ip +if [ -z "$(grep NAT= $TULIO/data/ips/$ip)" ]; then + sed -i "s/^TIME/NAT='$nat_ip'\nTIME/g" $TULIO/data/ips/$ip old='' new="$nat_ip" else old="$(get_ip_value '$NAT')" new="$nat_ip" - sed -i "s/NAT=.*/NAT='$new'/" $HESTIA/data/ips/$ip + sed -i "s/NAT=.*/NAT='$new'/" $TULIO/data/ips/$ip if [ -z "$nat_ip" ]; then new="$ip" fi @@ -61,7 +60,7 @@ fi # Updating WEB configs if [ -n "$old" ] && [ -n "$WEB_SYSTEM" ]; then for user in $("$BIN/v-list-users" list); do - sed -i "s/$old/$new/" $HESTIA/data/users/$user/web.conf + sed -i "s/$old/$new/" $TULIO/data/users/$user/web.conf $BIN/v-rebuild-web-domains "$user" no done $BIN/v-restart-dns "$restart" @@ -70,9 +69,9 @@ fi # Updating DNS configs if [ -n "$old" ] && [ -n "$DNS_SYSTEM" ]; then for user in $("$BIN/v-list-users" list); do - sed -i "s/$old/$new/" "$HESTIA/data/users/$user/dns.conf" - if ls $HESTIA/data/users/$user/dns/*.conf > /dev/null 2>&1; then - sed -i "s/$old/$new/" $HESTIA/data/users/$user/dns/*.conf + sed -i "s/$old/$new/" "$TULIO/data/users/$user/dns.conf" + if ls $TULIO/data/users/$user/dns/*.conf > /dev/null 2>&1; then + sed -i "s/$old/$new/" $TULIO/data/users/$user/dns/*.conf fi $BIN/v-rebuild-dns-domains "$user" no done @@ -107,7 +106,7 @@ fi # Updating firewall if [ -n "$old" ] && [ -n "$FIREWALL_SYSTEM" ]; then - sed -i "s/$old/$new/g" $HESTIA/data/firewall/*.conf + sed -i "s/$old/$new/g" $TULIO/data/firewall/*.conf $BIN/v-update-firewall fi diff --git a/bin/v-change-sys-ip-owner b/bin/v-change-sys-ip-owner index 95103eac0..c2831d8f2 100755 --- a/bin/v-change-sys-ip-owner +++ b/bin/v-change-sys-ip-owner @@ -17,13 +17,12 @@ user="$2" # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-change-sys-ip-status b/bin/v-change-sys-ip-status index d36a1e020..687a85752 100755 --- a/bin/v-change-sys-ip-status +++ b/bin/v-change-sys-ip-status @@ -18,13 +18,12 @@ ip_status="$2" # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-change-sys-language b/bin/v-change-sys-language index 639f4febd..73fa5be1d 100755 --- a/bin/v-change-sys-language +++ b/bin/v-change-sys-language @@ -18,11 +18,10 @@ update_users=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" is_language_valid() { # English is always allowed @@ -32,7 +31,7 @@ is_language_valid() { log_event "$E_INVALID" "$ARGUMENTS" exit $E_INVALID fi - if [ ! -d "$HESTIA/web/locale/$1" ]; then + if [ ! -d "$TULIO/web/locale/$1" ]; then echo "Error: language $1 doesn't exist" log_event "$E_NOTEXIST" "$ARGUMENTS" exit $E_NOTEXIST @@ -56,10 +55,10 @@ check_tulio_demo_mode #----------------------------------------------------------# # Change language -if [ -z "$(grep LANGUAGE $HESTIA/conf/tulio.conf)" ]; then - echo "LANGUAGE='$language'" >> $HESTIA/conf/tulio.conf +if [ -z "$(grep LANGUAGE $TULIO/conf/tulio.conf)" ]; then + echo "LANGUAGE='$language'" >> $TULIO/conf/tulio.conf else - sed -i "s/LANGUAGE=.*/LANGUAGE='$language'/g" $HESTIA/conf/tulio.conf + sed -i "s/LANGUAGE=.*/LANGUAGE='$language'/g" $TULIO/conf/tulio.conf fi # Update language for all existing users if specified diff --git a/bin/v-change-sys-php b/bin/v-change-sys-php index 9e6a32442..eb4a88803 100755 --- a/bin/v-change-sys-php +++ b/bin/v-change-sys-php @@ -10,11 +10,10 @@ version=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Variables & Functions # @@ -47,7 +46,7 @@ check_tulio_demo_mode php_fpm="/etc/init.d/php$version-fpm" rm -f /etc/php/*/fpm/pool.d/www.conf -cp -f $HESTIA/install/deb/php-fpm/www.conf /etc/php/$version/fpm/pool.d/www.conf +cp -f $TULIO/install/deb/php-fpm/www.conf /etc/php/$version/fpm/pool.d/www.conf for user in $("$BIN/v-list-users" list); do $BIN/v-rebuild-web-domains "$user" 'no' > /dev/null 2>&1 diff --git a/bin/v-change-sys-port b/bin/v-change-sys-port index 1af5ee404..75ec6cabd 100755 --- a/bin/v-change-sys-port +++ b/bin/v-change-sys-port @@ -12,17 +12,16 @@ # Argument definition PORT=$1 -NGINX_CONFIG="$HESTIA/nginx/conf/nginx.conf" +NGINX_CONFIG="$TULIO/nginx/conf/nginx.conf" # Includes # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source "$HESTIA/func/main.sh" +source "$TULIO/func/main.sh" # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Functions is_port_valid() { @@ -76,12 +75,12 @@ else sed -i "/\"tulio_port\":/c\\\"tulio_host\": $PORT" /etc/snappymail/data/_data_/_default_/configs/plugin-change-password.json fi - if [ -f "$HESTIA/data/firewall/rules.conf" ]; then - sed -i "/COMMENT='HESTIA'/c\RULE='2' ACTION='ACCEPT' PROTOCOL='TCP' PORT='$PORT' IP='0.0.0.0/0' COMMENT='HESTIA' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'" "$HESTIA/data/firewall/rules.conf" + if [ -f "$TULIO/data/firewall/rules.conf" ]; then + sed -i "/COMMENT='TULIO'/c\RULE='2' ACTION='ACCEPT' PROTOCOL='TCP' PORT='$PORT' IP='0.0.0.0/0' COMMENT='TULIO' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25'" "$TULIO/data/firewall/rules.conf" fi - if [ -f "$HESTIA/data/firewall/chains.conf" ]; then - sed -i "/CHAIN='HESTIA'/c\CHAIN='HESTIA' PORT='$PORT' PROTOCOL='TCP'" "$HESTIA/data/firewall/chains.conf" + if [ -f "$TULIO/data/firewall/chains.conf" ]; then + sed -i "/CHAIN='TULIO'/c\CHAIN='TULIO' PORT='$PORT' PROTOCOL='TCP'" "$TULIO/data/firewall/chains.conf" fi # Restart services diff --git a/bin/v-change-sys-release b/bin/v-change-sys-release index d3298353e..3bbe3b0fd 100755 --- a/bin/v-change-sys-release +++ b/bin/v-change-sys-release @@ -19,11 +19,10 @@ branch=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -58,10 +57,10 @@ else fi # Remove old branch variable - sed -i "/RELEASE_BRANCH/d" $HESTIA/conf/tulio.conf + sed -i "/RELEASE_BRANCH/d" $TULIO/conf/tulio.conf # Set new branch variable - echo "RELEASE_BRANCH='$branch'" >> $HESTIA/conf/tulio.conf + echo "RELEASE_BRANCH='$branch'" >> $TULIO/conf/tulio.conf echo "Updated system to update from Git using branch: $branch" fi diff --git a/bin/v-change-sys-service-config b/bin/v-change-sys-service-config index 966e0a810..b5daab4fc 100755 --- a/bin/v-change-sys-service-config +++ b/bin/v-change-sys-service-config @@ -19,11 +19,10 @@ restart=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-change-sys-timezone b/bin/v-change-sys-timezone index 4225f1c25..2972d01ed 100755 --- a/bin/v-change-sys-timezone +++ b/bin/v-change-sys-timezone @@ -17,11 +17,10 @@ timezone=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" is_timezone_valid() { if [ ! -e "/usr/share/zoneinfo/$timezone" ]; then diff --git a/bin/v-change-sys-tulio-ssl b/bin/v-change-sys-tulio-ssl index fb77f5783..b78993e31 100755 --- a/bin/v-change-sys-tulio-ssl +++ b/bin/v-change-sys-tulio-ssl @@ -19,13 +19,12 @@ restart=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -59,8 +58,8 @@ else fi # Adding new certificate -cp -f $ssl_dir/certificate.crt $HESTIA/ssl/certificate.crt -cp -f $ssl_dir/certificate.key $HESTIA/ssl/certificate.key +cp -f $ssl_dir/certificate.crt $TULIO/ssl/certificate.crt +cp -f $ssl_dir/certificate.key $TULIO/ssl/certificate.key #----------------------------------------------------------# # TulioCP # diff --git a/bin/v-change-sys-web-terminal-port b/bin/v-change-sys-web-terminal-port index d528dfb67..347315de7 100755 --- a/bin/v-change-sys-web-terminal-port +++ b/bin/v-change-sys-web-terminal-port @@ -12,17 +12,16 @@ # Argument definition PORT=$1 -NGINX_CONFIG="$HESTIA/nginx/conf/nginx.conf" +NGINX_CONFIG="$TULIO/nginx/conf/nginx.conf" # Includes # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Functions is_port_valid() { diff --git a/bin/v-change-sys-webmail b/bin/v-change-sys-webmail index 0fd0aaa30..8f7d6199e 100755 --- a/bin/v-change-sys-webmail +++ b/bin/v-change-sys-webmail @@ -14,11 +14,10 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Get existing system webmail alias export WEBMAIL_ALIAS="$WEBMAIL_ALIAS" diff --git a/bin/v-change-user-config-value b/bin/v-change-user-config-value index cc93387d2..bb73fda15 100755 --- a/bin/v-change-user-config-value +++ b/bin/v-change-user-config-value @@ -19,11 +19,10 @@ value="$3" # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-change-user-contact b/bin/v-change-user-contact index e68b13beb..c34dcde24 100755 --- a/bin/v-change-user-contact +++ b/bin/v-change-user-contact @@ -18,11 +18,10 @@ email=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-change-user-language b/bin/v-change-user-language index 269ded54a..17490183a 100755 --- a/bin/v-change-user-language +++ b/bin/v-change-user-language @@ -18,11 +18,10 @@ language=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" is_language_valid() { # English is always allowed @@ -32,7 +31,7 @@ is_language_valid() { log_event "$E_INVALID" "$ARGUMENTS" exit $E_INVALID fi - if [ ! -d "$HESTIA/web/locale/$1" ]; then + if [ ! -d "$TULIO/web/locale/$1" ]; then echo "Error: language $1 doesn't exist" log_event "$E_NOTEXIST" "$ARGUMENTS" exit $E_NOTEXIST diff --git a/bin/v-change-user-name b/bin/v-change-user-name index 1fcf3c752..5efd8ab66 100755 --- a/bin/v-change-user-name +++ b/bin/v-change-user-name @@ -19,11 +19,10 @@ lname=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-change-user-ns b/bin/v-change-user-ns index ca674b32c..6ff111451 100755 --- a/bin/v-change-user-ns +++ b/bin/v-change-user-ns @@ -25,11 +25,10 @@ ns8=$(echo $9 | sed -e 's/\.*$//g' -e 's/^\.*//g') # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-change-user-package b/bin/v-change-user-package index 42f2ac821..c525c4651 100755 --- a/bin/v-change-user-package +++ b/bin/v-change-user-package @@ -19,11 +19,10 @@ force=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" is_package_available() { @@ -36,7 +35,7 @@ is_package_available() { DISK_QUOTA='0' BANDWIDTH='0' - source_conf "$HESTIA/data/packages/$package.pkg" + source_conf "$TULIO/data/packages/$package.pkg" # Checking usage agains package limits if [ "$WEB_DOMAINS" != 'unlimited' ]; then @@ -81,7 +80,7 @@ change_user_package() { # Keep user creation date and time saved creation_time="$TIME" creation_date="$DATE" - source_conf "$HESTIA/data/packages/$package.pkg" + source_conf "$TULIO/data/packages/$package.pkg" echo "NAME='$NAME' PACKAGE='$package' WEB_TEMPLATE='$WEB_TEMPLATE' @@ -176,16 +175,16 @@ check_tulio_demo_mode change_user_package # Update user shell -shell_conf=$(cat "$HESTIA/data/packages/$package.pkg" | grep -m1 'SHELL' | cut -f 2 -d \') +shell_conf=$(cat "$TULIO/data/packages/$package.pkg" | grep -m1 'SHELL' | cut -f 2 -d \') $BIN/v-change-user-shell "$user" "$shell_conf" # Run template trigger -if [ -x "$HESTIA/data/packages/$package.sh" ]; then - $HESTIA/data/packages/$package.sh "$user" "$CONTACT" "$NAME" +if [ -x "$TULIO/data/packages/$package.sh" ]; then + $TULIO/data/packages/$package.sh "$user" "$CONTACT" "$NAME" fi # Update disk quota -source $HESTIA/conf/tulio.conf +source $TULIO/conf/tulio.conf if [ "$DISK_QUOTA" = 'yes' ]; then $BIN/v-update-user-quota "$user" fi diff --git a/bin/v-change-user-password b/bin/v-change-user-password index eb8ae634a..f947d595a 100755 --- a/bin/v-change-user-password +++ b/bin/v-change-user-password @@ -18,11 +18,10 @@ HIDE=2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-change-user-php-cli b/bin/v-change-user-php-cli index 94ba2d956..4592b3d9b 100755 --- a/bin/v-change-user-php-cli +++ b/bin/v-change-user-php-cli @@ -19,11 +19,10 @@ version=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-change-user-rkey b/bin/v-change-user-rkey index 4c389691b..5027fa31f 100755 --- a/bin/v-change-user-rkey +++ b/bin/v-change-user-rkey @@ -16,11 +16,10 @@ hash=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-change-user-role b/bin/v-change-user-role index 47f2a568e..a404cba8f 100755 --- a/bin/v-change-user-role +++ b/bin/v-change-user-role @@ -18,11 +18,10 @@ role=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-change-user-shell b/bin/v-change-user-shell index 508923646..1431ecd76 100755 --- a/bin/v-change-user-shell +++ b/bin/v-change-user-shell @@ -18,11 +18,10 @@ shell=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio.conf/tulio.conf -source $HESTIA/conf/tulio.conf +source $TULIO/conf/tulio.conf #----------------------------------------------------------# # Verifications # diff --git a/bin/v-change-user-sort-order b/bin/v-change-user-sort-order index 3782751a1..d72586fc0 100755 --- a/bin/v-change-user-sort-order +++ b/bin/v-change-user-sort-order @@ -18,11 +18,10 @@ sort_order=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-change-user-template b/bin/v-change-user-template index ffb4c7d42..edbe9a89c 100755 --- a/bin/v-change-user-template +++ b/bin/v-change-user-template @@ -19,13 +19,12 @@ template=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-change-user-theme b/bin/v-change-user-theme index dd6f14554..ac0098c84 100755 --- a/bin/v-change-user-theme +++ b/bin/v-change-user-theme @@ -19,12 +19,11 @@ theme=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio.conf/tulio.conf # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-change-web-domain-backend-tpl b/bin/v-change-web-domain-backend-tpl index 2e24a3f91..1c65c5ca6 100755 --- a/bin/v-change-web-domain-backend-tpl +++ b/bin/v-change-web-domain-backend-tpl @@ -21,15 +21,14 @@ restart=$4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-change-web-domain-dirlist b/bin/v-change-web-domain-dirlist index 7ec5ca1aa..584776f98 100755 --- a/bin/v-change-web-domain-dirlist +++ b/bin/v-change-web-domain-dirlist @@ -19,13 +19,12 @@ mode=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-change-web-domain-docroot b/bin/v-change-web-domain-docroot index 102b92ef5..b590c26d7 100755 --- a/bin/v-change-web-domain-docroot +++ b/bin/v-change-web-domain-docroot @@ -32,13 +32,12 @@ restart=$6 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-change-web-domain-ftp-password b/bin/v-change-web-domain-ftp-password index 99619fd14..423ed5034 100755 --- a/bin/v-change-web-domain-ftp-password +++ b/bin/v-change-web-domain-ftp-password @@ -22,13 +22,12 @@ HIDE=4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-change-web-domain-ftp-path b/bin/v-change-web-domain-ftp-path index a61f6b0ad..1f0d70301 100755 --- a/bin/v-change-web-domain-ftp-path +++ b/bin/v-change-web-domain-ftp-path @@ -21,13 +21,12 @@ ftp_path=$4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-change-web-domain-httpauth b/bin/v-change-web-domain-httpauth index ff7fef619..f8a5b9d26 100755 --- a/bin/v-change-web-domain-httpauth +++ b/bin/v-change-web-domain-httpauth @@ -21,13 +21,12 @@ HIDE=4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Defining htpasswd file htpasswd="$HOMEDIR/$user/conf/web/$domain/htpasswd" diff --git a/bin/v-change-web-domain-ip b/bin/v-change-web-domain-ip index c1bc5a929..34f5e7b02 100755 --- a/bin/v-change-web-domain-ip +++ b/bin/v-change-web-domain-ip @@ -21,15 +21,14 @@ restart=$4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-change-web-domain-name b/bin/v-change-web-domain-name index eccf5e65e..f2f4ba434 100755 --- a/bin/v-change-web-domain-name +++ b/bin/v-change-web-domain-name @@ -21,15 +21,14 @@ restart=$4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain @@ -48,7 +47,7 @@ is_object_valid 'user' 'USER' "$user" is_object_unsuspended 'user' 'USER' "$user" is_object_valid 'web' 'DOMAIN' "$domain" is_object_unsuspended 'web' 'DOMAIN' "$domain" -check_new_domain=$(grep "DOMAIN='$new_domain'" $HESTIA/data/users/*/web.conf) +check_new_domain=$(grep "DOMAIN='$new_domain'" $TULIO/data/users/*/web.conf) if [ -n "$check_new_domain" ]; then check_result "$E_EXISTS" "$new_domain already exists" fi diff --git a/bin/v-change-web-domain-proxy-tpl b/bin/v-change-web-domain-proxy-tpl index 7711f0776..3c29f201c 100755 --- a/bin/v-change-web-domain-proxy-tpl +++ b/bin/v-change-web-domain-proxy-tpl @@ -24,15 +24,14 @@ restart="$5" # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-change-web-domain-sslcert b/bin/v-change-web-domain-sslcert index 06fbec386..6e687d8bc 100755 --- a/bin/v-change-web-domain-sslcert +++ b/bin/v-change-web-domain-sslcert @@ -22,13 +22,12 @@ restart=$4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-change-web-domain-sslhome b/bin/v-change-web-domain-sslhome index 8258ecfc4..0a970a253 100755 --- a/bin/v-change-web-domain-sslhome +++ b/bin/v-change-web-domain-sslhome @@ -22,13 +22,12 @@ restart=$4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-change-web-domain-stats b/bin/v-change-web-domain-stats index ba451d5e1..5cbedfaff 100755 --- a/bin/v-change-web-domain-stats +++ b/bin/v-change-web-domain-stats @@ -21,13 +21,12 @@ type=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain format_domain_idn diff --git a/bin/v-change-web-domain-tpl b/bin/v-change-web-domain-tpl index 31ee0e3af..84c977ffd 100755 --- a/bin/v-change-web-domain-tpl +++ b/bin/v-change-web-domain-tpl @@ -22,15 +22,14 @@ restart=$4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-check-access-key b/bin/v-check-access-key index c7c2ac903..3c203bf38 100755 --- a/bin/v-check-access-key +++ b/bin/v-check-access-key @@ -23,11 +23,10 @@ format=${5-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Perform verification if read-only mode is enabled check_tulio_demo_mode @@ -58,7 +57,7 @@ shell_list() { # Callback to intercept invalid result validation abort_missmatch() { echo "Error: $2" - echo "$date $time ${access_key_id:-api} $ip46 failed to login" >> $HESTIA/log/auth.log + echo "$date $time ${access_key_id:-api} $ip46 failed to login" >> $TULIO/log/auth.log # Add a log for user if [[ "$1" == "$E_PASSWORD" && -n "$user" ]]; then @@ -89,7 +88,7 @@ check_access_key_cmd "$access_key_id" "$hst_command" user_arg_pos # Check if key owner is active is_format_valid 'user' is_object_valid 'user' 'USER' "$user" -export USER_DATA=$HESTIA/data/users/$user +export USER_DATA=$TULIO/data/users/$user is_object_unsuspended 'user' 'USER' "$user" # Remove the check_result callback @@ -111,6 +110,6 @@ esac # Logging log_history "[$ip46] Access key $access_key_id successfully launched with command $hst_command" "Info" "$user" "API" -echo "$date $time $access_key_id $ip46 $hst_command successfully launched" >> $HESTIA/log/auth.log +echo "$date $time $access_key_id $ip46 $hst_command successfully launched" >> $TULIO/log/auth.log exit diff --git a/bin/v-check-api-key b/bin/v-check-api-key index 7652fad2c..b47fc9a13 100755 --- a/bin/v-check-api-key +++ b/bin/v-check-api-key @@ -4,7 +4,7 @@ # # example: v-check-api-key random_key 127.0.0.1 # -# This function checks a key file in $HESTIA/data/keys/ +# This function checks a key file in $TULIO/data/keys/ #----------------------------------------------------------# # Variables & Functions # @@ -14,17 +14,16 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" new_timestamp abort_missmatch() { echo "Error: key missmatch" - echo "$date $time api $ip failed to login" >> $HESTIA/log/auth.log + echo "$date $time api $ip failed to login" >> $TULIO/log/auth.log exit "$E_PASSWORD" } @@ -46,19 +45,19 @@ key="$(basename "$1")" [[ -z $key || ${#key} -lt 16 ]] && abort_missmatch # Key file must exist -maybe_key_path="$(readlink -e "${HESTIA}/data/keys/${key}")" +maybe_key_path="$(readlink -e "${TULIO}/data/keys/${key}")" [[ -z $maybe_key_path ]] && abort_missmatch # Key file cannot be the key store -[[ $maybe_key_path == "${HESTIA}/data/keys" ]] && abort_missmatch +[[ $maybe_key_path == "${TULIO}/data/keys" ]] && abort_missmatch # Key file must be in the key store -[[ $maybe_key_path == "${HESTIA}/data/keys/"* ]] || abort_missmatch +[[ $maybe_key_path == "${TULIO}/data/keys/"* ]] || abort_missmatch #----------------------------------------------------------# # TulioCP # #----------------------------------------------------------# -echo "$date $time api $ip successfully launched" >> $HESTIA/log/auth.log +echo "$date $time api $ip successfully launched" >> $TULIO/log/auth.log exit diff --git a/bin/v-check-fs-permission b/bin/v-check-fs-permission index 2634a2220..31363a5a7 100755 --- a/bin/v-check-fs-permission +++ b/bin/v-check-fs-permission @@ -17,11 +17,10 @@ src=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-check-mail-account-hash b/bin/v-check-mail-account-hash index 7ed892bd4..2d3c4daf6 100755 --- a/bin/v-check-mail-account-hash +++ b/bin/v-check-mail-account-hash @@ -21,11 +21,10 @@ HIDE=2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-check-user-2fa b/bin/v-check-user-2fa index 88cf0bce4..e16096bdc 100755 --- a/bin/v-check-user-2fa +++ b/bin/v-check-user-2fa @@ -18,11 +18,10 @@ token=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -46,7 +45,7 @@ if [ -z "$TWOFA" ]; then fi # Check if token is valid -result=$($HESTIA_PHP $HESTIA/web/inc/2fa/check.php "$TWOFA" "$token") +result=$($TULIO_PHP $TULIO/web/inc/2fa/check.php "$TWOFA" "$token") if [ "$result" != "ok" ]; then echo "Error: Authentication token mismatch." exit 9 diff --git a/bin/v-check-user-hash b/bin/v-check-user-hash index 06b474571..a69dffe00 100755 --- a/bin/v-check-user-hash +++ b/bin/v-check-user-hash @@ -20,11 +20,10 @@ ip46=${3-127.0.0.1} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" time_n_date=$(date +'%T %F') time=$(echo "$time_n_date" | cut -f 1 -d \ ) @@ -38,9 +37,9 @@ check_args '2' "$#" 'USER HASH' is_format_valid 'user' 'ip46' # Checking user -if [ ! -d "$HESTIA/data/users/$user" ] && [ "$user" != 'root' ]; then +if [ ! -d "$TULIO/data/users/$user" ] && [ "$user" != 'root' ]; then echo "Error: password missmatch" - echo "$date $time $user $ip failed to login" >> $HESTIA/log/auth.log + echo "$date $time $user $ip failed to login" >> $TULIO/log/auth.log exit 9 fi @@ -50,7 +49,7 @@ is_hash_valid # Checking empty hash if [[ -z "$hash" ]]; then echo "Error: password missmatch" - echo "$date $time $user $ip46 failed to login" >> $HESTIA/log/auth.log + echo "$date $time $user $ip46 failed to login" >> $TULIO/log/auth.log exit 9 fi @@ -72,7 +71,7 @@ if echo "$shadow" | grep -qE '^\$[0-9a-z]+\$[^\$]+\$'; then method='sha-512' else echo "Error: password missmatch" - echo "$date $time $user $ip46 failed to login" >> $HESTIA/log/auth.log + echo "$date $time $user $ip46 failed to login" >> $TULIO/log/auth.log exit 9 fi else @@ -83,14 +82,14 @@ fi # Checking salt if [ -z "$salt" ]; then echo "Error: password missmatch" - echo "$date $time $user $ip46 failed to login" >> $HESTIA/log/auth.log + echo "$date $time $user $ip46 failed to login" >> $TULIO/log/auth.log exit 9 fi # Comparing hashes if [[ "$shadow" != "$hash" ]]; then echo "Error: password missmatch" - echo "$date $time $user $ip46 failed to login" >> $HESTIA/log/auth.log + echo "$date $time $user $ip46 failed to login" >> $TULIO/log/auth.log exit 9 fi @@ -99,6 +98,6 @@ fi #----------------------------------------------------------# # Logging -echo "$date $time $user $ip46 successfully logged in" >> $HESTIA/log/auth.log +echo "$date $time $user $ip46 successfully logged in" >> $TULIO/log/auth.log exit diff --git a/bin/v-check-user-password b/bin/v-check-user-password index a06b2a871..98debb375 100755 --- a/bin/v-check-user-password +++ b/bin/v-check-user-password @@ -21,11 +21,10 @@ return_hash=$4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" time_n_date=$(date +'%T %F') time=$(echo "$time_n_date" | cut -f 1 -d \ ) @@ -39,9 +38,9 @@ check_args '2' "$#" 'USER PASSWORD [IP] [RETURN_HASH]' is_format_valid 'user' 'ip46' # Checking user -if [ ! -d "$HESTIA/data/users/$user" ]; then +if [ ! -d "$TULIO/data/users/$user" ]; then echo "Error: password missmatch" - echo "$date $time $user $ip46 failed to login" >> $HESTIA/log/auth.log + echo "$date $time $user $ip46 failed to login" >> $TULIO/log/auth.log exit 9 fi @@ -50,7 +49,7 @@ is_password_valid # Checking empty password if [[ -z "$password" ]]; then echo "Error: password missmatch" - echo "$date $time $user $ip46 failed to login" >> $HESTIA/log/auth.log + echo "$date $time $user $ip46 failed to login" >> $TULIO/log/auth.log exit 9 fi @@ -72,7 +71,7 @@ if echo "$shadow" | grep -qE '^\$[0-9a-z]+\$[^\$]+\$'; then method='sha-512' else echo "Error: password missmatch" - echo "$date $time $user $ip46 failed to login" >> $HESTIA/log/auth.log + echo "$date $time $user $ip46 failed to login" >> $TULIO/log/auth.log exit 9 fi else @@ -82,7 +81,7 @@ fi if [ -z "$salt" ]; then echo "Error: password missmatch" - echo "$date $time $user $ip46 failed to login" >> $HESTIA/log/auth.log + echo "$date $time $user $ip46 failed to login" >> $TULIO/log/auth.log exit 9 fi @@ -98,7 +97,7 @@ if [ "$method" = "yescrypt" ]; then if [ $? -ne 0 ]; then echo "Error: password missmatch" if [ -z "$return_hash" ]; then - echo "$date $time $user $ip46 failed to login" >> $HESTIA/log/auth.log + echo "$date $time $user $ip46 failed to login" >> $TULIO/log/auth.log fi exit 9 fi @@ -109,7 +108,7 @@ else if [[ -z "$hash" ]]; then echo "Error: password missmatch" if [ -z "$return_hash" ]; then - echo "$date $time $user $ip46 failed to login" >> $HESTIA/log/auth.log + echo "$date $time $user $ip46 failed to login" >> $TULIO/log/auth.log fi exit 9 fi @@ -120,7 +119,7 @@ result=$(grep "^$user:$hash:" /etc/shadow 2> /dev/null) if [[ -z "$result" ]]; then echo "Error: password missmatch" if [ -z "$return_hash" ]; then - echo "$date $time $user $ip46 failed to login" >> $HESTIA/log/auth.log + echo "$date $time $user $ip46 failed to login" >> $TULIO/log/auth.log fi exit 9 fi @@ -133,7 +132,7 @@ if [ -n "$return_hash" ]; then echo $hash else # If return_hash is pressent it will log a second time - echo "$date $time $user $ip46 successfully logged in" >> $HESTIA/log/auth.log + echo "$date $time $user $ip46 successfully logged in" >> $TULIO/log/auth.log fi exit diff --git a/bin/v-copy-fs-directory b/bin/v-copy-fs-directory index e25f604ad..b93b37673 100755 --- a/bin/v-copy-fs-directory +++ b/bin/v-copy-fs-directory @@ -18,9 +18,8 @@ dst_dir=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh #----------------------------------------------------------# # Verifications # diff --git a/bin/v-copy-fs-file b/bin/v-copy-fs-file index 5ca645cf8..16ccd0aab 100755 --- a/bin/v-copy-fs-file +++ b/bin/v-copy-fs-file @@ -18,9 +18,8 @@ dst_file=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh #----------------------------------------------------------# # Verifications # diff --git a/bin/v-copy-user-package b/bin/v-copy-user-package index 702c2878e..c3147b950 100755 --- a/bin/v-copy-user-package +++ b/bin/v-copy-user-package @@ -19,13 +19,12 @@ new_package=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio.conf/tulio.conf -source $HESTIA/conf/tulio.conf +source $TULIO/conf/tulio.conf # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Perform verification if read-only mode is enabled check_tulio_demo_mode @@ -40,16 +39,16 @@ is_object_format_valid "$package" "Package" is_object_format_valid "$new_package" "New package" if [ -n "$1" ]; then - if [ ! -f "$HESTIA/data/packages/$package.pkg" ]; then + if [ ! -f "$TULIO/data/packages/$package.pkg" ]; then echo "Error: package does not exist." exit "$E_NOTEXIST" fi if [ -n "$2" ]; then # Copy package - cp -f "$HESTIA/data/packages/$package.pkg" "$HESTIA/data/packages/$new_package.pkg" + cp -f "$TULIO/data/packages/$package.pkg" "$TULIO/data/packages/$new_package.pkg" # Don't leave the .sh file behind - if [ -f "$HESTIA/data/packages/$package.sh" ]; then - cp $HESTIA/data/packages/$package.sh $HESTIA/data/packages/$new_package.sh + if [ -f "$TULIO/data/packages/$package.sh" ]; then + cp $TULIO/data/packages/$package.sh $TULIO/data/packages/$new_package.sh fi else echo "Error: new package name not specified." diff --git a/bin/v-delete-access-key b/bin/v-delete-access-key index 05980241b..4537653ff 100755 --- a/bin/v-delete-access-key +++ b/bin/v-delete-access-key @@ -4,7 +4,7 @@ # # example: v-delete-access-key mykey # -# This function removes a key from in $HESTIA/data/access-keys/ +# This function removes a key from in $TULIO/data/access-keys/ #----------------------------------------------------------# # Variables & Functions # @@ -14,11 +14,10 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Variables & Functions # @@ -37,13 +36,13 @@ check_tulio_demo_mode # Action # #----------------------------------------------------------# -if [ ! -d "$HESTIA/data/access-keys/" ]; then +if [ ! -d "$TULIO/data/access-keys/" ]; then exit "$E_NOTEXIST" fi -if [[ -e "${HESTIA}/data/access-keys/${access_key_id}" ]]; then - source_conf "${HESTIA}/data/access-keys/${access_key_id}" - rm "${HESTIA}/data/access-keys/${access_key_id}" +if [[ -e "${TULIO}/data/access-keys/${access_key_id}" ]]; then + source_conf "${TULIO}/data/access-keys/${access_key_id}" + rm "${TULIO}/data/access-keys/${access_key_id}" else exit "$E_NOTEXIST" fi diff --git a/bin/v-delete-backup-host b/bin/v-delete-backup-host index 423687fd9..e789018dd 100755 --- a/bin/v-delete-backup-host +++ b/bin/v-delete-backup-host @@ -17,11 +17,10 @@ type=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -43,7 +42,7 @@ check_tulio_demo_mode #----------------------------------------------------------# # Deleting host config -rm -f $HESTIA/conf/$type.backup.conf +rm -f $TULIO/conf/$type.backup.conf #----------------------------------------------------------# # TulioCP # @@ -55,7 +54,7 @@ bckp=$(echo "$BACKUP_SYSTEM" \ | sed "s/^$type$//" \ | sed "/^$/d" \ | sed ':a;N;$!ba;s/\n/,/g') -sed -i "s/BACKUP_SYSTEM=.*/BACKUP_SYSTEM='$bckp'/g" $HESTIA/conf/tulio.conf +sed -i "s/BACKUP_SYSTEM=.*/BACKUP_SYSTEM='$bckp'/g" $TULIO/conf/tulio.conf # Logging $BIN/v-log-action "system" "Info" "Backup" "Removed remote backup host (Host: $host, Type: $type)." diff --git a/bin/v-delete-backup-host-restic b/bin/v-delete-backup-host-restic index 05647cb3f..17facd5fd 100755 --- a/bin/v-delete-backup-host-restic +++ b/bin/v-delete-backup-host-restic @@ -16,11 +16,10 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -34,7 +33,7 @@ check_tulio_demo_mode #----------------------------------------------------------# # Deleting host config -rm -f $HESTIA/conf/restic.conf +rm -f $TULIO/conf/restic.conf #----------------------------------------------------------# # TulioCP # diff --git a/bin/v-delete-cron-job b/bin/v-delete-cron-job index 98c6812b0..ab54bac07 100755 --- a/bin/v-delete-cron-job +++ b/bin/v-delete-cron-job @@ -19,11 +19,10 @@ restart=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-delete-cron-reports b/bin/v-delete-cron-reports index c3fa9f6b5..b2b3fbd49 100755 --- a/bin/v-delete-cron-reports +++ b/bin/v-delete-cron-reports @@ -18,11 +18,10 @@ user=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-delete-cron-restart-job b/bin/v-delete-cron-restart-job index dcd0276d2..40d3a3e89 100755 --- a/bin/v-delete-cron-restart-job +++ b/bin/v-delete-cron-restart-job @@ -12,11 +12,10 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-delete-cron-tulio-autoupdate b/bin/v-delete-cron-tulio-autoupdate index 69aa59f30..f3650f49b 100755 --- a/bin/v-delete-cron-tulio-autoupdate +++ b/bin/v-delete-cron-tulio-autoupdate @@ -12,11 +12,10 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-delete-database b/bin/v-delete-database index 2993c2d7c..34e031f68 100755 --- a/bin/v-delete-database +++ b/bin/v-delete-database @@ -19,13 +19,12 @@ database=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/db.sh -source $HESTIA/func/db.sh +source $TULIO/func/db.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-delete-database-host b/bin/v-delete-database-host index 0c0d5732c..6ecedb9fa 100755 --- a/bin/v-delete-database-host +++ b/bin/v-delete-database-host @@ -19,13 +19,12 @@ host=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/db.sh -source $HESTIA/func/db.sh +source $TULIO/func/db.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -46,10 +45,10 @@ check_tulio_demo_mode #----------------------------------------------------------# # Deleting server -sed -i "/HOST='$host' /d" "$HESTIA/conf/$type.conf" +sed -i "/HOST='$host' /d" "$TULIO/conf/$type.conf" # Delete RRD database -rm -fr $HESTIA'/web/rrd/db/'$type'_'$host'.rrd' -rm -fr $HESTIA'/web/rrd/db/'*-$type'_'$host'.*' +rm -fr $TULIO'/web/rrd/db/'$type'_'$host'.rrd' +rm -fr $TULIO'/web/rrd/db/'*-$type'_'$host'.*' #----------------------------------------------------------# # TulioCP # diff --git a/bin/v-delete-database-temp-user b/bin/v-delete-database-temp-user index 68e1754f5..843f59498 100755 --- a/bin/v-delete-database-temp-user +++ b/bin/v-delete-database-temp-user @@ -22,13 +22,12 @@ host=$5 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/db.sh -source $HESTIA/func/db.sh +source $TULIO/func/db.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-delete-databases b/bin/v-delete-databases index eea4bb162..61910df3b 100755 --- a/bin/v-delete-databases +++ b/bin/v-delete-databases @@ -17,11 +17,10 @@ user=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-delete-dns-domain b/bin/v-delete-dns-domain index 1c3d9bb2c..947c2181a 100755 --- a/bin/v-delete-dns-domain +++ b/bin/v-delete-dns-domain @@ -20,13 +20,12 @@ restart="$3" # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -76,7 +75,7 @@ fi # Updating dns-cluster queue if [ "$DNS_CLUSTER" = "yes" ]; then cmd="$BIN/v-delete-remote-dns-domain $user $domain" - echo "$cmd" >> $HESTIA/data/queue/dns-cluster.pipe + echo "$cmd" >> $TULIO/data/queue/dns-cluster.pipe fi #----------------------------------------------------------# diff --git a/bin/v-delete-dns-domains b/bin/v-delete-dns-domains index 7243f55df..0d441d73b 100755 --- a/bin/v-delete-dns-domains +++ b/bin/v-delete-dns-domains @@ -18,11 +18,10 @@ restart=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-delete-dns-domains-src b/bin/v-delete-dns-domains-src index f2ad407dd..46df722d4 100755 --- a/bin/v-delete-dns-domains-src +++ b/bin/v-delete-dns-domains-src @@ -19,11 +19,10 @@ restart=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-delete-dns-on-web-alias b/bin/v-delete-dns-on-web-alias index 6051804d1..eef4c6d41 100755 --- a/bin/v-delete-dns-on-web-alias +++ b/bin/v-delete-dns-on-web-alias @@ -25,13 +25,12 @@ restart="$4" # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-delete-dns-record b/bin/v-delete-dns-record index e7d6175e1..06f1884fb 100755 --- a/bin/v-delete-dns-record +++ b/bin/v-delete-dns-record @@ -22,15 +22,14 @@ quiet=$5 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/rebuild.sh -source $HESTIA/func/rebuild.sh +source $TULIO/func/rebuild.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain @@ -68,10 +67,10 @@ fi # Updating dns-cluster queue if [ "$DNS_CLUSTER" = "yes" ]; then # Check for first sync - dlock=$(grep "domain $user $domain" $HESTIA/data/queue/dns-cluster.pipe) + dlock=$(grep "domain $user $domain" $TULIO/data/queue/dns-cluster.pipe) if [ -z "$dlock" ]; then cmd="$BIN/v-delete-remote-dns-record $user $domain $id" - echo "$cmd" >> $HESTIA/data/queue/dns-cluster.pipe + echo "$cmd" >> $TULIO/data/queue/dns-cluster.pipe fi fi diff --git a/bin/v-delete-domain b/bin/v-delete-domain index d213b5608..c0e6ee650 100755 --- a/bin/v-delete-domain +++ b/bin/v-delete-domain @@ -19,11 +19,10 @@ restart="${3-yes}" # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-delete-fastcgi-cache b/bin/v-delete-fastcgi-cache index f0c0c9a00..1c39a7689 100755 --- a/bin/v-delete-fastcgi-cache +++ b/bin/v-delete-fastcgi-cache @@ -19,12 +19,10 @@ restart=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" - # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-delete-firewall-ban b/bin/v-delete-firewall-ban index 772fcbd15..ea5c6b546 100755 --- a/bin/v-delete-firewall-ban +++ b/bin/v-delete-firewall-ban @@ -21,13 +21,12 @@ iptables="/sbin/iptables" # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/firewall.sh -source $HESTIA/func/firewall.sh +source $TULIO/func/firewall.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -47,7 +46,7 @@ check_tulio_demo_mode # Self heal iptables links heal_iptables_links -conf="$HESTIA/data/firewall/banlist.conf" +conf="$TULIO/data/firewall/banlist.conf" if [ "$chain" == "ALL" ]; then check_ip=$(grep "IP='$ipv4_cidr' CHAIN='*'" $conf) if [ -z "$check_ip" ]; then diff --git a/bin/v-delete-firewall-chain b/bin/v-delete-firewall-chain index 411043988..cf6620eef 100755 --- a/bin/v-delete-firewall-chain +++ b/bin/v-delete-firewall-chain @@ -18,13 +18,12 @@ iptables='/sbin/iptables' # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source "$HESTIA/func/main.sh" +source "$TULIO/func/main.sh" # shellcheck source=/usr/local/tulio/func/firewall.sh -source "$HESTIA/func/firewall.sh" +source "$TULIO/func/firewall.sh" # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -45,8 +44,8 @@ check_tulio_demo_mode heal_iptables_links # Deleting chain -chains="$HESTIA/data/firewall/chains.conf" -banlist="$HESTIA/data/firewall/banlist.conf" +chains="$TULIO/data/firewall/chains.conf" +banlist="$TULIO/data/firewall/banlist.conf" chain_param="" [ -f "$chains" ] && chain_param=$(grep "CHAIN='$chain'" "$chains") if [ -n "$chain_param" ]; then diff --git a/bin/v-delete-firewall-ipset b/bin/v-delete-firewall-ipset index 84eebe205..18671e6f2 100755 --- a/bin/v-delete-firewall-ipset +++ b/bin/v-delete-firewall-ipset @@ -16,11 +16,10 @@ ip_name=${1} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -39,7 +38,7 @@ ip_version="$(get_object_value "$ipset_hstobject" 'LISTNAME' "$ip_name" '$IP_VER check_tulio_demo_mode IPSET_BIN="$(command -v ipset)" -IPSET_PATH="$HESTIA/data/firewall/ipset" +IPSET_PATH="$TULIO/data/firewall/ipset" IPSET_FILE="${ip_name}.${ip_version}" # Install ipset package if missing diff --git a/bin/v-delete-firewall-rule b/bin/v-delete-firewall-rule index 8a7c684c4..987238962 100755 --- a/bin/v-delete-firewall-rule +++ b/bin/v-delete-firewall-rule @@ -17,11 +17,10 @@ rule=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -40,7 +39,7 @@ check_tulio_demo_mode #----------------------------------------------------------# # Deleting rule -sed -i "/RULE='$rule' /d" $HESTIA/data/firewall/rules.conf +sed -i "/RULE='$rule' /d" $TULIO/data/firewall/rules.conf # Updating system firewall $BIN/v-update-firewall diff --git a/bin/v-delete-fs-directory b/bin/v-delete-fs-directory index 55f225ce1..f1801bced 100755 --- a/bin/v-delete-fs-directory +++ b/bin/v-delete-fs-directory @@ -17,11 +17,10 @@ dst_dir=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-delete-fs-file b/bin/v-delete-fs-file index 660bd5a7a..771ac79d1 100755 --- a/bin/v-delete-fs-file +++ b/bin/v-delete-fs-file @@ -17,9 +17,8 @@ dst_file=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh #----------------------------------------------------------# # Verifications # diff --git a/bin/v-delete-letsencrypt-domain b/bin/v-delete-letsencrypt-domain index 0dc188c74..733d90400 100755 --- a/bin/v-delete-letsencrypt-domain +++ b/bin/v-delete-letsencrypt-domain @@ -20,13 +20,12 @@ mail=$4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-delete-mail-account b/bin/v-delete-mail-account index bb519b22b..ad9da3863 100755 --- a/bin/v-delete-mail-account +++ b/bin/v-delete-mail-account @@ -20,13 +20,12 @@ account=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-delete-mail-account-alias b/bin/v-delete-mail-account-alias index f720ffee9..b9d6b7b48 100755 --- a/bin/v-delete-mail-account-alias +++ b/bin/v-delete-mail-account-alias @@ -21,13 +21,12 @@ malias=$4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-delete-mail-account-autoreply b/bin/v-delete-mail-account-autoreply index 302f754fc..d26cf4624 100755 --- a/bin/v-delete-mail-account-autoreply +++ b/bin/v-delete-mail-account-autoreply @@ -21,13 +21,12 @@ malias=$4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-delete-mail-account-forward b/bin/v-delete-mail-account-forward index 08c8c682c..a8d5c147e 100755 --- a/bin/v-delete-mail-account-forward +++ b/bin/v-delete-mail-account-forward @@ -21,13 +21,12 @@ forward=$4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-delete-mail-account-fwd-only b/bin/v-delete-mail-account-fwd-only index 19b165a5e..5441076db 100755 --- a/bin/v-delete-mail-account-fwd-only +++ b/bin/v-delete-mail-account-fwd-only @@ -20,13 +20,12 @@ account=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-delete-mail-domain b/bin/v-delete-mail-domain index 0f9e8fef4..6032950f9 100755 --- a/bin/v-delete-mail-domain +++ b/bin/v-delete-mail-domain @@ -20,13 +20,12 @@ domain_idn=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain @@ -81,8 +80,8 @@ if [ -n "$WEB_SYSTEM" ] || [ -n "$PROXY_SYSTEM" ]; then fi # Run extension trigger -if [ -x "$HESTIA/data/extensions/delete-mail-domain.sh" ]; then - $HESTIA/data/extensions/delete-mail-domain.sh "$user" "$domain" +if [ -x "$TULIO/data/extensions/delete-mail-domain.sh" ]; then + $TULIO/data/extensions/delete-mail-domain.sh "$user" "$domain" fi #----------------------------------------------------------# diff --git a/bin/v-delete-mail-domain-antispam b/bin/v-delete-mail-domain-antispam index 1ceab7424..d6c8b1956 100755 --- a/bin/v-delete-mail-domain-antispam +++ b/bin/v-delete-mail-domain-antispam @@ -19,13 +19,12 @@ domain_idn=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain format_domain_idn diff --git a/bin/v-delete-mail-domain-antivirus b/bin/v-delete-mail-domain-antivirus index 016341914..2c8506afc 100755 --- a/bin/v-delete-mail-domain-antivirus +++ b/bin/v-delete-mail-domain-antivirus @@ -19,13 +19,12 @@ domain_idn=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-delete-mail-domain-catchall b/bin/v-delete-mail-domain-catchall index 906cc70c9..5069cd209 100755 --- a/bin/v-delete-mail-domain-catchall +++ b/bin/v-delete-mail-domain-catchall @@ -19,13 +19,12 @@ domain_idn=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-delete-mail-domain-dkim b/bin/v-delete-mail-domain-dkim index c44825db7..cf5ab309c 100755 --- a/bin/v-delete-mail-domain-dkim +++ b/bin/v-delete-mail-domain-dkim @@ -19,13 +19,12 @@ domain=$(echo $domain | tr '[:upper:]' '[:lower:]') # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-delete-mail-domain-reject b/bin/v-delete-mail-domain-reject index ad514d15e..1d8f00712 100755 --- a/bin/v-delete-mail-domain-reject +++ b/bin/v-delete-mail-domain-reject @@ -20,13 +20,12 @@ domain_idn=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain format_domain_idn diff --git a/bin/v-delete-mail-domain-smtp-relay b/bin/v-delete-mail-domain-smtp-relay index 70294e3ec..440e1cabd 100755 --- a/bin/v-delete-mail-domain-smtp-relay +++ b/bin/v-delete-mail-domain-smtp-relay @@ -18,11 +18,10 @@ domain=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-delete-mail-domain-ssl b/bin/v-delete-mail-domain-ssl index 445eeb14e..7df8b8f82 100755 --- a/bin/v-delete-mail-domain-ssl +++ b/bin/v-delete-mail-domain-ssl @@ -19,13 +19,12 @@ restart=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-delete-mail-domain-webmail b/bin/v-delete-mail-domain-webmail index 7d78b3418..925012f2b 100755 --- a/bin/v-delete-mail-domain-webmail +++ b/bin/v-delete-mail-domain-webmail @@ -21,13 +21,12 @@ quiet=$4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-delete-mail-domains b/bin/v-delete-mail-domains index 6cdece09f..056ecfbb6 100755 --- a/bin/v-delete-mail-domains +++ b/bin/v-delete-mail-domains @@ -17,11 +17,10 @@ user=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-delete-remote-dns-domain b/bin/v-delete-remote-dns-domain index 684ec5c03..831902056 100755 --- a/bin/v-delete-remote-dns-domain +++ b/bin/v-delete-remote-dns-domain @@ -18,13 +18,12 @@ domain=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/remote.sh -source $HESTIA/func/remote.sh +source $TULIO/func/remote.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -45,7 +44,7 @@ check_tulio_demo_mode # Starting cluster loop IFS=$'\n' -for cluster in $(grep "SUSPENDED='no'" $HESTIA/conf/dns-cluster.conf); do +for cluster in $(grep "SUSPENDED='no'" $TULIO/conf/dns-cluster.conf); do # Reset user, password and hash vars clear_dns_cluster_settings @@ -67,7 +66,7 @@ done #----------------------------------------------------------# # Updating pipe -pipe="$HESTIA/data/queue/dns-cluster.pipe" +pipe="$TULIO/data/queue/dns-cluster.pipe" str=$(grep -n "$SCRIPT $1 $2$" "$pipe" | cut -f1 -d: | head -n1) if [ -n "$str" ]; then sed -i "$str d" "$pipe" diff --git a/bin/v-delete-remote-dns-domains b/bin/v-delete-remote-dns-domains index dacf4bcd2..eb7260f48 100755 --- a/bin/v-delete-remote-dns-domains +++ b/bin/v-delete-remote-dns-domains @@ -15,13 +15,12 @@ host=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/remote.sh -source $HESTIA/func/remote.sh +source $TULIO/func/remote.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -42,9 +41,9 @@ check_tulio_demo_mode IFS=$'\n' if [ -z $host ]; then - hosts=$(cat "$HESTIA/conf/dns-cluster.conf") + hosts=$(cat "$TULIO/conf/dns-cluster.conf") else - hosts=$(grep "HOST='$host'" "$HESTIA/conf/dns-cluster.conf") + hosts=$(grep "HOST='$host'" "$TULIO/conf/dns-cluster.conf") fi # Starting cluster loop @@ -71,7 +70,7 @@ done #----------------------------------------------------------# # Updating pipe -pipe="$HESTIA/data/queue/dns-cluster.pipe" +pipe="$TULIO/data/queue/dns-cluster.pipe" str=$(grep -n "$SCRIPT $1 $2$" $pipe | cut -f1 -d: | head -n1) if [ -n "$str" ]; then sed -i "$str d" $pipe diff --git a/bin/v-delete-remote-dns-host b/bin/v-delete-remote-dns-host index 2425abb11..cc9b3533e 100755 --- a/bin/v-delete-remote-dns-host +++ b/bin/v-delete-remote-dns-host @@ -17,13 +17,12 @@ host=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/remote.sh -source $HESTIA/func/remote.sh +source $TULIO/func/remote.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -45,13 +44,13 @@ check_tulio_demo_mode $BIN/v-delete-remote-dns-domains "$host" >> /dev/null 2>&1 # Deleting server -sed -i "/HOST='$host' /d" "$HESTIA/conf/dns-cluster.conf" +sed -i "/HOST='$host' /d" "$TULIO/conf/dns-cluster.conf" # Deleting DNS_CLUSTER key -check_cluster=$(grep HOST $HESTIA/conf/dns-cluster.conf | wc -l) +check_cluster=$(grep HOST $TULIO/conf/dns-cluster.conf | wc -l) if [ "$check_cluster" -eq '0' ]; then - rm -f "$HESTIA/conf/dns-cluster.conf" - sed -i "/DNS_CLUSTER=/d" "$HESTIA/conf/tulio.conf" + rm -f "$TULIO/conf/dns-cluster.conf" + sed -i "/DNS_CLUSTER=/d" "$TULIO/conf/tulio.conf" # Delete cron job cmd="v-update-sys-queue dns-cluster" diff --git a/bin/v-delete-remote-dns-record b/bin/v-delete-remote-dns-record index d1ae6dbda..afd3dd030 100755 --- a/bin/v-delete-remote-dns-record +++ b/bin/v-delete-remote-dns-record @@ -19,13 +19,12 @@ id=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/remote.sh -source $HESTIA/func/remote.sh +source $TULIO/func/remote.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -47,7 +46,7 @@ check_tulio_demo_mode if [ "$DNS_CLUSTER_SYSTEM" != "tulio-zone" ]; then # Starting cluster loop IFS=$'\n' - for cluster in $(cat $HESTIA/conf/dns-cluster.conf); do + for cluster in $(cat $TULIO/conf/dns-cluster.conf); do # Reset user, password and hash vars clear_dns_cluster_settings @@ -76,7 +75,7 @@ fi #----------------------------------------------------------# # Updating pipe -pipe="$HESTIA/data/queue/dns-cluster.pipe" +pipe="$TULIO/data/queue/dns-cluster.pipe" str=$(grep -n "$SCRIPT $1 $2 $3$" "$pipe" | cut -f1 -d: | head -n1) if [ -n "$str" ]; then sed -i "$str d" "$pipe" diff --git a/bin/v-delete-sys-api-ip b/bin/v-delete-sys-api-ip index 79440f8f0..bdb8e325b 100755 --- a/bin/v-delete-sys-api-ip +++ b/bin/v-delete-sys-api-ip @@ -14,13 +14,12 @@ ip46=${1// /} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-delete-sys-cgroups b/bin/v-delete-sys-cgroups index 989aa75ab..6865155d7 100755 --- a/bin/v-delete-sys-cgroups +++ b/bin/v-delete-sys-cgroups @@ -14,11 +14,10 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-delete-sys-filemanager b/bin/v-delete-sys-filemanager index 8409bd180..1d8838d29 100755 --- a/bin/v-delete-sys-filemanager +++ b/bin/v-delete-sys-filemanager @@ -17,13 +17,12 @@ FORCE=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" -FM_INSTALL_DIR="$HESTIA/web/fm" +FM_INSTALL_DIR="$TULIO/web/fm" #----------------------------------------------------------# # Verifications # @@ -35,12 +34,12 @@ if [ "x$(id -u)" != 'x0' ]; then exit 10 fi -# Ensure that $HESTIA (/usr/local/tulio/) and other variables are valid. -if [ -z "$HESTIA" ]; then - HESTIA="/usr/local/tulio" +# Ensure that $TULIO (/usr/local/tulio/) and other variables are valid. +if [ -z "$TULIO" ]; then + TULIO="/usr/local/tulio" fi -if [ -z "$HOMEDIR" ] || [ -z "$HESTIA_INSTALL_DIR" ]; then +if [ -z "$HOMEDIR" ] || [ -z "$TULIO_INSTALL_DIR" ]; then echo "Error: Tulio environment vars not present" exit 2 fi diff --git a/bin/v-delete-sys-firewall b/bin/v-delete-sys-firewall index a20866654..8308c8291 100755 --- a/bin/v-delete-sys-firewall +++ b/bin/v-delete-sys-firewall @@ -14,11 +14,10 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-delete-sys-ip b/bin/v-delete-sys-ip index 5cabfe44e..04d4da285 100755 --- a/bin/v-delete-sys-ip +++ b/bin/v-delete-sys-ip @@ -18,15 +18,14 @@ ip="$1" # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -46,7 +45,7 @@ check_tulio_demo_mode #----------------------------------------------------------# # Import IP variables -source "$HESTIA/data/ips/$ip" +source "$TULIO/data/ips/$ip" cidr="$(convert_netmask "$NETMASK")" # Get primary IP @@ -87,7 +86,7 @@ elif [ -e "/etc/network/interfaces" ]; then fi # Deleting Tulio IP -rm -f $HESTIA/data/ips/$ip +rm -f $TULIO/data/ips/$ip # Deleting web config if [ -n "$WEB_SYSTEM" ]; then diff --git a/bin/v-delete-sys-mail-queue b/bin/v-delete-sys-mail-queue index ab98d5127..4c0cf6f4d 100755 --- a/bin/v-delete-sys-mail-queue +++ b/bin/v-delete-sys-mail-queue @@ -15,11 +15,10 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Perform verification if read-only mode is enabled check_tulio_demo_mode diff --git a/bin/v-delete-sys-pma-sso b/bin/v-delete-sys-pma-sso index a21933a62..99f84a132 100755 --- a/bin/v-delete-sys-pma-sso +++ b/bin/v-delete-sys-pma-sso @@ -16,11 +16,10 @@ MODE=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" PMA_INSTALL="/usr/share/phpmyadmin" PMA_CONFIG="/etc/phpmyadmin" diff --git a/bin/v-delete-sys-quota b/bin/v-delete-sys-quota index 1597c3776..e870d27e9 100755 --- a/bin/v-delete-sys-quota +++ b/bin/v-delete-sys-quota @@ -14,11 +14,10 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-delete-sys-sftp-jail b/bin/v-delete-sys-sftp-jail index aaacad13e..3f63b20b7 100755 --- a/bin/v-delete-sys-sftp-jail +++ b/bin/v-delete-sys-sftp-jail @@ -14,11 +14,10 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -57,7 +56,7 @@ fi # Validating opensshd config if [ "$restart" = 'yes' ]; then subj="OpenSSH restart failed" - email=$(grep CONTACT "$HESTIA/data/users/$ROOT_USER/user.conf" | cut -f 2 -d \') + email=$(grep CONTACT "$TULIO/data/users/$ROOT_USER/user.conf" | cut -f 2 -d \') /usr/sbin/sshd -t > /dev/null 2>&1 if [ "$?" -ne 0 ]; then mail_text="OpenSSH can not be restarted. Please check config: diff --git a/bin/v-delete-sys-smtp b/bin/v-delete-sys-smtp index 27b1ee150..ad559e93b 100755 --- a/bin/v-delete-sys-smtp +++ b/bin/v-delete-sys-smtp @@ -15,11 +15,10 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-delete-sys-smtp-relay b/bin/v-delete-sys-smtp-relay index c8564a504..4a7490407 100755 --- a/bin/v-delete-sys-smtp-relay +++ b/bin/v-delete-sys-smtp-relay @@ -14,11 +14,10 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-delete-sys-snappymail b/bin/v-delete-sys-snappymail index c30596608..309966650 100755 --- a/bin/v-delete-sys-snappymail +++ b/bin/v-delete-sys-snappymail @@ -12,13 +12,12 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # upgrade config file -source "$HESTIA/install/upgrade/upgrade.conf" +source "$TULIO/install/upgrade/upgrade.conf" # Folder paths SM_INSTALL_DIR="/var/lib/snappymail" @@ -35,12 +34,12 @@ if [ "x$(id -u)" != 'x0' ]; then exit 10 fi -# Ensure that $HESTIA (/usr/local/tulio/) and other variables are valid. -if [ -z "$HESTIA" ]; then - HESTIA="/usr/local/tulio" +# Ensure that $TULIO (/usr/local/tulio/) and other variables are valid. +if [ -z "$TULIO" ]; then + TULIO="/usr/local/tulio" fi -if [ -z "$HOMEDIR" ] || [ -z "$HESTIA_INSTALL_DIR" ]; then +if [ -z "$HOMEDIR" ] || [ -z "$TULIO_INSTALL_DIR" ]; then echo "ERROR: Environment variables not present, uninstallation aborted." exit 2 fi diff --git a/bin/v-delete-sys-ssh-jail b/bin/v-delete-sys-ssh-jail index 5f4515f28..f072313ad 100755 --- a/bin/v-delete-sys-ssh-jail +++ b/bin/v-delete-sys-ssh-jail @@ -14,11 +14,10 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-delete-sys-web-terminal b/bin/v-delete-sys-web-terminal index 591b8ac64..178701b28 100755 --- a/bin/v-delete-sys-web-terminal +++ b/bin/v-delete-sys-web-terminal @@ -14,11 +14,10 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-delete-user b/bin/v-delete-user index bc1f31106..ea6d35490 100755 --- a/bin/v-delete-user +++ b/bin/v-delete-user @@ -19,17 +19,16 @@ restart=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/db.sh -source $HESTIA/func/db.sh +source $TULIO/func/db.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -85,8 +84,8 @@ $BIN/v-delete-user-ips "$user" check_result "$?" "user ip release failed" # Deleteing user pipes -sed -i "/ $user$/d" "$HESTIA/data/queue/disk.pipe" -sed -i "/ $user$/d" "$HESTIA/data/queue/traffic.pipe" +sed -i "/ $user$/d" "$TULIO/data/queue/disk.pipe" +sed -i "/ $user$/d" "$TULIO/data/queue/traffic.pipe" # Deleting sftp jail $BIN/v-delete-user-sftp-jail "$user" diff --git a/bin/v-delete-user-2fa b/bin/v-delete-user-2fa index 3955ad223..c5f7caf53 100755 --- a/bin/v-delete-user-2fa +++ b/bin/v-delete-user-2fa @@ -17,11 +17,10 @@ user=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-delete-user-auth-log b/bin/v-delete-user-auth-log index a24dd2da7..53875ebde 100755 --- a/bin/v-delete-user-auth-log +++ b/bin/v-delete-user-auth-log @@ -14,11 +14,10 @@ user=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Perform verification if read-only mode is enabled check_tulio_demo_mode diff --git a/bin/v-delete-user-backup b/bin/v-delete-user-backup index 701c247fa..b1fbe70dd 100755 --- a/bin/v-delete-user-backup +++ b/bin/v-delete-user-backup @@ -18,13 +18,12 @@ backup=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/backup.sh -source $HESTIA/func/backup.sh +source $TULIO/func/backup.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-delete-user-backup-exclusions b/bin/v-delete-user-backup-exclusions index 76ee9aad7..93c347e9f 100755 --- a/bin/v-delete-user-backup-exclusions +++ b/bin/v-delete-user-backup-exclusions @@ -18,11 +18,10 @@ system=$(echo "$2" | tr '[:lower:]' '[:upper:]') # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-delete-user-backup-restic b/bin/v-delete-user-backup-restic index 614efef85..7da23ff75 100644 --- a/bin/v-delete-user-backup-restic +++ b/bin/v-delete-user-backup-restic @@ -19,21 +19,20 @@ snapshot=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # shellcheck source=/usr/local/tulio/func/rebuild.sh -source $HESTIA/func/rebuild.sh +source $TULIO/func/rebuild.sh # shellcheck source=/usr/local/tulio/func/syshealth.sh -source $HESTIA/func/syshealth.sh +source $TULIO/func/syshealth.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" -source_conf $HESTIA/conf/restic.conf +source_conf $TULIO/conf/restic.conf #----------------------------------------------------------# # Verifications # @@ -44,7 +43,7 @@ check_args '2' "$#" "$args_usage" is_format_valid 'user' is_object_valid 'user' 'USER' "$user" -source_conf $HESTIA/conf/restic.conf +source_conf $TULIO/conf/restic.conf #----------------------------------------------------------# # Action # @@ -64,7 +63,7 @@ restic --repo "$REPO$user" --password-file "$USER_DATA/restic.conf" forget "$sna # TulioCP # #----------------------------------------------------------# -sed -i "/v-delete-user-backup-restic '$user' '$snapshot' /d" $HESTIA/data/queue/backup.pipe +sed -i "/v-delete-user-backup-restic '$user' '$snapshot' /d" $TULIO/data/queue/backup.pipe # Logging $BIN/v-log-action "system" "Info" "Backup" "Restic snapshot successfully deleted (User: $user, Snapshot: $snapshot)." diff --git a/bin/v-delete-user-ips b/bin/v-delete-user-ips index 3a1a528ba..16b87bd97 100755 --- a/bin/v-delete-user-ips +++ b/bin/v-delete-user-ips @@ -17,13 +17,12 @@ user=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -44,7 +43,7 @@ check_tulio_demo_mode #----------------------------------------------------------# # Parsing user ips -ip_list=$(grep -H "OWNER='$user'" $HESTIA/data/ips/* | cut -f 1 -d:) +ip_list=$(grep -H "OWNER='$user'" $TULIO/data/ips/* | cut -f 1 -d:) for ip in $ip_list; do ip=$(basename "$ip") diff --git a/bin/v-delete-user-log b/bin/v-delete-user-log index af0797583..edf167923 100755 --- a/bin/v-delete-user-log +++ b/bin/v-delete-user-log @@ -17,11 +17,10 @@ user=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Perform verification if read-only mode is enabled check_tulio_demo_mode @@ -42,9 +41,9 @@ fi # Set correct path for log file (system or user) if [ "$user" = "system" ]; then - log_file="$HESTIA/log/activity.log" + log_file="$TULIO/log/activity.log" else - log_file="$HESTIA/data/users/$user/history.log" + log_file="$TULIO/data/users/$user/history.log" fi # Verify log file exists before deleting to prevent errors diff --git a/bin/v-delete-user-notification b/bin/v-delete-user-notification index af3fdb14a..24033994a 100755 --- a/bin/v-delete-user-notification +++ b/bin/v-delete-user-notification @@ -18,11 +18,10 @@ id=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-delete-user-package b/bin/v-delete-user-package index 1c11ffdbb..867155405 100755 --- a/bin/v-delete-user-package +++ b/bin/v-delete-user-package @@ -20,15 +20,14 @@ package=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Functions is_package_in_use() { - check_package=$(grep "PACKAGE='$package" $HESTIA/data/users/*/user.conf | cut -d'/' -f7) + check_package=$(grep "PACKAGE='$package" $TULIO/data/users/*/user.conf | cut -d'/' -f7) if [ -n "$check_package" ]; then for user in $check_package; do $BIN/v-change-user-package "$user" 'default' @@ -53,7 +52,7 @@ check_tulio_demo_mode #----------------------------------------------------------# # Deleting user package -rm -f "$HESTIA/data/packages/$package.pkg" +rm -f "$TULIO/data/packages/$package.pkg" #----------------------------------------------------------# # TulioCP # diff --git a/bin/v-delete-user-sftp-jail b/bin/v-delete-user-sftp-jail index 18118fe5f..b4c56f61e 100755 --- a/bin/v-delete-user-sftp-jail +++ b/bin/v-delete-user-sftp-jail @@ -17,11 +17,10 @@ user=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-delete-user-ssh-key b/bin/v-delete-user-ssh-key index 5aed91ff6..72ac03d32 100755 --- a/bin/v-delete-user-ssh-key +++ b/bin/v-delete-user-ssh-key @@ -18,11 +18,10 @@ keyid=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting #----------------------------------------------------------# diff --git a/bin/v-delete-user-stats b/bin/v-delete-user-stats index 0ad37991e..3d0ef788d 100755 --- a/bin/v-delete-user-stats +++ b/bin/v-delete-user-stats @@ -19,11 +19,10 @@ mode=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-delete-web-domain b/bin/v-delete-web-domain index 461c0ceb9..2290b5a90 100755 --- a/bin/v-delete-web-domain +++ b/bin/v-delete-web-domain @@ -23,15 +23,14 @@ restart=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain @@ -103,7 +102,7 @@ fi # Deleting web stats if [ -n "$STATS" ] && [ "$STATS" != 'no' ]; then - sed -i "/ $domain$/d" $HESTIA/data/queue/webstats.pipe + sed -i "/ $domain$/d" $TULIO/data/queue/webstats.pipe rm -f $HOMEDIR/$user/conf/web/$domain/$STATS.conf rm -f /etc/awstats/$STATS.$domain.conf fi diff --git a/bin/v-delete-web-domain-alias b/bin/v-delete-web-domain-alias index 9723656c7..de3aedbe0 100755 --- a/bin/v-delete-web-domain-alias +++ b/bin/v-delete-web-domain-alias @@ -21,15 +21,14 @@ restart=$4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-delete-web-domain-allow-users b/bin/v-delete-web-domain-allow-users index 19cd41522..50df6134a 100755 --- a/bin/v-delete-web-domain-allow-users +++ b/bin/v-delete-web-domain-allow-users @@ -22,13 +22,12 @@ domain_idn=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-delete-web-domain-backend b/bin/v-delete-web-domain-backend index ad548ea93..49402a8e5 100755 --- a/bin/v-delete-web-domain-backend +++ b/bin/v-delete-web-domain-backend @@ -20,13 +20,12 @@ restart=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-delete-web-domain-ftp b/bin/v-delete-web-domain-ftp index 19f083d68..1a105872a 100755 --- a/bin/v-delete-web-domain-ftp +++ b/bin/v-delete-web-domain-ftp @@ -20,13 +20,12 @@ ftp_user=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-delete-web-domain-httpauth b/bin/v-delete-web-domain-httpauth index d7ae21ded..f6c4b5a62 100755 --- a/bin/v-delete-web-domain-httpauth +++ b/bin/v-delete-web-domain-httpauth @@ -20,13 +20,12 @@ restart=${4-yes} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-delete-web-domain-proxy b/bin/v-delete-web-domain-proxy index ea1ecfc5c..cea9ffa92 100755 --- a/bin/v-delete-web-domain-proxy +++ b/bin/v-delete-web-domain-proxy @@ -20,13 +20,12 @@ restart=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-delete-web-domain-redirect b/bin/v-delete-web-domain-redirect index d9cafc132..b0efa23b1 100755 --- a/bin/v-delete-web-domain-redirect +++ b/bin/v-delete-web-domain-redirect @@ -19,13 +19,12 @@ restart=${3-no} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-delete-web-domain-ssl b/bin/v-delete-web-domain-ssl index 098da8f6c..2071abd92 100755 --- a/bin/v-delete-web-domain-ssl +++ b/bin/v-delete-web-domain-ssl @@ -20,13 +20,12 @@ restart=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-delete-web-domain-ssl-force b/bin/v-delete-web-domain-ssl-force index 5ff25cd50..a5ecd736a 100755 --- a/bin/v-delete-web-domain-ssl-force +++ b/bin/v-delete-web-domain-ssl-force @@ -20,13 +20,12 @@ quiet="$4" # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-delete-web-domain-ssl-hsts b/bin/v-delete-web-domain-ssl-hsts index 87d847d80..536eb183f 100755 --- a/bin/v-delete-web-domain-ssl-hsts +++ b/bin/v-delete-web-domain-ssl-hsts @@ -20,13 +20,12 @@ quiet=$4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-delete-web-domain-stats b/bin/v-delete-web-domain-stats index 327ee333c..d158269c3 100755 --- a/bin/v-delete-web-domain-stats +++ b/bin/v-delete-web-domain-stats @@ -20,13 +20,12 @@ domain_idn=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain @@ -65,7 +64,7 @@ rm -f "$HOMEDIR/$user/conf/web/$domain/$STATS.conf" #----------------------------------------------------------# # Deleting pipe command -sed -i "/ $domain$/d" $HESTIA/data/queue/webstats.pipe +sed -i "/ $domain$/d" $TULIO/data/queue/webstats.pipe # Update config update_object_value 'web' 'DOMAIN' "$domain" '$STATS' '' diff --git a/bin/v-delete-web-domain-stats-user b/bin/v-delete-web-domain-stats-user index 6d44b7889..d9f2dae1f 100755 --- a/bin/v-delete-web-domain-stats-user +++ b/bin/v-delete-web-domain-stats-user @@ -22,13 +22,12 @@ restart=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-delete-web-domains b/bin/v-delete-web-domains index d5daed46d..abfcbb494 100755 --- a/bin/v-delete-web-domains +++ b/bin/v-delete-web-domains @@ -18,13 +18,12 @@ restart=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-delete-web-php b/bin/v-delete-web-php index f47886430..d42959f2c 100755 --- a/bin/v-delete-web-php +++ b/bin/v-delete-web-php @@ -17,11 +17,10 @@ version=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -44,7 +43,7 @@ if [[ ! $version =~ ^[0-9]\.[0-9]+ ]]; then fi # Remove backend template -[ -f $HESTIA/data/templates/web/php-fpm/PHP-${version/\./_}.tpl ] && rm -f $HESTIA/data/templates/web/php-fpm/PHP-${version/\./_}.tpl +[ -f $TULIO/data/templates/web/php-fpm/PHP-${version/\./_}.tpl ] && rm -f $TULIO/data/templates/web/php-fpm/PHP-${version/\./_}.tpl # Check if php version exists version_check=$($BIN/v-list-sys-php plain | grep "$version") @@ -103,7 +102,7 @@ if [ "$WEB_BACKEND" = "php-fpm" ]; then if [ -z "$conf" ]; then # If not grab the "last php version last=$($BIN/v-list-sys-php "shell" | tail -n1) - cp -f $HESTIA/install/deb/php-fpm/www.conf /etc/php/$last/fpm/pool.d/www.conf + cp -f $TULIO/install/deb/php-fpm/www.conf /etc/php/$last/fpm/pool.d/www.conf $BIN/v-restart-web-backend fi fi diff --git a/bin/v-download-backup b/bin/v-download-backup index cbb40d0ab..372dbe0d0 100755 --- a/bin/v-download-backup +++ b/bin/v-download-backup @@ -23,21 +23,20 @@ fi # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # shellcheck source=/usr/local/tulio/func/db.sh -source $HESTIA/func/db.sh +source $TULIO/func/db.sh # shellcheck source=/usr/local/tulio/func/rebuild.sh -source $HESTIA/func/rebuild.sh +source $TULIO/func/rebuild.sh # shellcheck source=/usr/local/tulio/func/backup.sh -source $HESTIA/func/backup.sh +source $TULIO/func/backup.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -57,7 +56,7 @@ check_tulio_demo_mode disk_usage=$(df $BACKUP | tail -n1 | tr ' ' '\n' | grep % | cut -f 1 -d %) if [ "$disk_usage" -ge "$BACKUP_DISK_LIMIT" ]; then echo "Error: Not enough disk space" | $SENDMAIL -s "$subj" $email $notify - sed -i "/ $user /d" $HESTIA/data/queue/backup.pipe + sed -i "/ $user /d" $TULIO/data/queue/backup.pipe check_result $E_DISK "Not enough disk space" fi @@ -86,7 +85,7 @@ if [ ! -e "$BACKUP/$backup" ]; then if [ -z "$downloaded" ]; then subj="Download of $backup failed for $user" $BIN/v-add-user-notification $user "$subj" "

Unable to retrieve backup file from remote server.

Error: $backup file doesn't exist in '${BACKUP}' directory.

" - sed -i "/v-download-backup $user /d" $HESTIA/data/queue/backup.pipe + sed -i "/v-download-backup $user /d" $TULIO/data/queue/backup.pipe check_result "$E_NOTEXIST" "backup file $backup doesn't exist in '${BACKUP}' folder" else if [ -e "$BACKUP/$backup" ]; then @@ -111,7 +110,7 @@ if [ -e "$BACKUP/$backup" ]; then fi # Cleaning restore queue -sed -i "/v-download-backup $user /d" $HESTIA/data/queue/backup.pipe +sed -i "/v-download-backup $user /d" $TULIO/data/queue/backup.pipe # Logging $BIN/v-log-action "system" "Info" "Backup" "Backup download requested (User: $user, Archive: $backup)." diff --git a/bin/v-dump-database b/bin/v-dump-database index 2234f1d6a..d5baf7858 100755 --- a/bin/v-dump-database +++ b/bin/v-dump-database @@ -23,13 +23,12 @@ compression=$4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/db.sh -source $HESTIA/func/db.sh +source $TULIO/func/db.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" check_args '2' "$#" 'USER DATABASE [OUTPUT] [COMPRESSION]' is_format_valid 'user' 'database' @@ -48,7 +47,7 @@ check_tulio_demo_mode timestamp=$(date +'%G-%m-%d_%H-%M-%S') # Check db existence -db_data=$(grep "DB='$database'" $HESTIA/data/users/$user/db.conf) +db_data=$(grep "DB='$database'" $TULIO/data/users/$user/db.conf) if [ -z "$db_data" ]; then echo "Error: database $database doesn't exist" log_event "$E_NOTEXIST" "$ARGUMENTS" diff --git a/bin/v-dump-site b/bin/v-dump-site index 33afdc469..f570abfb5 100755 --- a/bin/v-dump-site +++ b/bin/v-dump-site @@ -20,11 +20,10 @@ type=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" check_args '2' "$#" 'USER DOMAIN' is_format_valid 'user' 'domain' diff --git a/bin/v-export-rrd b/bin/v-export-rrd index f6a6387a7..5b26564de 100755 --- a/bin/v-export-rrd +++ b/bin/v-export-rrd @@ -15,11 +15,10 @@ timespan=${2-daily} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-extract-fs-archive b/bin/v-extract-fs-archive index d46baa05e..e1f97e3dc 100755 --- a/bin/v-extract-fs-archive +++ b/bin/v-extract-fs-archive @@ -17,11 +17,10 @@ test=$6 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-generate-api-key b/bin/v-generate-api-key index e8d8a0f50..1f85a7608 100755 --- a/bin/v-generate-api-key +++ b/bin/v-generate-api-key @@ -4,7 +4,7 @@ # # example: v-generate-api-key # -# This function creates a key file in $HESTIA/data/keys/ +# This function creates a key file in $TULIO/data/keys/ #----------------------------------------------------------# # Variables & Functions # @@ -14,11 +14,10 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" keygen() { tr < /dev/urandom -dc _A-Z-a-z-0-9 | head -c 32 @@ -33,19 +32,19 @@ check_tulio_demo_mode # Action # #----------------------------------------------------------# -if [ ! -d "$HESTIA/data/keys/" ]; then - mkdir -p $HESTIA/data/keys/ - chown tulioweb:root $HESTIA/data/keys/ - chmod 750 $HESTIA/data/keys/ +if [ ! -d "$TULIO/data/keys/" ]; then + mkdir -p $TULIO/data/keys/ + chown tulioweb:root $TULIO/data/keys/ + chmod 750 $TULIO/data/keys/ fi -if [[ -e "$HESTIA/data/keys/$HASH" ]]; then - while [[ -e "$HESTIA/data/keys/$HASH" ]]; do +if [[ -e "$TULIO/data/keys/$HASH" ]]; then + while [[ -e "$TULIO/data/keys/$HASH" ]]; do HASH=$(keygen) done fi -touch $HESTIA/data/keys/$HASH +touch $TULIO/data/keys/$HASH echo "$HASH" #----------------------------------------------------------# diff --git a/bin/v-generate-ssl-cert b/bin/v-generate-ssl-cert index ae0108ed7..288ec6cc5 100755 --- a/bin/v-generate-ssl-cert +++ b/bin/v-generate-ssl-cert @@ -29,11 +29,10 @@ DAYS=365 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Json function json_list_ssl() { diff --git a/bin/v-get-dns-domain-value b/bin/v-get-dns-domain-value index 11fd9f311..8ebf66282 100755 --- a/bin/v-get-dns-domain-value +++ b/bin/v-get-dns-domain-value @@ -20,11 +20,10 @@ key=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-get-fs-file-type b/bin/v-get-fs-file-type index 875a9feb8..b484d1e2d 100755 --- a/bin/v-get-fs-file-type +++ b/bin/v-get-fs-file-type @@ -13,11 +13,10 @@ path=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-get-mail-account-value b/bin/v-get-mail-account-value index 5973169f9..a98f302e9 100755 --- a/bin/v-get-mail-account-value +++ b/bin/v-get-mail-account-value @@ -21,11 +21,10 @@ key=$4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-get-mail-domain-value b/bin/v-get-mail-domain-value index c61ec843c..25fb440c0 100755 --- a/bin/v-get-mail-domain-value +++ b/bin/v-get-mail-domain-value @@ -20,11 +20,10 @@ key=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-get-sys-timezone b/bin/v-get-sys-timezone index 1c3afceaf..8d62358b5 100755 --- a/bin/v-get-sys-timezone +++ b/bin/v-get-sys-timezone @@ -15,11 +15,10 @@ format=${1-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Action # diff --git a/bin/v-get-sys-timezones b/bin/v-get-sys-timezones index 54f40b160..3ff278666 100755 --- a/bin/v-get-sys-timezones +++ b/bin/v-get-sys-timezones @@ -17,11 +17,10 @@ format=${1-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Action # diff --git a/bin/v-get-user-salt b/bin/v-get-user-salt index bf4babb30..f9adfe364 100755 --- a/bin/v-get-user-salt +++ b/bin/v-get-user-salt @@ -19,13 +19,12 @@ format=${3-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio.conf/tulio.conf -source $HESTIA/conf/tulio.conf +source $TULIO/conf/tulio.conf # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" time_n_date=$(date +'%T %F') time=$(echo "$time_n_date" | cut -f 1 -d \ ) @@ -68,9 +67,9 @@ check_args '1' "$#" 'USER [IP] [FORMAT]' is_format_valid 'user' 'ip46' # Checking user -if [ ! -d "$HESTIA/data/users/$user" ]; then +if [ ! -d "$TULIO/data/users/$user" ]; then echo "Error: password missmatch" - echo "$date $time $user $ip46 failed to login" >> $HESTIA/log/auth.log + echo "$date $time $user $ip46 failed to login" >> $TULIO/log/auth.log exit 9 fi @@ -93,12 +92,12 @@ if echo "$shadow" | grep -qE '^\$[0-9a-z]+\$[^\$]+\$'; then method='sha-512' else echo "Error: password missmatch" - echo "$date $time $user $ip46 failed to login" >> $HESTIA/log/auth.log + echo "$date $time $user $ip46 failed to login" >> $TULIO/log/auth.log exit 9 fi elif [[ "$shadow" =~ ! ]]; then echo "Error: Account has been suspended" - echo "$date $time $user $ip46 has been suspended" >> $HESTIA/log/auth.log + echo "$date $time $user $ip46 has been suspended" >> $TULIO/log/auth.log exit 5 else salt=${shadow:0:2} @@ -107,7 +106,7 @@ fi if [ -z "$salt" ]; then echo "Error: password missmatch" - echo "$date $time $user $ip46 failed to login" >> $HESTIA/log/auth.log + echo "$date $time $user $ip46 failed to login" >> $TULIO/log/auth.log exit 9 fi diff --git a/bin/v-get-user-value b/bin/v-get-user-value index b125236b3..63b9bfafe 100755 --- a/bin/v-get-user-value +++ b/bin/v-get-user-value @@ -18,11 +18,10 @@ key=$(echo "$2" | tr '[:lower:]' '[:upper:]') # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-import-cpanel b/bin/v-import-cpanel index 6f790dc38..0dd88ecba 100755 --- a/bin/v-import-cpanel +++ b/bin/v-import-cpanel @@ -13,13 +13,12 @@ # - It doesn't update DKIM # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" if [ $# -lt 1 ]; then echo "usage: bash $0 cpanel-backup.tar.gz" @@ -90,7 +89,7 @@ main_domain1=$(grep main_domain userdata/main | cut -d " " -f2) new_user=$(grep "^user:" userdata/${main_domain1} | cut -d " " -f2) echo "Get User: $new_user" check_sysuser=$(cut -f 1 -d : /etc/passwd | grep "^$new_user$") -if [ -n "$check_sysuser" ] || [ -e "$HESTIA/data/users/$new_user" ]; then +if [ -n "$check_sysuser" ] || [ -e "$TULIO/data/users/$new_user" ]; then check_result "$E_EXISTS" "user $new_user exists" echo "User allready exists" exit 2 @@ -248,21 +247,21 @@ PHP_VERSION_LINE=$(grep -r "phpversion:" userdata/$main_domain1) CPANEL_PHP_VERSION=${PHP_VERSION_LINE#*: } if [ -n "$CPANEL_PHP_VERSION" ]; then CPANEL_PHP_VERSION=$(echo $CPANEL_PHP_VERSION | grep -oP '(?<=php)\d+') - HESTIA_PHP_VERSION="PHP-${CPANEL_PHP_VERSION:0:1}_${CPANEL_PHP_VERSION:1}" + TULIO_PHP_VERSION="PHP-${CPANEL_PHP_VERSION:0:1}_${CPANEL_PHP_VERSION:1}" - if $BIN/v-list-web-templates-backend | grep -qw "$HESTIA_PHP_VERSION"; then - echo "Setting PHP version to $HESTIA_PHP_VERSION for $main_domain1 under user $new_user" - $BIN/v-change-web-domain-backend-tpl $new_user $main_domain1 $HESTIA_PHP_VERSION + if $BIN/v-list-web-templates-backend | grep -qw "$TULIO_PHP_VERSION"; then + echo "Setting PHP version to $TULIO_PHP_VERSION for $main_domain1 under user $new_user" + $BIN/v-change-web-domain-backend-tpl $new_user $main_domain1 $TULIO_PHP_VERSION if [ $? -ne 0 ]; then tput setaf 1 echo "ERROR!! Failed to set same PHP version for $main_domain1 setting default, please check this to avoid errors." tput sgr0 else - echo "PHP version for $main_domain1 set to $HESTIA_PHP_VERSION" + echo "PHP version for $main_domain1 set to $TULIO_PHP_VERSION" fi else tput setaf 1 - echo "PHP version $HESTIA_PHP_VERSION is not installed on TulioCP." + echo "PHP version $TULIO_PHP_VERSION is not installed on TulioCP." echo "Please install and set it to avoid errors in website." echo "The restoration will continue but the website may not work as expected" tput sgr0 @@ -396,7 +395,7 @@ if [ "$mx" = 'yes' ]; then cd $main_dir/dnszones for domain in $($BIN/v-list-mail-domains $new_user plain | awk '{ print $1 }'); do echo "Replace MX record for $domain" - mx_id=$(grep MX $HESTIA/data/users/${new_user}/dns/${domain}.conf | tr "'" " " | cut -d " " -f 2) + mx_id=$(grep MX $TULIO/data/users/${new_user}/dns/${domain}.conf | tr "'" " " | cut -d " " -f 2) $BIN/v-delete-dns-record $new_user $domain $mx_id grep MX ${domain}.db | awk '{for(sk=NF;sk>=1;sk--) printf "%s ", $sk;print ""}' | while read value pri ns rest; do if [ "$ns" = "MX" ]; then diff --git a/bin/v-import-database b/bin/v-import-database index 66d924138..6dd094ff7 100755 --- a/bin/v-import-database +++ b/bin/v-import-database @@ -19,15 +19,14 @@ dump=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/db.sh -source $HESTIA/func/db.sh +source $TULIO/func/db.sh # shellcheck source=/usr/local/tulio/func/rebuild.sh -source $HESTIA/func/rebuild.sh +source $TULIO/func/rebuild.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -47,7 +46,7 @@ if [ ! -f "$dump" ]; then fi # Check db existence -db_data=$(grep "DB='$database'" $HESTIA/data/users/$user/db.conf) +db_data=$(grep "DB='$database'" $TULIO/data/users/$user/db.conf) parse_object_kv_list "$db_data" #Fix issue #1084 with "Upper case not allowed with PGSQL" diff --git a/bin/v-import-directadmin b/bin/v-import-directadmin index ea2174e1b..46366827b 100755 --- a/bin/v-import-directadmin +++ b/bin/v-import-directadmin @@ -13,13 +13,12 @@ # This script restore backups from DA to Tuliocp # shellcheck source=/usr/local/tulio/func/main.sh -source "$HESTIA"/func/main.sh +source "$TULIO"/func/main.sh # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" if [ ! -e /usr/bin/rsync ] || [ ! -e /usr/bin/file ]; then echo "#######################################" @@ -153,7 +152,7 @@ if [ -z "$directadmin_usermail" ]; then fi check_sysuser=$(cut -f 1 -d : /etc/passwd | grep "^$directadmin_user$") -if [ -n "$check_sysuser" ] || [ -e "$HESTIA/data/users/$directadmin_user" ]; then +if [ -n "$check_sysuser" ] || [ -e "$TULIO/data/users/$directadmin_user" ]; then delete_tmp check_result "$E_EXISTS" "user $directadmin_user exists" fi @@ -317,7 +316,7 @@ function da_restore_imap_pass() { #DirectAdmin passw is SHA512-CRYPT da_orig_pass=$(grep -w "$1" backup/"$2"/email/passwd | tr ':' ' ' | cut -d " " -f2) echo "${da_orig_pass}" - USER_DATA=$HESTIA/data/users/${3}/ + USER_DATA=$TULIO/data/users/${3}/ update_object_value "mail/${2}" 'ACCOUNT' "${1}" '$MD5' "{SHA512-CRYPT}$da_orig_pass" echo "Password for $1@$2 restored" } diff --git a/bin/v-insert-dns-domain b/bin/v-insert-dns-domain index 050baf880..8734302ff 100755 --- a/bin/v-insert-dns-domain +++ b/bin/v-insert-dns-domain @@ -17,14 +17,13 @@ flush=$4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-insert-dns-record b/bin/v-insert-dns-record index fa52623a5..332b07f44 100755 --- a/bin/v-insert-dns-record +++ b/bin/v-insert-dns-record @@ -17,11 +17,10 @@ data=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-insert-dns-records b/bin/v-insert-dns-records index a2f03f9f0..90624ecd1 100755 --- a/bin/v-insert-dns-records +++ b/bin/v-insert-dns-records @@ -17,11 +17,10 @@ data_file=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-list-access-key b/bin/v-list-access-key index 401610f8a..eaf923757 100755 --- a/bin/v-list-access-key +++ b/bin/v-list-access-key @@ -16,11 +16,10 @@ format="${2:-shell}" # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { @@ -74,7 +73,7 @@ COMMENT="" DATE="" TIME="" -source_conf "${HESTIA}/data/access-keys/${access_key_id}" +source_conf "${TULIO}/data/access-keys/${access_key_id}" # Listing data case $format in diff --git a/bin/v-list-access-keys b/bin/v-list-access-keys index 5e5596ee3..ac9be2cbf 100755 --- a/bin/v-list-access-keys +++ b/bin/v-list-access-keys @@ -12,11 +12,10 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Argument definition user="$1" @@ -27,11 +26,11 @@ json_list() { echo -n '{' local quote='' local PERMISSIONS_ARR ACCESS_KEY_ID - for key_file in $HESTIA/data/access-keys/*; do + for key_file in $TULIO/data/access-keys/*; do key_file="$(basename -- "$key_file")" if [[ "$key_file" =~ ^[[:alnum:]]{20}$ ]]; then USER="$ROOT_USER" SECRET_ACCESS_KEY="" PERMISSIONS="" DATE="" TIME="" COMMENT="" - source_conf "$HESTIA/data/access-keys/$key_file" + source_conf "$TULIO/data/access-keys/$key_file" if [ "$user" = "$USER" ] || [ -z "$user" ]; then PERMISSIONS_ARR='[]' if [[ -n "$PERMISSIONS" ]]; then @@ -63,11 +62,11 @@ shell_list() { list="ID\tUSER\tPERMISSIONS\tCOMMENT\tTIME\tDATE\n" list+="--\t------\t----\t-----------\t-------\t----\t----\n" - for key_file in $HESTIA/data/access-keys/*; do + for key_file in $TULIO/data/access-keys/*; do key_file="$(basename -- "$key_file")" if [[ "$key_file" =~ ^[[:alnum:]]{20}$ ]]; then USER="$ROOT_USER" SECRET_ACCESS_KEY="" PERMISSIONS="" DATE="" TIME="" COMMENT="" - source_conf "$HESTIA/data/access-keys/$key_file" + source_conf "$TULIO/data/access-keys/$key_file" if [ "$user" = "$USER" ] || [ -z "$user" ]; then ACCESS_KEY_ID="$(basename "$key_file")" list+="${ACCESS_KEY_ID}\t${USER}\t${PERMISSIONS:--}\t${COMMENT:--}\t${TIME}\t${DATE}\n" diff --git a/bin/v-list-api b/bin/v-list-api index d39d48202..39efd18c5 100755 --- a/bin/v-list-api +++ b/bin/v-list-api @@ -16,11 +16,10 @@ format="${2:-shell}" # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { @@ -49,7 +48,7 @@ shell_list() { check_args '1' "$#" 'API [FORMAT]' -if [[ -z "$api" || ! -f "$HESTIA/data/api/${api}" ]]; then +if [[ -z "$api" || ! -f "$TULIO/data/api/${api}" ]]; then check_result "$E_INVALID" "API $api doesn't exist" fi @@ -57,7 +56,7 @@ fi # Action # #----------------------------------------------------------# -source_conf "${HESTIA}/data/api/${api}" +source_conf "${TULIO}/data/api/${api}" # Listing data case $format in diff --git a/bin/v-list-apis b/bin/v-list-apis index 2ffefa46a..76268d75d 100755 --- a/bin/v-list-apis +++ b/bin/v-list-apis @@ -15,19 +15,18 @@ format="${1:-shell}" # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { echo '{' local quote COMMANDS_ARR - for api in $HESTIA/data/api/*; do + for api in $TULIO/data/api/*; do api="$(basename -- "$api")" - source_conf $HESTIA/data/api/$api + source_conf $TULIO/data/api/$api COMMANDS_ARR='[]' if [[ -n "$COMMANDS" ]]; then @@ -46,9 +45,9 @@ shell_list() { list="API\tROLE\tCOMMANDS\n" list+="---\t----\t--------\n" - for api in $HESTIA/data/api/*; do + for api in $TULIO/data/api/*; do api="$(basename -- "$api")" - source_conf $HESTIA/data/api/$api + source_conf $TULIO/data/api/$api list+="${api}\t${ROLE}\t${COMMANDS}\n" done echo -e "$list" | column -t -s " " diff --git a/bin/v-list-backup-host b/bin/v-list-backup-host index 3cd62cdb9..12d088c89 100755 --- a/bin/v-list-backup-host +++ b/bin/v-list-backup-host @@ -18,11 +18,10 @@ format=${2-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { @@ -122,12 +121,12 @@ is_common_format_valid $type "type" #----------------------------------------------------------# # Checking backup config -if [ ! -e "$HESTIA/conf/$type.backup.conf" ]; then +if [ ! -e "$TULIO/conf/$type.backup.conf" ]; then exit fi # Parsing backup config -source_conf "$HESTIA/conf/$type.backup.conf" +source_conf "$TULIO/conf/$type.backup.conf" # Listing data case $format in diff --git a/bin/v-list-backup-host-restic b/bin/v-list-backup-host-restic index e937575e0..9f6c246b4 100755 --- a/bin/v-list-backup-host-restic +++ b/bin/v-list-backup-host-restic @@ -17,11 +17,10 @@ format=${1-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { @@ -61,12 +60,12 @@ plain_list() { #----------------------------------------------------------# # Checking backup config -if [ ! -e "$HESTIA/conf/restic.conf" ]; then +if [ ! -e "$TULIO/conf/restic.conf" ]; then exit fi # Parsing backup config -source_conf "$HESTIA/conf/restic.conf" +source_conf "$TULIO/conf/restic.conf" # Listing data case $format in diff --git a/bin/v-list-cron-job b/bin/v-list-cron-job index d496325c4..b55a8a1eb 100755 --- a/bin/v-list-cron-job +++ b/bin/v-list-cron-job @@ -19,11 +19,10 @@ format=${3-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-cron-jobs b/bin/v-list-cron-jobs index 473585529..8da5560c0 100755 --- a/bin/v-list-cron-jobs +++ b/bin/v-list-cron-jobs @@ -18,11 +18,10 @@ format=${2-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-database b/bin/v-list-database index 7f73e9ada..aac06fbb5 100755 --- a/bin/v-list-database +++ b/bin/v-list-database @@ -19,11 +19,10 @@ format=${3-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-database-host b/bin/v-list-database-host index b8e3656d7..f7e582013 100755 --- a/bin/v-list-database-host +++ b/bin/v-list-database-host @@ -19,13 +19,12 @@ format=${3-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/db.sh -source $HESTIA/func/db.sh +source $TULIO/func/db.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { @@ -100,7 +99,7 @@ database_set_default_ports #----------------------------------------------------------# # Parsing hosts -parse_object_kv_list $(grep "HOST='$host'" $HESTIA/conf/$type.conf) +parse_object_kv_list $(grep "HOST='$host'" $TULIO/conf/$type.conf) # Listing data case $format in diff --git a/bin/v-list-database-hosts b/bin/v-list-database-hosts index 3cc390a36..290fdfa36 100755 --- a/bin/v-list-database-hosts +++ b/bin/v-list-database-hosts @@ -17,13 +17,12 @@ format=${1-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/db.sh -source $HESTIA/func/db.sh +source $TULIO/func/db.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { @@ -31,18 +30,18 @@ json_list() { i=1 objects=0 for type in $(echo $DB_SYSTEM | sed -e 's/,/\n/'); do - if [ -e "$HESTIA/conf/$type.conf" ]; then + if [ -e "$TULIO/conf/$type.conf" ]; then # Set default port values if they don't exist in database configuration file. database_set_default_ports - db_hosts=$(grep HOST $HESTIA/conf/$type.conf | wc -l) + db_hosts=$(grep HOST $TULIO/conf/$type.conf | wc -l) objects=$((objects + db_hosts)) fi done echo "[" for type in $(echo $DB_SYSTEM | sed -e 's/,/\n/'); do - if [ -e "$HESTIA/conf/$type.conf" ]; then - for str in $(cat $HESTIA/conf/$type.conf); do + if [ -e "$TULIO/conf/$type.conf" ]; then + for str in $(cat $TULIO/conf/$type.conf); do parse_object_kv_list "$str" echo -n ' { "HOST": "'$HOST'", @@ -75,10 +74,10 @@ shell_list() { echo "HOST PORT TYPE MAX_DB DB_USED SPND TIME DATE" echo "---- ---- ---- ------ ------- ---- ---- ----" for type in $(echo $DB_SYSTEM | sed -e 's/,/\n/'); do - if [ -e "$HESTIA/conf/$type.conf" ]; then + if [ -e "$TULIO/conf/$type.conf" ]; then # Set default port values if they don't exist in database configuration file. database_set_default_ports - for str in $(cat $HESTIA/conf/$type.conf); do + for str in $(cat $TULIO/conf/$type.conf); do parse_object_kv_list "$str" echo "$HOST $PORT $type $MAX_DB $U_DB_BASES $SUSPENDED $TIME $DATE" done @@ -90,10 +89,10 @@ shell_list() { plain_list() { IFS=$'\n' for type in $(echo $DB_SYSTEM | sed -e 's/,/\n/'); do - if [ -e "$HESTIA/conf/$type.conf" ]; then + if [ -e "$TULIO/conf/$type.conf" ]; then # Set default port values if they don't exist in database configuration file. database_set_default_ports - for str in $(cat $HESTIA/conf/$type.conf); do + for str in $(cat $TULIO/conf/$type.conf); do parse_object_kv_list "$str" echo -ne "$HOST\t$PORT\t$type\t$CHARSETS\t$MAX_DB\t$U_SYS_USERS\t" echo -e "$U_DB_BASES\t$TPL\t$SUSPENDED\t$TIME\t$DATE" @@ -108,10 +107,10 @@ csv_list() { echo -n "HOST,PORT,TYPE,CHARSETS,MAX_DB,U_SYS_USERS," echo "U_DB_BASES,TPL,SUSPENDED,TIME,DATE" for type in $(echo $DB_SYSTEM | sed -e 's/,/\n/'); do - if [ -e "$HESTIA/conf/$type.conf" ]; then + if [ -e "$TULIO/conf/$type.conf" ]; then # Set default port values if they don't exist in database configuration file. database_set_default_ports - for str in $(cat $HESTIA/conf/$type.conf); do + for str in $(cat $TULIO/conf/$type.conf); do parse_object_kv_list "$str" echo -n "$HOST,$PORT,$type,\"$CHARSETS\",$MAX_DB,\"$U_SYS_USERS\"," echo "$U_DB_BASES,$TPL,$SUSPENDED,$TIME,$DATE" diff --git a/bin/v-list-database-types b/bin/v-list-database-types index c02fd0efc..194b04258 100755 --- a/bin/v-list-database-types +++ b/bin/v-list-database-types @@ -17,11 +17,10 @@ format=${1-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-databases b/bin/v-list-databases index de6b90768..4269302a4 100755 --- a/bin/v-list-databases +++ b/bin/v-list-databases @@ -18,11 +18,10 @@ format=${2-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-default-php b/bin/v-list-default-php index 4208622ef..27f515f77 100755 --- a/bin/v-list-default-php +++ b/bin/v-list-default-php @@ -17,11 +17,10 @@ format=${1-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-dns-domain b/bin/v-list-dns-domain index 5639e988a..d1535a46b 100755 --- a/bin/v-list-dns-domain +++ b/bin/v-list-dns-domain @@ -19,11 +19,10 @@ format=${3-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-dns-domains b/bin/v-list-dns-domains index 5dadc44fe..508661092 100755 --- a/bin/v-list-dns-domains +++ b/bin/v-list-dns-domains @@ -18,11 +18,10 @@ format=${2-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-dns-records b/bin/v-list-dns-records index 980844244..579cf412a 100755 --- a/bin/v-list-dns-records +++ b/bin/v-list-dns-records @@ -19,11 +19,10 @@ format=${3-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-dns-template b/bin/v-list-dns-template index 9e9c617e8..44efbf27d 100755 --- a/bin/v-list-dns-template +++ b/bin/v-list-dns-template @@ -18,13 +18,12 @@ format=${2-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-dns-templates b/bin/v-list-dns-templates index 7be43259b..44f6296c0 100755 --- a/bin/v-list-dns-templates +++ b/bin/v-list-dns-templates @@ -17,11 +17,10 @@ format=${1-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-dnssec-public-key b/bin/v-list-dnssec-public-key index 1b1e03c34..d2f521f7e 100755 --- a/bin/v-list-dnssec-public-key +++ b/bin/v-list-dnssec-public-key @@ -20,13 +20,12 @@ dnstype=$4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-list-firewall b/bin/v-list-firewall index fb3e1e4bb..f9959f00e 100755 --- a/bin/v-list-firewall +++ b/bin/v-list-firewall @@ -17,17 +17,16 @@ format=${1-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { IFS=$'\n' i=1 - objects=$(grep RULE $HESTIA/data/firewall/rules.conf | wc -l) + objects=$(grep RULE $TULIO/data/firewall/rules.conf | wc -l) echo "{" while read str; do [[ -z "$str" ]] && continue @@ -48,7 +47,7 @@ json_list() { echo fi ((i++)) - done < <(cat $HESTIA/data/firewall/rules.conf) + done < <(cat $TULIO/data/firewall/rules.conf) echo '}' } @@ -61,7 +60,7 @@ shell_list() { [[ -z "$str" ]] && continue parse_object_kv_list "$str" echo "$RULE^$ACTION^$PROTOCOL^$PORT^$IP^$SUSPENDED^$DATE" - done < <(cat $HESTIA/data/firewall/rules.conf) + done < <(cat $TULIO/data/firewall/rules.conf) } # PLAIN list function @@ -72,7 +71,7 @@ plain_list() { parse_object_kv_list "$str" echo -ne "$RULE\t$ACTION\t$PROTOCOL\t$PORT\t$IP\t$COMMENT\t" echo -e "$SUSPENDED\t$TIME\t$DATE" - done < <(cat $HESTIA/data/firewall/rules.conf) + done < <(cat $TULIO/data/firewall/rules.conf) } # CSV list function @@ -84,7 +83,7 @@ csv_list() { parse_object_kv_list "$str" echo -n "$RULE,$ACTION,$PROTOCOL,$PORT,$IP,\"$COMMENT\"," echo "$SUSPENDED,$TIME,$DATE" - done < <(cat $HESTIA/data/firewall/rules.conf) + done < <(cat $TULIO/data/firewall/rules.conf) } #----------------------------------------------------------# diff --git a/bin/v-list-firewall-ban b/bin/v-list-firewall-ban index c9d53faa3..febefecc9 100755 --- a/bin/v-list-firewall-ban +++ b/bin/v-list-firewall-ban @@ -17,17 +17,16 @@ format=${1-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { IFS=$'\n' i=1 - objects=$(grep IP $HESTIA/data/firewall/banlist.conf | wc -l) + objects=$(grep IP $TULIO/data/firewall/banlist.conf | wc -l) echo "{" while read str; do parse_object_kv_list "$str" @@ -43,7 +42,7 @@ json_list() { echo fi ((i++)) - done < <(cat $HESTIA/data/firewall/banlist.conf) + done < <(cat $TULIO/data/firewall/banlist.conf) echo '}' } @@ -55,7 +54,7 @@ shell_list() { while read str; do parse_object_kv_list "$str" echo "$IP $CHAIN $TIME $DATE" - done < <(cat $HESTIA/data/firewall/banlist.conf) + done < <(cat $TULIO/data/firewall/banlist.conf) } # PLAIN list function @@ -64,7 +63,7 @@ plain_list() { while read str; do parse_object_kv_list "$str" echo -e "$IP\t$CHAIN\t$TIME\t$DATE" - done < <(cat $HESTIA/data/firewall/banlist.conf) + done < <(cat $TULIO/data/firewall/banlist.conf) } # CSV list function @@ -74,7 +73,7 @@ csv_list() { while read str; do parse_object_kv_list "$str" echo "$IP,$CHAIN,$TIME,$DATE" - done < <(cat $HESTIA/data/firewall/banlist.conf) + done < <(cat $TULIO/data/firewall/banlist.conf) } #----------------------------------------------------------# diff --git a/bin/v-list-firewall-ipset b/bin/v-list-firewall-ipset index 15571915a..31ccb2aac 100755 --- a/bin/v-list-firewall-ipset +++ b/bin/v-list-firewall-ipset @@ -17,13 +17,12 @@ format=${1-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio.conf/tulio.conf -source $HESTIA/conf/tulio.conf +source $TULIO/conf/tulio.conf # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -39,7 +38,7 @@ is_system_enabled "$FIREWALL_SYSTEM" 'FIREWALL_SYSTEM' json_list() { IFS=$'\n' i=1 - objects=$(grep LISTNAME $HESTIA/data/firewall/ipset.conf | wc -l) + objects=$(grep LISTNAME $TULIO/data/firewall/ipset.conf | wc -l) echo "{" while read str; do [[ -z "$str" ]] && continue @@ -54,7 +53,7 @@ json_list() { }' [[ "$i" -lt "$objects" ]] && echo ',' || echo ((i++)) - done < <(cat $HESTIA/data/firewall/ipset.conf) + done < <(cat $TULIO/data/firewall/ipset.conf) echo '}' } @@ -67,7 +66,7 @@ shell_list() { [[ -z "$str" ]] && continue parse_object_kv_list "$str" echo "$LISTNAME^$IP_VERSION^$AUTOUPDATE^$SUSPENDED^$SOURCE^$TIME^$DATE" - done < <(cat $HESTIA/data/firewall/ipset.conf) + done < <(cat $TULIO/data/firewall/ipset.conf) } # PLAIN list function @@ -78,7 +77,7 @@ plain_list() { parse_object_kv_list "$str" echo -ne "$LISTNAME\t$IP_VERSION\t$AUTOUPDATE\t$SUSPENDED\t$SOURCE\t" echo -e "$TIME\t$DATE" - done < <(cat $HESTIA/data/firewall/ipset.conf) + done < <(cat $TULIO/data/firewall/ipset.conf) } # CSV list function @@ -90,10 +89,10 @@ csv_list() { parse_object_kv_list "$str" echo -n "$LISTNAME,$IP_VERSION,$AUTOUPDATE,$SUSPENDED,\"$SOURCE\"," echo "$TIME,$DATE" - done < <(cat $HESTIA/data/firewall/ipset.conf) + done < <(cat $TULIO/data/firewall/ipset.conf) } -[ ! -f "$HESTIA/data/firewall/ipset.conf" ] && touch "$HESTIA/data/firewall/ipset.conf" +[ ! -f "$TULIO/data/firewall/ipset.conf" ] && touch "$TULIO/data/firewall/ipset.conf" # Listing data case $format in diff --git a/bin/v-list-firewall-rule b/bin/v-list-firewall-rule index cd95c117f..026331f75 100755 --- a/bin/v-list-firewall-rule +++ b/bin/v-list-firewall-rule @@ -18,11 +18,10 @@ format=${2-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" json_list() { echo '{' @@ -76,7 +75,7 @@ is_object_valid '../../../data/firewall/rules' 'RULE' "$rule" #----------------------------------------------------------# # Parsing rules -parse_object_kv_list $(grep "RULE='$rule'" $HESTIA/data/firewall/rules.conf) +parse_object_kv_list $(grep "RULE='$rule'" $TULIO/data/firewall/rules.conf) # Listing data case $format in diff --git a/bin/v-list-fs-directory b/bin/v-list-fs-directory index 87802efa2..9d4078319 100755 --- a/bin/v-list-fs-directory +++ b/bin/v-list-fs-directory @@ -13,11 +13,10 @@ path=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-list-letsencrypt-user b/bin/v-list-letsencrypt-user index ffb4fb55c..139cb6347 100755 --- a/bin/v-list-letsencrypt-user +++ b/bin/v-list-letsencrypt-user @@ -18,11 +18,10 @@ format=${2-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-mail-account b/bin/v-list-mail-account index 8b1659d53..480f20b00 100755 --- a/bin/v-list-mail-account +++ b/bin/v-list-mail-account @@ -20,11 +20,10 @@ format=${4-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-mail-account-autoreply b/bin/v-list-mail-account-autoreply index 2b115ff89..60a6ea3bb 100755 --- a/bin/v-list-mail-account-autoreply +++ b/bin/v-list-mail-account-autoreply @@ -20,11 +20,10 @@ format=${4-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-mail-accounts b/bin/v-list-mail-accounts index 217c01449..269c46ac0 100755 --- a/bin/v-list-mail-accounts +++ b/bin/v-list-mail-accounts @@ -19,11 +19,10 @@ format=${3-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-mail-domain b/bin/v-list-mail-domain index a41986424..f62f99296 100755 --- a/bin/v-list-mail-domain +++ b/bin/v-list-mail-domain @@ -19,11 +19,10 @@ format=${3-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-mail-domain-dkim b/bin/v-list-mail-domain-dkim index a0a7f4e02..4f2eb98e7 100755 --- a/bin/v-list-mail-domain-dkim +++ b/bin/v-list-mail-domain-dkim @@ -19,11 +19,10 @@ format=${3-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-mail-domain-dkim-dns b/bin/v-list-mail-domain-dkim-dns index 53408594f..dbe111139 100755 --- a/bin/v-list-mail-domain-dkim-dns +++ b/bin/v-list-mail-domain-dkim-dns @@ -19,11 +19,10 @@ format=${3-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-mail-domain-ssl b/bin/v-list-mail-domain-ssl index 47fc6afea..62d1869a1 100755 --- a/bin/v-list-mail-domain-ssl +++ b/bin/v-list-mail-domain-ssl @@ -19,11 +19,10 @@ format=${3-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-list-mail-domains b/bin/v-list-mail-domains index 29fd73d0c..d69ea27cb 100755 --- a/bin/v-list-mail-domains +++ b/bin/v-list-mail-domains @@ -18,11 +18,10 @@ format=${2-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-remote-dns-hosts b/bin/v-list-remote-dns-hosts index 272cec455..ce373cc9f 100755 --- a/bin/v-list-remote-dns-hosts +++ b/bin/v-list-remote-dns-hosts @@ -17,17 +17,16 @@ format=${1-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { IFS=$'\n' i=1 - objects=$(grep HOST $HESTIA/conf/dns-cluster.conf | wc -l) + objects=$(grep HOST $TULIO/conf/dns-cluster.conf | wc -l) echo "{" while read str; do parse_object_kv_list "$str" @@ -46,7 +45,7 @@ json_list() { echo fi ((i++)) - done < <(cat $HESTIA/conf/dns-cluster.conf) + done < <(cat $TULIO/conf/dns-cluster.conf) echo '}' } @@ -58,7 +57,7 @@ shell_list() { while read str; do parse_object_kv_list "$str" echo "$HOST $PORT $TYPE $USER $DNS_USER $SUSPENDED $DATE" - done < <(cat $HESTIA/conf/dns-cluster.conf) + done < <(cat $TULIO/conf/dns-cluster.conf) } # PLAIN list function @@ -68,7 +67,7 @@ plain_list() { parse_object_kv_list "$str" echo -ne "$HOST\t$PORT\t$TYPE\t$USER\t$DNS_USER\t" echo -e "$SUSPENDED\t$TIME\t$DATE" - done < <(cat $HESTIA/conf/dns-cluster.conf) + done < <(cat $TULIO/conf/dns-cluster.conf) } # CSV list function @@ -78,14 +77,14 @@ csv_list() { while read str; do parse_object_kv_list "$str" echo "$HOST,$PORT,$TYPE,$USER,$DNS_USER,$SUSPENDED,$TIME,$DATE" - done < <(cat $HESTIA/conf/dns-cluster.conf) + done < <(cat $TULIO/conf/dns-cluster.conf) } #----------------------------------------------------------# # Verifications # #----------------------------------------------------------# -if [ ! -e "$HESTIA/conf/dns-cluster.conf" ]; then +if [ ! -e "$TULIO/conf/dns-cluster.conf" ]; then exit fi diff --git a/bin/v-list-sys-clamd-config b/bin/v-list-sys-clamd-config index 3a4e1609f..ffd0202b4 100755 --- a/bin/v-list-sys-clamd-config +++ b/bin/v-list-sys-clamd-config @@ -17,11 +17,10 @@ format=${1-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-sys-config b/bin/v-list-sys-config index 17b32e32e..b764bb1f0 100755 --- a/bin/v-list-sys-config +++ b/bin/v-list-sys-config @@ -17,13 +17,12 @@ format=${1-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio.conf/tulio.conf -source $HESTIA/conf/tulio.conf +source $TULIO/conf/tulio.conf # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-sys-db-status b/bin/v-list-sys-db-status index 0ded8acb9..de2e7a17b 100755 --- a/bin/v-list-sys-db-status +++ b/bin/v-list-sys-db-status @@ -17,11 +17,10 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Action # @@ -38,15 +37,15 @@ for db in $(echo $DB_SYSTEM | tr ',' '\n'); do IFS=$'\n' # Checking database config - if [ -e "$HESTIA/conf/$db.conf" ]; then + if [ -e "$TULIO/conf/$db.conf" ]; then # Checking server status - for host_str in $(cat $HESTIA/conf/$db.conf); do + for host_str in $(cat $TULIO/conf/$db.conf); do parse_object_kv_list "$host_str" # Checking MySQL if [ "$db" = 'mysql' ]; then - mycnf="$HESTIA/conf/.mysql.$HOST" + mycnf="$TULIO/conf/.mysql.$HOST" if [ ! -e "$mycnf" ]; then echo "[client]" > $mycnf echo "host='$HOST'" >> $mycnf diff --git a/bin/v-list-sys-dns-status b/bin/v-list-sys-dns-status index ea8589220..e2597d1c4 100755 --- a/bin/v-list-sys-dns-status +++ b/bin/v-list-sys-dns-status @@ -17,11 +17,10 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Action # diff --git a/bin/v-list-sys-dovecot-config b/bin/v-list-sys-dovecot-config index e25143c88..783ae7d82 100755 --- a/bin/v-list-sys-dovecot-config +++ b/bin/v-list-sys-dovecot-config @@ -17,11 +17,10 @@ format=${1-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-sys-info b/bin/v-list-sys-info index 5b4cd4fd8..1732fe85f 100755 --- a/bin/v-list-sys-info +++ b/bin/v-list-sys-info @@ -17,15 +17,14 @@ format=${1-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Retrieve Tulio Control Panel version number -HESTIA_VERSION=$(grep VERSION $HESTIA/conf/tulio.conf | cut -d '=' -f2 | sed "s|'||g") -HESTIA_RELEASE=$(grep RELEASE_BRANCH $HESTIA/conf/tulio.conf | cut -d '=' -f2 | sed "s|'||g") +TULIO_VERSION=$(grep VERSION $TULIO/conf/tulio.conf | cut -d '=' -f2 | sed "s|'||g") +TULIO_RELEASE=$(grep RELEASE_BRANCH $TULIO/conf/tulio.conf | cut -d '=' -f2 | sed "s|'||g") # JSON list function json_list() { @@ -35,8 +34,8 @@ json_list() { "OS": "'$OS'", "VERSION": "'$VERSION'", "ARCH": "'$ARCH'", - "HESTIA": "'$HESTIA_VERSION'", - "RELEASE": "'$HESTIA_RELEASE'", + "TULIO": "'$TULIO_VERSION'", + "RELEASE": "'$TULIO_RELEASE'", "UPTIME": "'$UPTIME'", "LOADAVERAGE": "'$LOADAVERAGE'" }' @@ -45,20 +44,20 @@ json_list() { # SHELL list function shell_list() { - echo "HOSTNAME OS VER ARCH HESTIA RELEASE UPTIME LA" + echo "HOSTNAME OS VER ARCH TULIO RELEASE UPTIME LA" echo "-------- -- --- ---- ------ ------- ------ --" - echo "$HOSTNAME $OS $VERSION $ARCH $HESTIA_VERSION $HESTIA_RELEASE $UPTIME $LOADAVERAGE" + echo "$HOSTNAME $OS $VERSION $ARCH $TULIO_VERSION $TULIO_RELEASE $UPTIME $LOADAVERAGE" } # PLAIN list function plain_list() { - echo -e "$HOSTNAME\t$OS\t$VERSION\t$ARCH\t$HESTIA_VERSION\t$HESTIA_RELEASE\t$UPTIME\t$LOADAVERAGE" + echo -e "$HOSTNAME\t$OS\t$VERSION\t$ARCH\t$TULIO_VERSION\t$TULIO_RELEASE\t$UPTIME\t$LOADAVERAGE" } # CSV list function csv_list() { - echo "HOSTNAME,OS,VERSION,ARCH,HESTIA,RELEASE,UPTIME,LOADAVERAGE" - echo "$HOSTNAME,$OS,$VERSION,$ARCH,$HESTIA_VERSION,$HESTIA_RELEASE,$UPTIME,$LOADAVERAGE" + echo "HOSTNAME,OS,VERSION,ARCH,TULIO,RELEASE,UPTIME,LOADAVERAGE" + echo "$HOSTNAME,$OS,$VERSION,$ARCH,$TULIO_VERSION,$TULIO_RELEASE,$UPTIME,$LOADAVERAGE" } #----------------------------------------------------------# diff --git a/bin/v-list-sys-interfaces b/bin/v-list-sys-interfaces index b58af441c..6e2c7b548 100755 --- a/bin/v-list-sys-interfaces +++ b/bin/v-list-sys-interfaces @@ -17,11 +17,10 @@ format="${1-shell}" # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-sys-ip b/bin/v-list-sys-ip index 11edd3a1a..1130e6d22 100755 --- a/bin/v-list-sys-ip +++ b/bin/v-list-sys-ip @@ -18,13 +18,12 @@ format="${2-shell}" # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { @@ -79,7 +78,7 @@ csv_list() { check_args '1' "$#" 'IP [FORMAT]' is_format_valid 'ip' -if [ ! -e "$HESTIA/data/ips/$ip" ]; then +if [ ! -e "$TULIO/data/ips/$ip" ]; then check_result $E_NOTEXIST "IP $ip doesn't exist" fi @@ -88,7 +87,7 @@ fi #----------------------------------------------------------# # Parsing IP -source_conf "$HESTIA/data/ips/$ip" +source_conf "$TULIO/data/ips/$ip" # Listing data case $format in diff --git a/bin/v-list-sys-ips b/bin/v-list-sys-ips index 2ecab42e7..2e0aa936a 100755 --- a/bin/v-list-sys-ips +++ b/bin/v-list-sys-ips @@ -17,21 +17,20 @@ format="${1-shell}" # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { echo '{' - ip_count="$(ls $HESTIA/data/ips/ | wc -l)" + ip_count="$(ls $TULIO/data/ips/ | wc -l)" i=1 while read IP; do - source_conf "$HESTIA/data/ips/$IP" + source_conf "$TULIO/data/ips/$IP" echo -n ' "'$IP'": { "OWNER": "'$OWNER'", "STATUS": "'$STATUS'", @@ -50,7 +49,7 @@ json_list() { echo fi ((i++)) - done < <(ls $HESTIA/data/ips/) + done < <(ls $TULIO/data/ips/) echo '}' } @@ -59,21 +58,21 @@ shell_list() { echo "IP MASK NAT STATUS WEB DATE" echo "-- ---- --- ------ --- ----" while read IP; do - source_conf "$HESTIA/data/ips/$IP" + source_conf "$TULIO/data/ips/$IP" if [ -z "$NAT" ]; then NAT='no' fi echo "$IP $NETMASK $NAT $STATUS $U_WEB_DOMAINS $DATE" - done < <(ls $HESTIA/data/ips/) + done < <(ls $TULIO/data/ips/) } # PLAIN list function plain_list() { while read IP; do - source_conf "$HESTIA/data/ips/$IP" + source_conf "$TULIO/data/ips/$IP" echo -ne "$IP\t$OWNER\t$STATUS\t$NAME\t$U_SYS_USERS\t$U_WEB_DOMAINS\t" echo -e "$INTERFACE\t$NETMASK\t$NAT\t$TIME\t$DATE" - done < <(ls $HESTIA/data/ips/) + done < <(ls $TULIO/data/ips/) } # CSV list function @@ -81,10 +80,10 @@ csv_list() { echo -n "IP,OWNER,STATUS,NAME,U_SYS_USERS,U_WEB_DOMAINS,INTERFACE" echo "NETMASK,NAT,TIME,DATE" while read IP; do - source_conf "$HESTIA/data/ips/$IP" + source_conf "$TULIO/data/ips/$IP" echo -n "$IP,$OWNER,$STATUS,$NAME,\"$U_SYS_USERS\",$U_WEB_DOMAINS," echo "$INTERFACE, $NETMASK,$NAT,$TIME,$DATE" - done < <(ls $HESTIA/data/ips/) + done < <(ls $TULIO/data/ips/) } #----------------------------------------------------------# diff --git a/bin/v-list-sys-languages b/bin/v-list-sys-languages index 21ae85b80..026902777 100755 --- a/bin/v-list-sys-languages +++ b/bin/v-list-sys-languages @@ -18,11 +18,10 @@ format=${1-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { @@ -73,7 +72,7 @@ csv_list() { #----------------------------------------------------------# # Defining language list -languages=$(ls -d $HESTIA/web/locale/*/ | awk -F'/' '{print $(NF-1)}') +languages=$(ls -d $TULIO/web/locale/*/ | awk -F'/' '{print $(NF-1)}') # Listing data case $format in diff --git a/bin/v-list-sys-mail-status b/bin/v-list-sys-mail-status index 6d28f73f3..5b2fd7cff 100755 --- a/bin/v-list-sys-mail-status +++ b/bin/v-list-sys-mail-status @@ -17,13 +17,12 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio.conf/tulio.conf -source $HESTIA/conf/tulio.conf +source $TULIO/conf/tulio.conf # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Action # diff --git a/bin/v-list-sys-mysql-config b/bin/v-list-sys-mysql-config index a2c1404cc..6e85f2fc5 100755 --- a/bin/v-list-sys-mysql-config +++ b/bin/v-list-sys-mysql-config @@ -17,11 +17,10 @@ format=${1-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-sys-nginx-config b/bin/v-list-sys-nginx-config index d5cb4fbcb..b97eba3ad 100755 --- a/bin/v-list-sys-nginx-config +++ b/bin/v-list-sys-nginx-config @@ -17,11 +17,10 @@ format=${1-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-sys-pgsql-config b/bin/v-list-sys-pgsql-config index 72aad168f..f84e8c497 100755 --- a/bin/v-list-sys-pgsql-config +++ b/bin/v-list-sys-pgsql-config @@ -17,11 +17,10 @@ format=${1-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-sys-php b/bin/v-list-sys-php index f7a559f38..2681186f3 100755 --- a/bin/v-list-sys-php +++ b/bin/v-list-sys-php @@ -17,11 +17,10 @@ format=${1-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-sys-php-config b/bin/v-list-sys-php-config index c79942e76..375cc7ca4 100755 --- a/bin/v-list-sys-php-config +++ b/bin/v-list-sys-php-config @@ -17,11 +17,10 @@ format=${1-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-sys-proftpd-config b/bin/v-list-sys-proftpd-config index d59b6a90d..5b6ec16a2 100755 --- a/bin/v-list-sys-proftpd-config +++ b/bin/v-list-sys-proftpd-config @@ -17,11 +17,10 @@ format=${1-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-sys-rrd b/bin/v-list-sys-rrd index f001944df..ce26232b6 100755 --- a/bin/v-list-sys-rrd +++ b/bin/v-list-sys-rrd @@ -16,11 +16,10 @@ format=${1-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-sys-services b/bin/v-list-sys-services index 332665465..6dfade881 100755 --- a/bin/v-list-sys-services +++ b/bin/v-list-sys-services @@ -17,11 +17,10 @@ format=${1-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-sys-shells b/bin/v-list-sys-shells index b98c10890..12f9f455f 100755 --- a/bin/v-list-sys-shells +++ b/bin/v-list-sys-shells @@ -17,11 +17,10 @@ format=${1-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-sys-spamd-config b/bin/v-list-sys-spamd-config index 2469ebbb4..45369c26c 100755 --- a/bin/v-list-sys-spamd-config +++ b/bin/v-list-sys-spamd-config @@ -17,11 +17,10 @@ format=${1-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-sys-sshd-port b/bin/v-list-sys-sshd-port index fa39dd0a4..4b6232a2b 100755 --- a/bin/v-list-sys-sshd-port +++ b/bin/v-list-sys-sshd-port @@ -16,8 +16,7 @@ format=${1-shell} # Includes # shellcheck source=/usr/local/tulio/func/main.sh : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" -source "$HESTIA/func/main.sh" +source "$TULIO/func/main.sh" json_list() { sh_counter=$(echo "$ports" | wc -l) diff --git a/bin/v-list-sys-themes b/bin/v-list-sys-themes index 1372d055d..0a60ef843 100755 --- a/bin/v-list-sys-themes +++ b/bin/v-list-sys-themes @@ -18,11 +18,10 @@ format=${1-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Define array for available themes available_themes=() @@ -30,16 +29,16 @@ available_themes=() # Function to process CSS theme files get_themes() { # Retrieve list of system themes - if [ -d "$HESTIA_THEMES" ]; then - for file in "$HESTIA_THEMES"/*.min.css; do + if [ -d "$TULIO_THEMES" ]; then + for file in "$TULIO_THEMES"/*.min.css; do filename=$(basename "$file" .min.css) available_themes+=("${filename%.*}") done fi # Check for existence of custom themes folder and iterate through items - if [ -d "$HESTIA_THEMES_CUSTOM" ] && [ "$(ls -A "$HESTIA_THEMES_CUSTOM")" ]; then - for file in "$HESTIA_THEMES_CUSTOM"/*.css; do + if [ -d "$TULIO_THEMES_CUSTOM" ] && [ "$(ls -A "$TULIO_THEMES_CUSTOM")" ]; then + for file in "$TULIO_THEMES_CUSTOM"/*.css; do filename=$(basename "$file" .css) available_themes+=("${filename%.*}") done diff --git a/bin/v-list-sys-tulio-autoupdate b/bin/v-list-sys-tulio-autoupdate index 564f9b1b2..d94d7d514 100755 --- a/bin/v-list-sys-tulio-autoupdate +++ b/bin/v-list-sys-tulio-autoupdate @@ -17,11 +17,10 @@ format=${1-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-sys-tulio-ssl b/bin/v-list-sys-tulio-ssl index c1bf0e30c..ce41ccf08 100755 --- a/bin/v-list-sys-tulio-ssl +++ b/bin/v-list-sys-tulio-ssl @@ -17,16 +17,15 @@ format=${1-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { echo '{' - echo -e "\t\"HESTIA\": {" + echo -e "\t\"TULIO\": {" echo " \"CRT\": \"$crt\"," echo " \"KEY\": \"$key\"," echo " \"CA\": \"$ca\"," @@ -99,11 +98,11 @@ csv_list() { #----------------------------------------------------------# # Parsing SSL certificate -crt=$(cat $HESTIA/ssl/certificate.crt | sed ':a;N;$!ba;s/\n/\\n/g') -key=$(cat $HESTIA/ssl/certificate.key | sed ':a;N;$!ba;s/\n/\\n/g') +crt=$(cat $TULIO/ssl/certificate.crt | sed ':a;N;$!ba;s/\n/\\n/g') +key=$(cat $TULIO/ssl/certificate.key | sed ':a;N;$!ba;s/\n/\\n/g') # Parsing SSL certificate details without CA -info=$(openssl x509 -text -in $HESTIA/ssl/certificate.crt) +info=$(openssl x509 -text -in $TULIO/ssl/certificate.crt) subj=$(echo "$info" | grep Subject: | cut -f 2 -d =) before=$(echo "$info" | grep Before: | sed -e "s/.*Before: //") after=$(echo "$info" | grep "After :" | sed -e "s/.*After : //") diff --git a/bin/v-list-sys-tulio-updates b/bin/v-list-sys-tulio-updates index 69f88d10e..1f06cdf43 100755 --- a/bin/v-list-sys-tulio-updates +++ b/bin/v-list-sys-tulio-updates @@ -17,11 +17,10 @@ format=${1-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" fields="\$NAME \$VERSION \$ARCH \$UPDATED \$DESCR \$TIME \$DATE" diff --git a/bin/v-list-sys-users b/bin/v-list-sys-users index 0721c2521..47e3f937c 100755 --- a/bin/v-list-sys-users +++ b/bin/v-list-sys-users @@ -18,11 +18,10 @@ format=${1-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-sys-vsftpd-config b/bin/v-list-sys-vsftpd-config index 9762db722..2ebc188d5 100755 --- a/bin/v-list-sys-vsftpd-config +++ b/bin/v-list-sys-vsftpd-config @@ -17,11 +17,10 @@ format=${1-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-sys-web-status b/bin/v-list-sys-web-status index 069f39e43..b41e7d892 100755 --- a/bin/v-list-sys-web-status +++ b/bin/v-list-sys-web-status @@ -17,11 +17,10 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Action # diff --git a/bin/v-list-sys-webmail b/bin/v-list-sys-webmail index d95580841..5dae4b1e2 100755 --- a/bin/v-list-sys-webmail +++ b/bin/v-list-sys-webmail @@ -18,11 +18,10 @@ format=${1-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-user b/bin/v-list-user index 82648d079..3a627a855 100755 --- a/bin/v-list-user +++ b/bin/v-list-user @@ -18,11 +18,10 @@ format=${2-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { echo '{ @@ -181,9 +180,9 @@ is_object_valid 'user' 'USER' "$user" # Defining config USER=$user HOME=$HOMEDIR/$user -source_conf "$HESTIA/data/users/$user/user.conf" -U_USERS=$(cat "$HESTIA/data/users/$ROOT_USER/user.conf" | grep "U_USERS" | cut -d'=' -f2 | sed "s/'//g") -SUSPENDED_USERS=$(cat "$HESTIA/data/users/$ROOT_USER/user.conf" | grep "SUSPENDED_USERS" | cut -d'=' -f2 | sed "s/'//g") +source_conf "$TULIO/data/users/$user/user.conf" +U_USERS=$(cat "$TULIO/data/users/$ROOT_USER/user.conf" | grep "U_USERS" | cut -d'=' -f2 | sed "s/'//g") +SUSPENDED_USERS=$(cat "$TULIO/data/users/$ROOT_USER/user.conf" | grep "SUSPENDED_USERS" | cut -d'=' -f2 | sed "s/'//g") # Listing data case $format in diff --git a/bin/v-list-user-auth-log b/bin/v-list-user-auth-log index f02b88410..633264b15 100755 --- a/bin/v-list-user-auth-log +++ b/bin/v-list-user-auth-log @@ -16,11 +16,10 @@ format=${2-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-user-backup b/bin/v-list-user-backup index 4e07ab580..ada27baf5 100755 --- a/bin/v-list-user-backup +++ b/bin/v-list-user-backup @@ -20,11 +20,10 @@ format=${3-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" fields="\$BACKUP \$TYPE \$SIZE \$WEB \$DNS \$DB \$MAIL \$CRON \$UDIR" fields="$fields \$RUNTIME \$TIME \$DATE" diff --git a/bin/v-list-user-backup-exclusions b/bin/v-list-user-backup-exclusions index f79db2ae8..c287919ed 100755 --- a/bin/v-list-user-backup-exclusions +++ b/bin/v-list-user-backup-exclusions @@ -18,11 +18,10 @@ format=${2-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-user-backup-restic b/bin/v-list-user-backup-restic index 810762131..ad65a5a3d 100755 --- a/bin/v-list-user-backup-restic +++ b/bin/v-list-user-backup-restic @@ -18,17 +18,16 @@ format=${3-plain} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/db.sh -source $HESTIA/func/db.sh +source $TULIO/func/db.sh # shellcheck source=/usr/local/tulio/func/backup.sh -source $HESTIA/func/backup.sh +source $TULIO/func/backup.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -86,7 +85,7 @@ plain_list() { echo -e "$UDIR\t$RUNTIME\t$TIME\t$DATE" } -source_conf $HESTIA/conf/restic.conf +source_conf $TULIO/conf/restic.conf restic --repo "$REPO$user" --password-file $USER_DATA/restic.conf --json dump $snapshot /home/$user/backup/backup.conf > /home/$user/tmp/backup.conf diff --git a/bin/v-list-user-backups b/bin/v-list-user-backups index 9df2671f4..04927cacb 100755 --- a/bin/v-list-user-backups +++ b/bin/v-list-user-backups @@ -18,11 +18,10 @@ format=${2-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-user-backups-restic b/bin/v-list-user-backups-restic index 34995ee7c..e51a9ed5a 100755 --- a/bin/v-list-user-backups-restic +++ b/bin/v-list-user-backups-restic @@ -17,17 +17,16 @@ format=${2-plain} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/db.sh -source $HESTIA/func/db.sh +source $TULIO/func/db.sh # shellcheck source=/usr/local/tulio/func/backup.sh -source $HESTIA/func/backup.sh +source $TULIO/func/backup.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -46,7 +45,7 @@ check_tulio_demo_mode # Action # #----------------------------------------------------------# -source_conf $HESTIA/conf/restic.conf +source_conf $TULIO/conf/restic.conf function json_list() { restic --repo "$REPO$user" --password-file $USER_DATA/restic.conf --json snapshots diff --git a/bin/v-list-user-files-restic b/bin/v-list-user-files-restic index 73fe94860..15278baa9 100755 --- a/bin/v-list-user-files-restic +++ b/bin/v-list-user-files-restic @@ -18,17 +18,16 @@ folder=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/db.sh -source $HESTIA/func/db.sh +source $TULIO/func/db.sh # shellcheck source=/usr/local/tulio/func/backup.sh -source $HESTIA/func/backup.sh +source $TULIO/func/backup.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -47,7 +46,7 @@ check_tulio_demo_mode # Action # #----------------------------------------------------------# -source_conf $HESTIA/conf/restic.conf +source_conf $TULIO/conf/restic.conf restic --repo "$REPO$user" --password-file $USER_DATA/restic.conf --json ls $snapshot $folder diff --git a/bin/v-list-user-ips b/bin/v-list-user-ips index 73978fd24..5d21cad92 100755 --- a/bin/v-list-user-ips +++ b/bin/v-list-user-ips @@ -18,11 +18,10 @@ format="${2-shell}" # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { @@ -30,7 +29,7 @@ json_list() { ip_count="$(echo "$ips" | wc -l)" i=1 for IP in $ips; do - source_conf "$HESTIA/data/ips/$IP" + source_conf "$TULIO/data/ips/$IP" echo -n ' "'$IP'": { "OWNER": "'$OWNER'", "STATUS": "'$STATUS'", @@ -52,7 +51,7 @@ shell_list() { echo "IP NAT OWNER STATUS NAME" echo "-- --- ----- ------ ---" for IP in $ips; do - source_conf "$HESTIA/data/ips/$IP" + source_conf "$TULIO/data/ips/$IP" if [ -z "$NAT" ]; then NAT='no' fi @@ -66,7 +65,7 @@ shell_list() { # PLAIN list function plain_list() { for IP in $ips; do - source_conf "$HESTIA/data/ips/$IP" + source_conf "$TULIO/data/ips/$IP" echo -e "$IP\t$OWNER\t$STATUS\t$NAME\t$NAT" done } @@ -75,7 +74,7 @@ plain_list() { csv_list() { echo "IP,OWNER,STATUS,NAME,NAT" for IP in $ips; do - source_conf "$HESTIA/data/ips/$IP" + source_conf "$TULIO/data/ips/$IP" echo "$IP,$OWNER,$STATUS,$NAME,$NAT" done } @@ -94,10 +93,10 @@ is_object_valid 'user' 'USER' "$user" # Defining fileds to select owner="$ROOT_USER" -owner_ips="$(grep -A 1 -H "OWNER='$owner'" $HESTIA/data/ips/*)" +owner_ips="$(grep -A 1 -H "OWNER='$owner'" $TULIO/data/ips/*)" owner_ips="$(echo "$owner_ips" | grep "STATUS='shared'")" owner_ips="$(echo "$owner_ips" | cut -f 7 -d / | cut -f 1 -d -)" -user_ips="$(grep -H "OWNER='$user'" $HESTIA/data/ips/*)" +user_ips="$(grep -H "OWNER='$user'" $TULIO/data/ips/*)" user_ips="$(echo "$user_ips" | cut -f 7 -d / | cut -f 1 -d :)" ips="$(echo -e "$user_ips\n$owner_ips" | sort -u | sed "/^$/d")" fields='$IP $OWNER $STATUS $NAME $NAT' diff --git a/bin/v-list-user-log b/bin/v-list-user-log index 2faf4c1dc..2b33796dc 100755 --- a/bin/v-list-user-log +++ b/bin/v-list-user-log @@ -18,11 +18,10 @@ format=${2-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { @@ -115,7 +114,7 @@ fi # Parsing history log if [ "$user" = "system" ]; then - log_file="$HESTIA/log/activity.log" + log_file="$TULIO/log/activity.log" else log_file="$USER_DATA/history.log" fi diff --git a/bin/v-list-user-notifications b/bin/v-list-user-notifications index d2e1ad671..f4ec28fdf 100755 --- a/bin/v-list-user-notifications +++ b/bin/v-list-user-notifications @@ -18,11 +18,10 @@ format=${2-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-user-ns b/bin/v-list-user-ns index c3af86d13..8610fa064 100755 --- a/bin/v-list-user-ns +++ b/bin/v-list-user-ns @@ -18,11 +18,10 @@ format=${2-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-user-package b/bin/v-list-user-package index b24411753..9465da147 100755 --- a/bin/v-list-user-package +++ b/bin/v-list-user-package @@ -17,11 +17,10 @@ format=${2-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { echo '{' @@ -119,7 +118,7 @@ is_package_valid #----------------------------------------------------------# # Parsing package -source_conf "$HESTIA/data/packages/$PACKAGE.pkg" +source_conf "$TULIO/data/packages/$PACKAGE.pkg" # Listing data case $format in diff --git a/bin/v-list-user-packages b/bin/v-list-user-packages index 6f2ceadd4..240060fc4 100755 --- a/bin/v-list-user-packages +++ b/bin/v-list-user-packages @@ -15,11 +15,10 @@ format=${1-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { @@ -29,7 +28,7 @@ json_list() { echo "{" for package in $packages; do PACKAGE=${package/.pkg/} - source_conf "$HESTIA/data/packages/$PACKAGE.pkg" + source_conf "$TULIO/data/packages/$PACKAGE.pkg" echo -n ' "'$PACKAGE'": { "WEB_TEMPLATE": "'$WEB_TEMPLATE'", "PROXY_TEMPLATE": "'$PROXY_TEMPLATE'", @@ -69,9 +68,9 @@ shell_list() { echo "PKG TPL WEB DNS MAIL DB SHELL DISK CPU_QUOTA CPU_QUOTA_PERIOD MEMORY_LIMIT SWAP_LIMIT BW" echo "--- --- --- --- ---- -- ----- ---- --------- ---------------- ------------ ---------- --" for package in $packages; do - source $HESTIA/data/packages/$package + source $TULIO/data/packages/$package PACKAGE=${package/.pkg/} - package_data=$(cat $HESTIA/data/packages/$package) + package_data=$(cat $TULIO/data/packages/$package) package_data=$(echo "$package_data" | sed -e 's/unlimited/unlim/g') parse_object_kv_list "$package_data" echo -n "$PACKAGE $WEB_TEMPLATE $WEB_DOMAINS $DNS_DOMAINS " @@ -82,7 +81,7 @@ shell_list() { # PLAIN list function plain_list() { for package in $packages; do - source $HESTIA/data/packages/$package + source $TULIO/data/packages/$package PACKAGE=${package/.pkg/} echo -ne "$PACKAGE\t$WEB_TEMPLATE\t$PROXY_TEMPLATE\t$DNS_TEMPLATE\t" echo -ne "$WEB_DOMAINS\t$WEB_ALIASES\t$DNS_DOMAINS\t$DNS_RECORDS\t" @@ -114,7 +113,7 @@ csv_list() { #----------------------------------------------------------# # Parsing packages -packages=$(ls --sort=time $HESTIA/data/packages | grep .pkg) +packages=$(ls --sort=time $TULIO/data/packages | grep .pkg) # Listing data case $format in diff --git a/bin/v-list-user-ssh-key b/bin/v-list-user-ssh-key index 6632afd51..47dff58d7 100755 --- a/bin/v-list-user-ssh-key +++ b/bin/v-list-user-ssh-key @@ -17,11 +17,10 @@ format=${2-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-user-stats b/bin/v-list-user-stats index d2e8d23b7..5fd5d6997 100755 --- a/bin/v-list-user-stats +++ b/bin/v-list-user-stats @@ -18,11 +18,10 @@ format=${2-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-users b/bin/v-list-users index 06c5d1352..773e18890 100755 --- a/bin/v-list-users +++ b/bin/v-list-users @@ -14,11 +14,10 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source "$HESTIA/func/main.sh" +source "$TULIO/func/main.sh" # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Argument definition format=${1-shell} @@ -28,13 +27,13 @@ json_list() { echo '{' i=1 while read USER; do - if [ ! -f "$HESTIA/data/users/$USER/user.conf" ]; then + if [ ! -f "$TULIO/data/users/$USER/user.conf" ]; then continue fi if [ $i -gt 1 ]; then echo "," fi - source_conf "$HESTIA/data/users/$USER/user.conf" + source_conf "$TULIO/data/users/$USER/user.conf" echo -n ' "'$USER'": { "NAME": "'$NAME'", "PACKAGE": "'$PACKAGE'", @@ -104,10 +103,10 @@ shell_list() { echo "USER ROLE PKG WEB DNS MAIL DB DISK BW SPND DATE" echo "---- ---- --- --- --- --- -- ---- -- ---- ----" while read USER; do - if [ ! -f "$HESTIA/data/users/$USER/user.conf" ]; then + if [ ! -f "$TULIO/data/users/$USER/user.conf" ]; then continue fi - source_conf "$HESTIA/data/users/$USER/user.conf" + source_conf "$TULIO/data/users/$USER/user.conf" echo -n "$USER $ROLE $PACKAGE $U_WEB_DOMAINS $U_DNS_DOMAINS $U_MAIL_DOMAINS" echo " $U_DATABASES $U_DISK $U_BANDWIDTH $SUSPENDED $DATE" done < <(grep '@' /etc/passwd | cut -f1 -d:) @@ -116,10 +115,10 @@ shell_list() { # PLAIN list function plain_list() { while read USER; do - if [ ! -f "$HESTIA/data/users/$USER/user.conf" ]; then + if [ ! -f "$TULIO/data/users/$USER/user.conf" ]; then continue fi - source_conf "$HESTIA/data/users/$USER/user.conf" + source_conf "$TULIO/data/users/$USER/user.conf" echo -ne "$USER\t$NAME\t$PACKAGE\t$WEB_TEMPLATE\t" echo -ne "$BACKEND_TEMPLATE\t$PROXY_TEMPLATE\t$DNS_TEMPLATE\t" echo -ne "$WEB_DOMAINS\t$WEB_ALIASES\t$DNS_DOMAINS\t$DNS_RECORDS\t" @@ -153,10 +152,10 @@ csv_list() { echo -n "U_MAIL_DOMAINS,U_MAIL_DKIM,U_MAIL_ACCOUNTS,U_DATABASES" echo "U_CRON_JOBS,U_BACKUPS,LANGUAGE,TIME,DATE" while read USER; do - if [ ! -f "$HESTIA/data/users/$USER/user.conf" ]; then + if [ ! -f "$TULIO/data/users/$USER/user.conf" ]; then continue fi - source_conf "$HESTIA/data/users/$USER/user.conf" + source_conf "$TULIO/data/users/$USER/user.conf" echo -n "$USER,\"$NAME\",$PACKAGE,$WEB_TEMPLATE," echo -n "$BACKEND_TEMPLATE,$PROXY_TEMPLATE,$DNS_TEMPLATE," echo -n "$WEB_DOMAINS,$WEB_ALIASES,$DNS_DOMAINS,$DNS_RECORDS," @@ -177,10 +176,10 @@ csv_list() { # USER ONLY list function only_user_list() { while read USER; do - if [ ! -f "$HESTIA/data/users/$USER/user.conf" ]; then + if [ ! -f "$TULIO/data/users/$USER/user.conf" ]; then continue fi - source_conf "$HESTIA/data/users/$USER/user.conf" + source_conf "$TULIO/data/users/$USER/user.conf" echo "$USER" done < <(grep '@' /etc/passwd | cut -f1 -d:) } diff --git a/bin/v-list-users-stats b/bin/v-list-users-stats index 77e8b5d0f..5d2d1fb9a 100755 --- a/bin/v-list-users-stats +++ b/bin/v-list-users-stats @@ -15,17 +15,16 @@ format=${1-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { IFS=$'\n' i=1 - objects=$(grep DATE "$HESTIA/data/users/$ROOT_USER/overall_stats.log" | wc -l) + objects=$(grep DATE "$TULIO/data/users/$ROOT_USER/overall_stats.log" | wc -l) echo "{" while read str; do parse_object_kv_list "$str" @@ -60,7 +59,7 @@ json_list() { echo fi ((i++)) - done < <(cat "$HESTIA/data/users/$ROOT_USER/overall_stats.log") + done < <(cat "$TULIO/data/users/$ROOT_USER/overall_stats.log") echo '}' } @@ -77,7 +76,7 @@ shell_list() { echo -n "$DATE $U_USERS $U_WEB_DOMAINS $U_DNS_DOMAINS " echo -n "$U_MAIL_DOMAINS $U_DATABASES $U_BACKUPS $IP_OWNED " echo "$U_DISK $U_BANDWIDTH" - done < <(cat "$HESTIA/data/users/$ROOT_USER/overall_stats.log") + done < <(cat "$TULIO/data/users/$ROOT_USER/overall_stats.log") } # PLAIN list function @@ -91,7 +90,7 @@ plain_list() { echo -ne "$U_WEB_ALIASES\t$U_DNS_DOMAINS\t$U_DNS_RECORDS\t" echo -ne "$U_MAIL_DOMAINS\t$U_MAIL_DKIM\t$U_MAIL_ACCOUNTS\t" echo -e "$U_DATABASES\t$U_CRON_JOBS\t$U_BACKUPS\t$U_USERS" - done < <(cat "$HESTIA/data/users/$ROOT_USER/overall_stats.log") + done < <(cat "$TULIO/data/users/$ROOT_USER/overall_stats.log") } # CSV list function @@ -112,7 +111,7 @@ csv_list() { echo -n "$U_WEB_ALIASES,$U_DNS_DOMAINS,$U_DNS_RECORDS," echo -n "$U_MAIL_DOMAINS,$U_MAIL_DKIM,$U_MAIL_ACCOUNTS," echo "$U_DATABASES,$U_CRON_JOBS,$U_BACKUPS,$U_USERS" - done < <(cat "$HESTIA/data/users/$ROOT_USER/overall_stats.log") + done < <(cat "$TULIO/data/users/$ROOT_USER/overall_stats.log") } #----------------------------------------------------------# @@ -129,7 +128,7 @@ check_args '0' "$#" '[FORMAT]' $BIN/v-update-user-stats # Defining config -conf="$HESTIA/data/users/$ROOT_USER/overall_stats.log" +conf="$TULIO/data/users/$ROOT_USER/overall_stats.log" if [ ! -e "$conf" ]; then touch $conf fi diff --git a/bin/v-list-web-domain b/bin/v-list-web-domain index f14758891..588d00715 100755 --- a/bin/v-list-web-domain +++ b/bin/v-list-web-domain @@ -19,11 +19,10 @@ format=${3-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-web-domain-accesslog b/bin/v-list-web-domain-accesslog index 843316a3c..b02adf6ed 100755 --- a/bin/v-list-web-domain-accesslog +++ b/bin/v-list-web-domain-accesslog @@ -20,11 +20,10 @@ format=${4-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-web-domain-errorlog b/bin/v-list-web-domain-errorlog index 077826b7f..ad7004124 100755 --- a/bin/v-list-web-domain-errorlog +++ b/bin/v-list-web-domain-errorlog @@ -20,11 +20,10 @@ format=${4-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-web-domain-ssl b/bin/v-list-web-domain-ssl index ae4e12a8f..fd6172c73 100755 --- a/bin/v-list-web-domain-ssl +++ b/bin/v-list-web-domain-ssl @@ -19,11 +19,10 @@ format=${3-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-web-domains b/bin/v-list-web-domains index 71de9a3ea..91f6c70b6 100755 --- a/bin/v-list-web-domains +++ b/bin/v-list-web-domains @@ -18,11 +18,10 @@ format=${2-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-web-stats b/bin/v-list-web-stats index d0feda63e..5de5bf0a7 100755 --- a/bin/v-list-web-stats +++ b/bin/v-list-web-stats @@ -18,11 +18,10 @@ format=${1-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-web-templates b/bin/v-list-web-templates index 253f77a43..d1a93befc 100755 --- a/bin/v-list-web-templates +++ b/bin/v-list-web-templates @@ -17,11 +17,10 @@ format=${1-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-web-templates-backend b/bin/v-list-web-templates-backend index ae8faccb5..5a283fba1 100755 --- a/bin/v-list-web-templates-backend +++ b/bin/v-list-web-templates-backend @@ -17,11 +17,10 @@ format=${1-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-list-web-templates-proxy b/bin/v-list-web-templates-proxy index 95de43bac..c3c839e5a 100755 --- a/bin/v-list-web-templates-proxy +++ b/bin/v-list-web-templates-proxy @@ -17,11 +17,10 @@ format=${1-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # JSON list function json_list() { diff --git a/bin/v-log-action b/bin/v-log-action index b16906d97..933de4420 100755 --- a/bin/v-log-action +++ b/bin/v-log-action @@ -18,11 +18,10 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-log-user-login b/bin/v-log-user-login index fa1cfdfa5..e65829d85 100755 --- a/bin/v-log-user-login +++ b/bin/v-log-user-login @@ -24,11 +24,10 @@ fi # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -59,7 +58,7 @@ fi echo "DATE='$date' TIME='$time' IP='$ip' ACTION='login' STATUS='$status' USER_AGENT='$user_agent' SESSION='$session_id' ACTIVE='$active'" >> "$USER_DATA/auth.log" if [ "$authlog" = "yes" ]; then - echo "$date $time $user $ip failed to login ($reason)" >> "$HESTIA/log/auth.log" + echo "$date $time $user $ip failed to login ($reason)" >> "$TULIO/log/auth.log" fi #----------------------------------------------------------# diff --git a/bin/v-log-user-logout b/bin/v-log-user-logout index 81ee1a4c2..976dd03d6 100755 --- a/bin/v-log-user-logout +++ b/bin/v-log-user-logout @@ -14,11 +14,10 @@ session_id=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-move-firewall-rule b/bin/v-move-firewall-rule index 4c4f25e72..56b7f0a82 100755 --- a/bin/v-move-firewall-rule +++ b/bin/v-move-firewall-rule @@ -25,11 +25,10 @@ direction=$(echo $2 | tr '[:lower:]' '[:upper:]') # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" get_rule_id() { local old_rule_no=$1 @@ -45,10 +44,10 @@ get_rule_id() { # Sort function sort_fw_rules() { - cat $HESTIA/data/firewall/rules.conf \ - | sort -n -k 2 -t \' > $HESTIA/data/firewall/rules.conf.tmp - mv -f $HESTIA/data/firewall/rules.conf.tmp \ - $HESTIA/data/firewall/rules.conf + cat $TULIO/data/firewall/rules.conf \ + | sort -n -k 2 -t \' > $TULIO/data/firewall/rules.conf.tmp + mv -f $TULIO/data/firewall/rules.conf.tmp \ + $TULIO/data/firewall/rules.conf } #----------------------------------------------------------# # Verifications # @@ -74,7 +73,7 @@ if [[ "$direction" == "UP" && "$source_rule" -eq 1 ]]; then exit 1 fi # Check if the rule can be moved down (if it's not the last rule) -last_rule=$(tail -n 1 $HESTIA/data/firewall/rules.conf | cut -d "'" -f 2) +last_rule=$(tail -n 1 $TULIO/data/firewall/rules.conf | cut -d "'" -f 2) if [[ "$direction" == "DOWN" && "$source_rule" -eq "$last_rule" ]]; then echo "Cannot move rule down. It's already the last rule." exit 1 @@ -90,7 +89,7 @@ check_tulio_demo_mode target_rule=$(get_rule_id "$source_rule" "$direction") # Get the rule that will be moved -parse_object_kv_list $(grep "RULE='$source_rule'" $HESTIA/data/firewall/rules.conf) +parse_object_kv_list $(grep "RULE='$source_rule'" $TULIO/data/firewall/rules.conf) # Generating timestamp time_n_date=$(date +'%T %F') @@ -103,9 +102,9 @@ source_str="$source_str IP='$IP' COMMENT='$COMMENT' SUSPENDED='$SUSPENDED'" source_str="$source_str TIME='$time' DATE='$date'" # Deleting old source rule -sed -i "/RULE='$source_rule' /d" $HESTIA/data/firewall/rules.conf +sed -i "/RULE='$source_rule' /d" $TULIO/data/firewall/rules.conf -parse_object_kv_list $(grep "RULE='$target_rule'" $HESTIA/data/firewall/rules.conf) +parse_object_kv_list $(grep "RULE='$target_rule'" $TULIO/data/firewall/rules.conf) # Generating timestamp time_n_date=$(date +'%T %F') @@ -118,11 +117,11 @@ target_str="$target_str IP='$IP' COMMENT='$COMMENT' SUSPENDED='$SUSPENDED'" target_str="$target_str TIME='$time' DATE='$date'" # Deleting old target rule -sed -i "/RULE='$target_rule' /d" $HESTIA/data/firewall/rules.conf +sed -i "/RULE='$target_rule' /d" $TULIO/data/firewall/rules.conf # Adding new source and target rules -echo "$source_str" >> $HESTIA/data/firewall/rules.conf -echo "$target_str" >> $HESTIA/data/firewall/rules.conf +echo "$source_str" >> $TULIO/data/firewall/rules.conf +echo "$target_str" >> $TULIO/data/firewall/rules.conf # Sorting firewall rules by id number sort_fw_rules diff --git a/bin/v-move-fs-directory b/bin/v-move-fs-directory index 964d313ab..efe8a2867 100755 --- a/bin/v-move-fs-directory +++ b/bin/v-move-fs-directory @@ -15,11 +15,10 @@ dst_dir=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-move-fs-file b/bin/v-move-fs-file index 9acd6738e..1c5a60d48 100755 --- a/bin/v-move-fs-file +++ b/bin/v-move-fs-file @@ -15,9 +15,8 @@ dst_file=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh #----------------------------------------------------------# # Verifications # diff --git a/bin/v-open-fs-config b/bin/v-open-fs-config index 712c1c800..ea8b4b9bc 100755 --- a/bin/v-open-fs-config +++ b/bin/v-open-fs-config @@ -13,7 +13,6 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" src_file=$1 # Checking arguments diff --git a/bin/v-open-fs-file b/bin/v-open-fs-file index 5c4a42196..a6a888fc9 100755 --- a/bin/v-open-fs-file +++ b/bin/v-open-fs-file @@ -13,9 +13,8 @@ src_file=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh #----------------------------------------------------------# # Verifications # diff --git a/bin/v-purge-nginx-cache b/bin/v-purge-nginx-cache index 128cc6b4b..f8c1fe4a8 100755 --- a/bin/v-purge-nginx-cache +++ b/bin/v-purge-nginx-cache @@ -19,13 +19,12 @@ restart=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio.conf/tulio.conf -source $HESTIA/conf/tulio.conf +source $TULIO/conf/tulio.conf # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-quick-install-app b/bin/v-quick-install-app index 46050e42d..b6fc369ec 100755 --- a/bin/v-quick-install-app +++ b/bin/v-quick-install-app @@ -24,11 +24,11 @@ require_once( __DIR__ . '/../web/inc/vendor/autoload.php'); require_once( __DIR__ . '/../web/src/init.php'); -define("HESTIA_DIR_BIN", "/usr/local/tulio/bin/"); -define("HESTIA_CMD", "/usr/bin/sudo /usr/local/tulio/bin/"); +define("TULIO_DIR_BIN", "/usr/local/tulio/bin/"); +define("TULIO_CMD", "/usr/bin/sudo /usr/local/tulio/bin/"); define("DEFAULT_PHP_VERSION", "php-" . exec('php -r "echo substr(phpversion(),0,3);"')); -exec(HESTIA_CMD . "v-list-sys-config json", $output, $return_var); +exec(TULIO_CMD . "v-list-sys-config json", $output, $return_var); $data = json_decode(implode("", $output), true); $sys_arr = $data["config"]; foreach ($sys_arr as $key => $value) { diff --git a/bin/v-rebuild-all b/bin/v-rebuild-all index 60554209c..47b7eaeac 100755 --- a/bin/v-rebuild-all +++ b/bin/v-rebuild-all @@ -23,15 +23,14 @@ restart=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/rebuild.sh -source $HESTIA/func/rebuild.sh +source $TULIO/func/rebuild.sh # shellcheck source=/usr/local/tulio/func/syshealth.sh -source $HESTIA/func/syshealth.sh +source $TULIO/func/syshealth.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-rebuild-cron-jobs b/bin/v-rebuild-cron-jobs index ac07f32c8..16ee7ffe2 100755 --- a/bin/v-rebuild-cron-jobs +++ b/bin/v-rebuild-cron-jobs @@ -18,11 +18,10 @@ restart=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-rebuild-database b/bin/v-rebuild-database index 4bb2eb0de..898f45441 100755 --- a/bin/v-rebuild-database +++ b/bin/v-rebuild-database @@ -18,17 +18,16 @@ database=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/db.sh -source $HESTIA/func/db.sh +source $TULIO/func/db.sh # shellcheck source=/usr/local/tulio/func/rebuild.sh -source $HESTIA/func/rebuild.sh +source $TULIO/func/rebuild.sh # shellcheck source=/usr/local/tulio/func/syshealth.sh -source $HESTIA/func/syshealth.sh +source $TULIO/func/syshealth.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-rebuild-databases b/bin/v-rebuild-databases index e84882c1e..e16a3a89b 100755 --- a/bin/v-rebuild-databases +++ b/bin/v-rebuild-databases @@ -17,17 +17,16 @@ user=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/db.sh -source $HESTIA/func/db.sh +source $TULIO/func/db.sh # shellcheck source=/usr/local/tulio/func/rebuild.sh -source $HESTIA/func/rebuild.sh +source $TULIO/func/rebuild.sh # shellcheck source=/usr/local/tulio/func/syshealth.sh -source $HESTIA/func/syshealth.sh +source $TULIO/func/syshealth.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-rebuild-dns-domain b/bin/v-rebuild-dns-domain index e965fbde1..9c4f92185 100755 --- a/bin/v-rebuild-dns-domain +++ b/bin/v-rebuild-dns-domain @@ -20,17 +20,16 @@ update_serial=${4-no} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/rebuild.sh -source $HESTIA/func/rebuild.sh +source $TULIO/func/rebuild.sh # shellcheck source=/usr/local/tulio/func/syshealth.sh -source $HESTIA/func/syshealth.sh +source $TULIO/func/syshealth.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-rebuild-dns-domains b/bin/v-rebuild-dns-domains index 724be39b2..1c4ce7e18 100755 --- a/bin/v-rebuild-dns-domains +++ b/bin/v-rebuild-dns-domains @@ -19,17 +19,16 @@ update_serial=${3-no} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/rebuild.sh -source $HESTIA/func/rebuild.sh +source $TULIO/func/rebuild.sh # shellcheck source=/usr/local/tulio/func/syshealth.sh -source $HESTIA/func/syshealth.sh +source $TULIO/func/syshealth.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-rebuild-mail-domain b/bin/v-rebuild-mail-domain index d3f6a750e..8b35f824f 100755 --- a/bin/v-rebuild-mail-domain +++ b/bin/v-rebuild-mail-domain @@ -19,19 +19,18 @@ restart=${3-yes} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # shellcheck source=/usr/local/tulio/func/rebuild.sh -source $HESTIA/func/rebuild.sh +source $TULIO/func/rebuild.sh # shellcheck source=/usr/local/tulio/func/syshealth.sh -source $HESTIA/func/syshealth.sh +source $TULIO/func/syshealth.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Define mail user if [ "$MAIL_SYSTEM" = 'exim4' ]; then diff --git a/bin/v-rebuild-mail-domains b/bin/v-rebuild-mail-domains index 53a2d0db4..d26bb7832 100755 --- a/bin/v-rebuild-mail-domains +++ b/bin/v-rebuild-mail-domains @@ -17,19 +17,18 @@ user=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # shellcheck source=/usr/local/tulio/func/rebuild.sh -source $HESTIA/func/rebuild.sh +source $TULIO/func/rebuild.sh # shellcheck source=/usr/local/tulio/func/syshealth.sh -source $HESTIA/func/syshealth.sh +source $TULIO/func/syshealth.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Define mail user if [ "$MAIL_SYSTEM" = 'exim4' ]; then diff --git a/bin/v-rebuild-user b/bin/v-rebuild-user index 76b11f254..c1562c3e7 100755 --- a/bin/v-rebuild-user +++ b/bin/v-rebuild-user @@ -18,19 +18,18 @@ restart=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # shellcheck source=/usr/local/tulio/func/rebuild.sh -source $HESTIA/func/rebuild.sh +source $TULIO/func/rebuild.sh # shellcheck source=/usr/local/tulio/func/syshealth.sh -source $HESTIA/func/syshealth.sh +source $TULIO/func/syshealth.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-rebuild-users b/bin/v-rebuild-users index fe22b4ad9..2b0605627 100755 --- a/bin/v-rebuild-users +++ b/bin/v-rebuild-users @@ -17,15 +17,14 @@ restart=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/rebuild.sh -source $HESTIA/func/rebuild.sh +source $TULIO/func/rebuild.sh # shellcheck source=/usr/local/tulio/func/syshealth.sh -source $HESTIA/func/syshealth.sh +source $TULIO/func/syshealth.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-rebuild-web-domain b/bin/v-rebuild-web-domain index c63336e88..6eb9313a9 100755 --- a/bin/v-rebuild-web-domain +++ b/bin/v-rebuild-web-domain @@ -19,19 +19,18 @@ restart=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # shellcheck source=/usr/local/tulio/func/rebuild.sh -source $HESTIA/func/rebuild.sh +source $TULIO/func/rebuild.sh # shellcheck source=/usr/local/tulio/func/syshealth.sh -source $HESTIA/func/syshealth.sh +source $TULIO/func/syshealth.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-rebuild-web-domains b/bin/v-rebuild-web-domains index c97540a13..b17ace695 100755 --- a/bin/v-rebuild-web-domains +++ b/bin/v-rebuild-web-domains @@ -18,19 +18,18 @@ restart=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # shellcheck source=/usr/local/tulio/func/rebuild.sh -source $HESTIA/func/rebuild.sh +source $TULIO/func/rebuild.sh # shellcheck source=/usr/local/tulio/func/syshealth.sh -source $HESTIA/func/syshealth.sh +source $TULIO/func/syshealth.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -89,7 +88,7 @@ for php_folder in /etc/php/*; do v_php="$(basename $php_folder)" if [ ! -f "/etc/php/${v_php}/fpm/pool.d/dummy.conf" ]; then - cp -f "$HESTIA_INSTALL_DIR/php-fpm/dummy.conf" "/etc/php/${v_php}/fpm/pool.d/" + cp -f "$TULIO_INSTALL_DIR/php-fpm/dummy.conf" "/etc/php/${v_php}/fpm/pool.d/" sed -i "s/9999/99${v_php//./}/g" "/etc/php/${v_php}/fpm/pool.d/dummy.conf" fi done diff --git a/bin/v-refresh-sys-theme b/bin/v-refresh-sys-theme index 675b683b1..69f287d65 100755 --- a/bin/v-refresh-sys-theme +++ b/bin/v-refresh-sys-theme @@ -14,11 +14,10 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Action # diff --git a/bin/v-rename-user-package b/bin/v-rename-user-package index 779492484..3f97861ee 100755 --- a/bin/v-rename-user-package +++ b/bin/v-rename-user-package @@ -19,13 +19,12 @@ mode=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -43,7 +42,7 @@ fi is_package_valid "$old_name" is_object_format_valid "$new_name" "New package" -pkg_dir="$HESTIA/data/packages" +pkg_dir="$TULIO/data/packages" if [ -e "$pkg_dir/$new_name.pkg" ]; then check_result "$E_NOTEXIST" "package $new_name exist" fi @@ -55,11 +54,11 @@ check_tulio_demo_mode # Action # #----------------------------------------------------------# -if [ -e "$HESTIA/data/packages/$old_name.pkg" ]; then - mv "$HESTIA/data/packages/$old_name.pkg" "$HESTIA/data/packages/$new_name.pkg" +if [ -e "$TULIO/data/packages/$old_name.pkg" ]; then + mv "$TULIO/data/packages/$old_name.pkg" "$TULIO/data/packages/$new_name.pkg" # Don't leave the .sh file behind - if [ -e "$HESTIA/data/packages/$old_name.sh" ]; then - mv "$HESTIA/data/packages/$old_name.sh" "$HESTIA/data/packages/$new_name.sh" + if [ -e "$TULIO/data/packages/$old_name.sh" ]; then + mv "$TULIO/data/packages/$old_name.sh" "$TULIO/data/packages/$new_name.sh" fi # Update package for existing users diff --git a/bin/v-repair-sys-config b/bin/v-repair-sys-config index fe314a551..7e78287a0 100755 --- a/bin/v-repair-sys-config +++ b/bin/v-repair-sys-config @@ -12,9 +12,8 @@ mode=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh #----------------------------------------------------------# # Action # @@ -26,7 +25,7 @@ fi if [ "$mode" = "repair" ]; then # load config file - source_conf "$HESTIA/conf/tulio.conf" + source_conf "$TULIO/conf/tulio.conf" syshealth_repair_system_config fi diff --git a/bin/v-restart-cron b/bin/v-restart-cron index 8535998e9..b4076a58e 100755 --- a/bin/v-restart-cron +++ b/bin/v-restart-cron @@ -14,14 +14,13 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" send_email_report() { - email=$(grep CONTACT "$HESTIA/data/users/$ROOT_USER/user.conf") + email=$(grep CONTACT "$TULIO/data/users/$ROOT_USER/user.conf") email=$(echo "$email" | cut -f 2 -d "'") tmpfile=$(mktemp) subj="$(hostname): $CRON_SYSTEM restart failed" @@ -48,8 +47,8 @@ fi # Schedule restart if [ "$1" = 'scheduled' ] || [ -z "$1" ] && [ "$SCHEDULED_RESTART" = 'yes' ]; then - sed -i "/\/$SCRIPT now/d" $HESTIA/data/queue/restart.pipe - echo "$BIN/$SCRIPT now" >> $HESTIA/data/queue/restart.pipe + sed -i "/\/$SCRIPT now/d" $TULIO/data/queue/restart.pipe + echo "$BIN/$SCRIPT now" >> $TULIO/data/queue/restart.pipe exit fi @@ -65,8 +64,8 @@ if [ $? -ne 0 ]; then fi # Update restart queue -if [ -e "$HESTIA/data/queue/restart.pipe" ]; then - sed -i "/\/$SCRIPT now/d" $HESTIA/data/queue/restart.pipe +if [ -e "$TULIO/data/queue/restart.pipe" ]; then + sed -i "/\/$SCRIPT now/d" $TULIO/data/queue/restart.pipe fi #----------------------------------------------------------# diff --git a/bin/v-restart-dns b/bin/v-restart-dns index 3bb73e552..63a5a95bd 100755 --- a/bin/v-restart-dns +++ b/bin/v-restart-dns @@ -14,11 +14,10 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" send_email_report() { if [ -e '/etc/named.conf' ]; then @@ -26,7 +25,7 @@ send_email_report() { else dns_conf='/etc/bind/named.conf' fi - email=$(grep CONTACT "$HESTIA/data/users/$ROOT_USER/user.conf") + email=$(grep CONTACT "$TULIO/data/users/$ROOT_USER/user.conf") email=$(echo "$email" | cut -f 2 -d "'") tmpfile=$(mktemp) subj="$(hostname): "$DNS_SYSTEM" restart failed" @@ -59,8 +58,8 @@ fi # Schedule restart if [ "$1" = 'scheduled' ] || [ -z "$1" -a "$SCHEDULED_RESTART" = 'yes' ]; then - sed -i "/\/$SCRIPT now/d" $HESTIA/data/queue/restart.pipe - echo "$BIN/$SCRIPT now" >> $HESTIA/data/queue/restart.pipe + sed -i "/\/$SCRIPT now/d" $TULIO/data/queue/restart.pipe + echo "$BIN/$SCRIPT now" >> $TULIO/data/queue/restart.pipe exit fi @@ -88,8 +87,8 @@ if [ $? -ne 0 ]; then fi # Update restart queue -if [ -e "$HESTIA/data/queue/restart.pipe" ]; then - sed -i "/\/$SCRIPT now/d" $HESTIA/data/queue/restart.pipe +if [ -e "$TULIO/data/queue/restart.pipe" ]; then + sed -i "/\/$SCRIPT now/d" $TULIO/data/queue/restart.pipe fi #----------------------------------------------------------# diff --git a/bin/v-restart-ftp b/bin/v-restart-ftp index 38607a8e3..d37354d4e 100755 --- a/bin/v-restart-ftp +++ b/bin/v-restart-ftp @@ -14,14 +14,13 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" send_email_report() { - email=$(grep CONTACT "$HESTIA/data/users/$ROOT_USER/user.conf") + email=$(grep CONTACT "$TULIO/data/users/$ROOT_USER/user.conf") email=$(echo "$email" | cut -f 2 -d "'") tmpfile=$(mktemp) subj="$(hostname): $FTP_SYSTEM restart failed" @@ -52,8 +51,8 @@ fi # Schedule restart if [ "$1" = 'scheduled' ] || [ -z "$1" ] && [ "$SCHEDULED_RESTART" = 'yes' ]; then - sed -i "/\/$SCRIPT now/d" $HESTIA/data/queue/restart.pipe - echo "$BIN/$SCRIPT now" >> $HESTIA/data/queue/restart.pipe + sed -i "/\/$SCRIPT now/d" $TULIO/data/queue/restart.pipe + echo "$BIN/$SCRIPT now" >> $TULIO/data/queue/restart.pipe exit fi @@ -65,8 +64,8 @@ if [ $? -ne 0 ]; then fi # Update restart queue -if [ -e "$HESTIA/data/queue/restart.pipe" ]; then - sed -i "/\/$SCRIPT now/d" $HESTIA/data/queue/restart.pipe +if [ -e "$TULIO/data/queue/restart.pipe" ]; then + sed -i "/\/$SCRIPT now/d" $TULIO/data/queue/restart.pipe fi #----------------------------------------------------------# diff --git a/bin/v-restart-mail b/bin/v-restart-mail index 8f6850146..94e0a5305 100755 --- a/bin/v-restart-mail +++ b/bin/v-restart-mail @@ -14,16 +14,15 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" send_email_report() { local mail_service="$1" journalctl --no-pager --reverse --since=-1m --unit "$mail_service" >> "$tmpfile" 2>&1 - email=$(grep CONTACT "$HESTIA/data/users/$ROOT_USER/user.conf") + email=$(grep CONTACT "$TULIO/data/users/$ROOT_USER/user.conf") email=$(echo "$email" | cut -f 2 -d "'") subj="$(hostname): $mail_service restart failed" cat "$tmpfile" | $SENDMAIL -s "$subj" $email @@ -51,8 +50,8 @@ fi # Schedule restart if [ "$1" = 'scheduled' ] || [ -z "$1" -a "$SCHEDULED_RESTART" = 'yes' ]; then - sed -i "/\/$SCRIPT now/d" $HESTIA/data/queue/restart.pipe - echo "$BIN/$SCRIPT now" >> $HESTIA/data/queue/restart.pipe + sed -i "/\/$SCRIPT now/d" $TULIO/data/queue/restart.pipe + echo "$BIN/$SCRIPT now" >> $TULIO/data/queue/restart.pipe exit fi @@ -74,8 +73,8 @@ if [ $? -ne 0 ]; then fi # Update restart queue -if [ -e "$HESTIA/data/queue/restart.pipe" ]; then - sed -i "/\/$SCRIPT now/d" $HESTIA/data/queue/restart.pipe +if [ -e "$TULIO/data/queue/restart.pipe" ]; then + sed -i "/\/$SCRIPT now/d" $TULIO/data/queue/restart.pipe fi #----------------------------------------------------------# diff --git a/bin/v-restart-proxy b/bin/v-restart-proxy index e67a393dc..fc0533087 100755 --- a/bin/v-restart-proxy +++ b/bin/v-restart-proxy @@ -14,16 +14,15 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" date=$(date +"%Y-%m-%d %H:%M:%S") send_email_report() { - email=$(grep CONTACT "$HESTIA/data/users/$ROOT_USER/user.conf") + email=$(grep CONTACT "$TULIO/data/users/$ROOT_USER/user.conf") email=$(echo "$email" | cut -f 2 -d "'") tmpfile=$(mktemp) subj="$(hostname): $PROXY_SYSTEM restart failed" @@ -61,18 +60,18 @@ fi # Schedule restart if [ "$1" = 'scheduled' ] || [ -z "$1" ] && [ "$SCHEDULED_RESTART" = 'yes' ]; then - sed -i "/\/$SCRIPT now/d" $HESTIA/data/queue/restart.pipe - echo "$BIN/$SCRIPT now" >> $HESTIA/data/queue/restart.pipe + sed -i "/\/$SCRIPT now/d" $TULIO/data/queue/restart.pipe + echo "$BIN/$SCRIPT now" >> $TULIO/data/queue/restart.pipe exit fi if [ "$1" = "updatessl" ]; then - sed -i "/\/$SCRIPT ssl/d" $HESTIA/data/queue/restart.pipe - echo "$BIN/$SCRIPT ssl" >> $HESTIA/data/queue/restart.pipe + sed -i "/\/$SCRIPT ssl/d" $TULIO/data/queue/restart.pipe + echo "$BIN/$SCRIPT ssl" >> $TULIO/data/queue/restart.pipe exit fi -if [ -f "$HESTIA/web/inc/nginx_proxy" ]; then +if [ -f "$TULIO/web/inc/nginx_proxy" ]; then # if tulio is behind default nginx, restart in background with 15 sec delay # background restart if [ "$1" = 'background' ]; then @@ -94,8 +93,8 @@ if [ -f "$HESTIA/web/inc/nginx_proxy" ]; then $BIN/v-restart-service $PROXY_SYSTEM > /dev/null 2>&1 # Update restart queue - if [ -e "$HESTIA/data/queue/restart.pipe" ]; then - sed -i "/$SCRIPT/d" $HESTIA/data/queue/restart.pipe + if [ -e "$TULIO/data/queue/restart.pipe" ]; then + sed -i "/$SCRIPT/d" $TULIO/data/queue/restart.pipe fi exit @@ -128,9 +127,9 @@ else fi # Update restart queue - if [ -e "$HESTIA/data/queue/restart.pipe" ]; then - sed -i "/\/$SCRIPT now/d" $HESTIA/data/queue/restart.pipe - sed -i "/\/$SCRIPT ssl/d" $HESTIA/data/queue/restart.pipe + if [ -e "$TULIO/data/queue/restart.pipe" ]; then + sed -i "/\/$SCRIPT now/d" $TULIO/data/queue/restart.pipe + sed -i "/\/$SCRIPT ssl/d" $TULIO/data/queue/restart.pipe fi fi diff --git a/bin/v-restart-service b/bin/v-restart-service index c0a755978..9c600af34 100755 --- a/bin/v-restart-service +++ b/bin/v-restart-service @@ -18,10 +18,9 @@ restart=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh -source_conf "$HESTIA/conf/tulio.conf" +source $TULIO/func/main.sh +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-restart-system b/bin/v-restart-system index 1bc6eaf78..1910e100d 100755 --- a/bin/v-restart-system +++ b/bin/v-restart-system @@ -18,11 +18,10 @@ delay=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-restart-web b/bin/v-restart-web index 0462af4b8..ed45d17e8 100755 --- a/bin/v-restart-web +++ b/bin/v-restart-web @@ -14,16 +14,15 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" date=$(date +"%Y-%m-%d %H:%M:%S") send_email_report() { - email=$(grep CONTACT "$HESTIA/data/users/$ROOT_USER/user.conf") + email=$(grep CONTACT "$TULIO/data/users/$ROOT_USER/user.conf") email=$(echo "$email" | cut -f 2 -d "'") tmpfile=$(mktemp) subj="$(hostname): $WEB_SYSTEM restart failed" @@ -65,14 +64,14 @@ fi restart=$1 # Schedule restart if [ "$1" = 'scheduled' ] || [ -z "$1" ] && [ "$SCHEDULED_RESTART" = 'yes' ]; then - sed -i "/\/$SCRIPT now/d" $HESTIA/data/queue/restart.pipe - echo "$BIN/$SCRIPT now" >> $HESTIA/data/queue/restart.pipe + sed -i "/\/$SCRIPT now/d" $TULIO/data/queue/restart.pipe + echo "$BIN/$SCRIPT now" >> $TULIO/data/queue/restart.pipe exit fi if [ "$1" = "updatessl" ]; then - sed -i "/\/$SCRIPT ssl/d" $HESTIA/data/queue/restart.pipe - echo "$BIN/$SCRIPT ssl" >> $HESTIA/data/queue/restart.pipe + sed -i "/\/$SCRIPT ssl/d" $TULIO/data/queue/restart.pipe + echo "$BIN/$SCRIPT ssl" >> $TULIO/data/queue/restart.pipe exit fi @@ -111,9 +110,9 @@ if [ $? -ne 0 ]; then fi # Update restart queue -if [ -e "$HESTIA/data/queue/restart.pipe" ]; then - sed -i "/\/$SCRIPT now/d" $HESTIA/data/queue/restart.pipe - sed -i "/\/$SCRIPT ssl/d" $HESTIA/data/queue/restart.pipe +if [ -e "$TULIO/data/queue/restart.pipe" ]; then + sed -i "/\/$SCRIPT now/d" $TULIO/data/queue/restart.pipe + sed -i "/\/$SCRIPT ssl/d" $TULIO/data/queue/restart.pipe fi #----------------------------------------------------------# diff --git a/bin/v-restart-web-backend b/bin/v-restart-web-backend index ccbcfd2cc..8131401c1 100755 --- a/bin/v-restart-web-backend +++ b/bin/v-restart-web-backend @@ -18,14 +18,13 @@ version=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" send_email_report() { - email=$(grep CONTACT "$HESTIA/data/users/$ROOT_USER/user.conf") + email=$(grep CONTACT "$TULIO/data/users/$ROOT_USER/user.conf") email=$(echo "$email" | cut -f 2 -d "'") subj="$(hostname): $WEB_BACKEND restart failed" cat $tmpfile | $SENDMAIL -s "$subj" $email @@ -60,8 +59,8 @@ fi # Schedule restart if [ "$1" = 'scheduled' ] || [ -z "$1" ] && [ "$SCHEDULED_RESTART" = 'yes' ]; then - sed -i "/\/$SCRIPT now/d" $HESTIA/data/queue/restart.pipe - echo "$BIN/$SCRIPT now" >> $HESTIA/data/queue/restart.pipe + sed -i "/\/$SCRIPT now/d" $TULIO/data/queue/restart.pipe + echo "$BIN/$SCRIPT now" >> $TULIO/data/queue/restart.pipe exit fi @@ -72,7 +71,7 @@ if [ -z "$version" ]; then for version in $($BIN/v-list-sys-php plain); do v_php="php$version-fpm" if [ ! -f "/etc/php/${version}/fpm/pool.d/dummy.conf" ]; then - cp -f "$HESTIA_INSTALL_DIR/php-fpm/dummy.conf" "/etc/php/${version}/fpm/pool.d/" + cp -f "$TULIO_INSTALL_DIR/php-fpm/dummy.conf" "/etc/php/${version}/fpm/pool.d/" sed -i "s/9999/99${version//./}/g" "/etc/php/${version}/fpm/pool.d/dummy.conf" fi @@ -92,8 +91,8 @@ else fi # Update restart queue -if [ -e "$HESTIA/data/queue/restart.pipe" ]; then - sed -i "/\/$SCRIPT now/d" $HESTIA/data/queue/restart.pipe +if [ -e "$TULIO/data/queue/restart.pipe" ]; then + sed -i "/\/$SCRIPT now/d" $TULIO/data/queue/restart.pipe fi #----------------------------------------------------------# diff --git a/bin/v-restore-cron-job b/bin/v-restore-cron-job index fc64dead1..e015f1d6f 100755 --- a/bin/v-restore-cron-job +++ b/bin/v-restore-cron-job @@ -21,11 +21,10 @@ notify=$4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Perform verification if read-only mode is enabled check_tulio_demo_mode diff --git a/bin/v-restore-cron-job-restic b/bin/v-restore-cron-job-restic index 8f16a6c81..2f565fd54 100755 --- a/bin/v-restore-cron-job-restic +++ b/bin/v-restore-cron-job-restic @@ -20,19 +20,18 @@ notify=${3-no} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # shellcheck source=/usr/local/tulio/func/rebuild.sh -source $HESTIA/func/rebuild.sh +source $TULIO/func/rebuild.sh # shellcheck source=/usr/local/tulio/func/syshealth.sh -source $HESTIA/func/syshealth.sh +source $TULIO/func/syshealth.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -43,7 +42,7 @@ check_args '2' "$#" "$args_usage" is_format_valid 'user' is_object_valid 'user' 'USER' "$user" -source_conf $HESTIA/conf/restic.conf +source_conf $TULIO/conf/restic.conf #----------------------------------------------------------# # Action # @@ -74,7 +73,7 @@ $BIN/v-update-user-counters $user $BIN/v-update-user-counters admin $BIN/v-update-sys-ip-counters -sed -i "/v-restore-cron-job-restic '$user' '$snapshot'/d" $HESTIA/data/queue/backup.pipe +sed -i "/v-restore-cron-job-restic '$user' '$snapshot'/d" $TULIO/data/queue/backup.pipe # Logging $BIN/v-log-action "system" "Info" "Backup" "Cron jobs successfully restored (User: $user, Snapshot: $snapshot)." diff --git a/bin/v-restore-database b/bin/v-restore-database index f288a8c56..5445be659 100755 --- a/bin/v-restore-database +++ b/bin/v-restore-database @@ -21,11 +21,10 @@ notify=$4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Perform verification if read-only mode is enabled check_tulio_demo_mode diff --git a/bin/v-restore-database-restic b/bin/v-restore-database-restic index 3301c81b7..dbc4f4233 100755 --- a/bin/v-restore-database-restic +++ b/bin/v-restore-database-restic @@ -22,17 +22,16 @@ notify=${4-no} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/db.sh -source $HESTIA/func/db.sh +source $TULIO/func/db.sh # shellcheck source=/usr/local/tulio/func/rebuild.sh -source $HESTIA/func/rebuild.sh +source $TULIO/func/rebuild.sh # shellcheck source=/usr/local/tulio/func/syshealth.sh -source $HESTIA/func/syshealth.sh +source $TULIO/func/syshealth.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -43,7 +42,7 @@ check_args '3' "$#" "$args_usage" is_format_valid 'user' is_object_valid 'user' 'USER' "$user" -source_conf $HESTIA/conf/restic.conf +source_conf $TULIO/conf/restic.conf #----------------------------------------------------------# # Action # @@ -124,7 +123,7 @@ $BIN/v-update-user-counters $user $BIN/v-update-user-counters admin $BIN/v-update-sys-ip-counters -sed -i "/v-restore-database-restic '$user' '$snapshot' '$database' /d" $HESTIA/data/queue/backup.pipe +sed -i "/v-restore-database-restic '$user' '$snapshot' '$database' /d" $TULIO/data/queue/backup.pipe # Logging $BIN/v-log-action "system" "Info" "Backup" "Database successfully restored (User: $user, Snapshot: $snapshot, Databse: $database)." diff --git a/bin/v-restore-dns-domain b/bin/v-restore-dns-domain index 61328c71c..d7376e8f3 100755 --- a/bin/v-restore-dns-domain +++ b/bin/v-restore-dns-domain @@ -21,11 +21,10 @@ notify=$4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Perform verification if read-only mode is enabled check_tulio_demo_mode diff --git a/bin/v-restore-dns-domain-restic b/bin/v-restore-dns-domain-restic index 76731965d..7a15ef742 100755 --- a/bin/v-restore-dns-domain-restic +++ b/bin/v-restore-dns-domain-restic @@ -20,19 +20,18 @@ notify=${4-no} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # shellcheck source=/usr/local/tulio/func/rebuild.sh -source $HESTIA/func/rebuild.sh +source $TULIO/func/rebuild.sh # shellcheck source=/usr/local/tulio/func/syshealth.sh -source $HESTIA/func/syshealth.sh +source $TULIO/func/syshealth.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -43,7 +42,7 @@ check_args '3' "$#" "$args_usage" is_format_valid 'user' is_object_valid 'user' 'USER' "$user" -source_conf $HESTIA/conf/restic.conf +source_conf $TULIO/conf/restic.conf #----------------------------------------------------------# # Action # @@ -74,7 +73,7 @@ for domain in $domains; do rm -rf $tmpdir error="$domain belongs to another user" echo "$error" | $SENDMAIL -s "$subj" "$email" "$notify" - sed -i "/ $user /d" $HESTIA/data/queue/backup.pipe + sed -i "/ $user /d" $TULIO/data/queue/backup.pipe check_result "$E_PARSING" "$error" fi fi @@ -131,7 +130,7 @@ for domain in $domains; do # Updating dns-cluster queue if [ -n "$DNS_CLUSTER" ]; then cmd="$BIN/v-add-remote-dns-domain $user $domain yes" - echo "$cmd" >> $HESTIA/data/queue/dns-cluster.pipe + echo "$cmd" >> $TULIO/data/queue/dns-cluster.pipe fi fi @@ -147,7 +146,7 @@ $BIN/v-update-user-counters $user $BIN/v-update-user-counters admin $BIN/v-update-sys-ip-counters -sed -i "/v-restore-dns-domain-restic '$user' '$snapshot' '$dns' /d" $HESTIA/data/queue/backup.pipe +sed -i "/v-restore-dns-domain-restic '$user' '$snapshot' '$dns' /d" $TULIO/data/queue/backup.pipe # Logging $BIN/v-log-action "system" "Info" "Backup" "DNS Domain successfully restored (User: $user, Snapshot: $snapshot, Databse: $database)." diff --git a/bin/v-restore-file-restic b/bin/v-restore-file-restic index 81736100a..fc26a72d8 100755 --- a/bin/v-restore-file-restic +++ b/bin/v-restore-file-restic @@ -20,19 +20,18 @@ notify=${4-no} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # shellcheck source=/usr/local/tulio/func/rebuild.sh -source $HESTIA/func/rebuild.sh +source $TULIO/func/rebuild.sh # shellcheck source=/usr/local/tulio/func/syshealth.sh -source $HESTIA/func/syshealth.sh +source $TULIO/func/syshealth.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -43,7 +42,7 @@ check_args '3' "$#" "$args_usage" is_format_valid 'user' is_object_valid 'user' 'USER' "$user" -source_conf $HESTIA/conf/restic.conf +source_conf $TULIO/conf/restic.conf #----------------------------------------------------------# # Action # @@ -70,7 +69,7 @@ $BIN/v-update-user-counters $user $BIN/v-update-user-counters admin $BIN/v-update-sys-ip-counters -sed -i "/v-restore-file-restic '$user' '$snapshot' '$file' /d" $HESTIA/data/queue/backup.pipe +sed -i "/v-restore-file-restic '$user' '$snapshot' '$file' /d" $TULIO/data/queue/backup.pipe # Logging $BIN/v-log-action "system" "Info" "Backup" "DNS Domain successfully restored (User: $user, Snapshot: $snapshot, Databse: $database)." diff --git a/bin/v-restore-mail-domain b/bin/v-restore-mail-domain index dea1a81f3..7074c6f15 100755 --- a/bin/v-restore-mail-domain +++ b/bin/v-restore-mail-domain @@ -21,11 +21,10 @@ notify=$4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-restore-mail-domain-restic b/bin/v-restore-mail-domain-restic index f0e6b33a0..c24b54c1d 100755 --- a/bin/v-restore-mail-domain-restic +++ b/bin/v-restore-mail-domain-restic @@ -23,19 +23,18 @@ notify=${4-no} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # shellcheck source=/usr/local/tulio/func/rebuild.sh -source $HESTIA/func/rebuild.sh +source $TULIO/func/rebuild.sh # shellcheck source=/usr/local/tulio/func/syshealth.sh -source $HESTIA/func/syshealth.sh +source $TULIO/func/syshealth.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -46,7 +45,7 @@ check_args '3' "$#" "$args_usage" is_format_valid 'user' is_object_valid 'user' 'USER' "$user" -source_conf $HESTIA/conf/restic.conf +source_conf $TULIO/conf/restic.conf #----------------------------------------------------------# # Action # @@ -82,7 +81,7 @@ for domain in $domains; do rm -rf $tmpdir error="$domain belongs to another user" echo "$error" | $SENDMAIL -s "$subj" $email $notify - sed -i "/ $user /d" $HESTIA/data/queue/backup.pipe + sed -i "/ $user /d" $TULIO/data/queue/backup.pipe check_result "$E_PARSING" "$error" fi fi @@ -107,8 +106,8 @@ for domain in $domains; do # Restore SSL check_config=$(grep "DOMAIN='$domain'" $USER_DATA/mail.conf | grep -o "SSL='yes'") if [ -n "$check_config" ]; then - if [ ! -e "$HESTIA/data/users/$user/ssl/" ]; then - mkdir -p $HESTIA/data/users/$user/ssl/ + if [ ! -e "$TULIO/data/users/$user/ssl/" ]; then + mkdir -p $TULIO/data/users/$user/ssl/ fi if [ ! -e "$HOMEDIR/$user/conf/mail/$domain/ssl/" ]; then @@ -221,7 +220,7 @@ $BIN/v-update-user-counters $user $BIN/v-update-user-counters admin $BIN/v-update-sys-ip-counters -sed -i "/v-restore-mail-domain-restic '$user' '$snapshot' '$mail' /d" $HESTIA/data/queue/backup.pipe +sed -i "/v-restore-mail-domain-restic '$user' '$snapshot' '$mail' /d" $TULIO/data/queue/backup.pipe # Logging $BIN/v-log-action "system" "Info" "Backup" "Mail domain successfully restored (User: $user, Snapshot: $snapshot, Databse: $database)." diff --git a/bin/v-restore-user b/bin/v-restore-user index 994906d97..701718392 100755 --- a/bin/v-restore-user +++ b/bin/v-restore-user @@ -31,23 +31,22 @@ fi # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/backup.sh -source $HESTIA/func/backup.sh +source $TULIO/func/backup.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # shellcheck source=/usr/local/tulio/func/db.sh -source $HESTIA/func/db.sh +source $TULIO/func/db.sh # shellcheck source=/usr/local/tulio/func/rebuild.sh -source $HESTIA/func/rebuild.sh +source $TULIO/func/rebuild.sh # shellcheck source=/usr/local/tulio/func/syshealth.sh -source $HESTIA/func/syshealth.sh +source $TULIO/func/syshealth.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -104,14 +103,14 @@ if [ -z "$check_user" ]; then email=$(get_user_value '$CONTACT') else create_user="yes" - email=$(grep CONTACT "$HESTIA/data/users/$ROOT_USER/user.conf" | cut -f2 -d \') + email=$(grep CONTACT "$TULIO/data/users/$ROOT_USER/user.conf" | cut -f2 -d \') fi # Checking available disk space disk_usage=$(df $BACKUP | tail -n1 | tr ' ' '\n' | grep % | cut -f 1 -d %) if [ "$disk_usage" -ge "$BACKUP_DISK_LIMIT" ]; then echo "Error: Not enough disk space" | $SENDMAIL -s "$subj" $email $notify - sed -i "/ $user /d" $HESTIA/data/queue/backup.pipe + sed -i "/ $user /d" $TULIO/data/queue/backup.pipe check_result "$E_DISK" "Not enough disk space" fi @@ -124,7 +123,7 @@ while [ "$la" -ge "$BACKUP_LA_LIMIT" ]; do if [ "$i" -ge "15" ]; then la_error="LoadAverage $la is above threshold" echo "Error: $la_error" | $SENDMAIL -s "$subj" $email $notify - sed -i "/ $user /d" $HESTIA/data/queue/backup.pipe + sed -i "/ $user /d" $TULIO/data/queue/backup.pipe check_result "$E_LA" "$la_error" fi la=$(cat /proc/loadavg | cut -f 1 -d ' ' | cut -f 1 -d '.') @@ -139,7 +138,7 @@ fi tmpdir=$(mktemp -p $BACKUP_TEMP -d) if [ "$?" -ne 0 ]; then echo "Can't create tmp dir $tmpdir" | $SENDMAIL -s "$subj" $email $notify - sed -i "/ $user /d" $HESTIA/data/queue/backup.pipe + sed -i "/ $user /d" $TULIO/data/queue/backup.pipe check_result "$E_NOTEXIST" "Can't create tmp dir" fi @@ -173,7 +172,7 @@ if [ "$create_user" = 'yes' ]; then if [ "$?" -ne 0 ]; then rm -rf $tmpdir echo "Can't unpack user container" | $SENDMAIL -s "$subj" $email $notify - sed -i "/ $user /d" $HESTIA/data/queue/backup.pipe + sed -i "/ $user /d" $TULIO/data/queue/backup.pipe check_result "$E_PARSING" "Can't unpack user container" fi @@ -193,7 +192,7 @@ tar xf $BACKUP/$backup -C $tmpdir ./pam if [ "$?" -ne 0 ]; then rm -rf $tmpdir echo "Can't unpack PAM container" | $SENDMAIL -s "$subj" $email $notify - sed -i "/ $user /d" $HESTIA/data/queue/backup.pipe + sed -i "/ $user /d" $TULIO/data/queue/backup.pipe check_result "$E_PARSING" "Can't unpack PAM container" fi old_user=$(cut -f 1 -d : $tmpdir/pam/passwd) @@ -234,7 +233,7 @@ if [ "$web" != 'no' ] && [ -n "$WEB_SYSTEM" ]; then rm -rf $tmpdir error="$domain belongs to another user" echo "$error" | $SENDMAIL -s "$subj" $email $notify - sed -i "/ $user /d" $HESTIA/data/queue/backup.pipe + sed -i "/ $user /d" $TULIO/data/queue/backup.pipe check_result "$E_PARSING" "$error" fi fi @@ -245,7 +244,7 @@ if [ "$web" != 'no' ] && [ -n "$WEB_SYSTEM" ]; then rm -rf $tmpdir error="Can't unpack $domain web container" echo "$error" | $SENDMAIL -s "$subj" $email $notify - sed -i "/ $user /d" $HESTIA/data/queue/backup.pipe + sed -i "/ $user /d" $TULIO/data/queue/backup.pipe check_result "$E_PARSING" "$error" fi @@ -386,7 +385,7 @@ if [ "$web" != 'no' ] && [ -n "$WEB_SYSTEM" ]; then rm -rf $tmpdir error="Can't unpack $domain data tarball" echo "$error" | $SENDMAIL -s "$subj" $email $notify - sed -i "/ $user /d" $HESTIA/data/queue/backup.pipe + sed -i "/ $user /d" $TULIO/data/queue/backup.pipe check_result "$E_PARSING" "$error" fi @@ -401,8 +400,8 @@ if [ "$web" != 'no' ] && [ -n "$WEB_SYSTEM" ]; then done # Adding user to traffic queue - sed -i "/ $user /d" $HESTIA/data/queue/traffic.pipe - echo "$BIN/v-update-web-domains-traff $user" >> $HESTIA/data/queue/traffic.pipe + sed -i "/ $user /d" $TULIO/data/queue/traffic.pipe + echo "$BIN/v-update-web-domains-traff $user" >> $TULIO/data/queue/traffic.pipe # Restarting web server $BIN/v-restart-web @@ -443,7 +442,7 @@ if [ "$dns" != 'no' ] && [ -n "$DNS_SYSTEM" ]; then rm -rf $tmpdir error="$domain belongs to another user" echo "$error" | $SENDMAIL -s "$subj" $email $notify - sed -i "/ $user /d" $HESTIA/data/queue/backup.pipe + sed -i "/ $user /d" $TULIO/data/queue/backup.pipe check_result "$E_PARSING" "$error" fi fi @@ -454,7 +453,7 @@ if [ "$dns" != 'no' ] && [ -n "$DNS_SYSTEM" ]; then rm -rf $tmpdir error="Can't unpack $domain dns container" echo "$error" | $SENDMAIL -s "$subj" $email $notify - sed -i "/ $user /d" $HESTIA/data/queue/backup.pipe + sed -i "/ $user /d" $TULIO/data/queue/backup.pipe check_result "$E_PARSING" "$error" fi @@ -507,7 +506,7 @@ if [ "$dns" != 'no' ] && [ -n "$DNS_SYSTEM" ]; then # Updating dns-cluster queue if [ -n "$DNS_CLUSTER" ]; then cmd="$BIN/v-add-remote-dns-domain $user $domain yes" - echo "$cmd" >> $HESTIA/data/queue/dns-cluster.pipe + echo "$cmd" >> $TULIO/data/queue/dns-cluster.pipe fi done @@ -550,7 +549,7 @@ if [ "$mail" != 'no' ] && [ -n "$MAIL_SYSTEM" ]; then rm -rf $tmpdir error="$domain belongs to another user" echo "$error" | $SENDMAIL -s "$subj" $email $notify - sed -i "/ $user /d" $HESTIA/data/queue/backup.pipe + sed -i "/ $user /d" $TULIO/data/queue/backup.pipe check_result "$E_PARSING" "$error" fi fi @@ -562,7 +561,7 @@ if [ "$mail" != 'no' ] && [ -n "$MAIL_SYSTEM" ]; then rm -rf $tmpdir error="Can't unpack $domain mail container" echo "$error" | $SENDMAIL -s "$subj" $email $notify - sed -i "/ $user /d" $HESTIA/data/queue/backup.pipe + sed -i "/ $user /d" $TULIO/data/queue/backup.pipe check_result "$E_PARSING" "$error" fi @@ -580,8 +579,8 @@ if [ "$mail" != 'no' ] && [ -n "$MAIL_SYSTEM" ]; then # Restore SSL check_config=$(grep "DOMAIN='$domain'" $USER_DATA/mail.conf | grep -o "SSL='yes'") if [ -n "$check_config" ]; then - if [ ! -e "$HESTIA/data/users/$user/ssl/" ]; then - mkdir -p $HESTIA/data/users/$user/ssl/ + if [ ! -e "$TULIO/data/users/$user/ssl/" ]; then + mkdir -p $TULIO/data/users/$user/ssl/ fi if [ ! -e "$HOMEDIR/$user/conf/mail/$domain/ssl/" ]; then @@ -677,7 +676,7 @@ if [ "$mail" != 'no' ] && [ -n "$MAIL_SYSTEM" ]; then rm -rf $tmpdir error="Can't unpack $domain mail account container" echo "$error" | $SENDMAIL -s "$subj" $email $notify - sed -i "/ $user /d" $HESTIA/data/queue/backup.pipe + sed -i "/ $user /d" $TULIO/data/queue/backup.pipe check_result "$E_PARSING" "$error" fi @@ -692,7 +691,7 @@ if [ "$mail" != 'no' ] && [ -n "$MAIL_SYSTEM" ]; then rm -rf $tmpdir error="Can't unpack $domain mail account container" echo "$error" | $SENDMAIL -s "$subj" $email $notify - sed -i "/ $user /d" $HESTIA/data/queue/backup.pipe + sed -i "/ $user /d" $TULIO/data/queue/backup.pipe check_result "$E_PARSING" "$error" fi @@ -751,7 +750,7 @@ if [ "$db" != 'no' ] && [ -n "$DB_SYSTEM" ]; then rm -rf $tmpdir error="Can't unpack $database database container" echo "$error" | $SENDMAIL -s "$subj" $email $notify - sed -i "/ $user /d" $HESTIA/data/queue/backup.pipe + sed -i "/ $user /d" $TULIO/data/queue/backup.pipe check_result "$E_PARSING" "$error" fi @@ -810,7 +809,7 @@ if [ "$cron" != 'no' ] && [ -n "$CRON_SYSTEM" ]; then rm -rf $tmpdir error="Can't unpack cron container" echo "$error" | $SENDMAIL -s "$subj" $email $notify - sed -i "/ $user /d" $HESTIA/data/queue/backup.pipe + sed -i "/ $user /d" $TULIO/data/queue/backup.pipe check_result "$E_PARSING" "$error" fi @@ -874,7 +873,7 @@ if [ "$udir" != 'no' ]; then rm -rf $tmpdir error="Can't unpack $user_dir user dir container" echo "$error" | $SENDMAIL -s "$subj" $email $notify - sed -i "/ $user /d" $HESTIA/data/queue/backup.pipe + sed -i "/ $user /d" $TULIO/data/queue/backup.pipe check_result "$E_PARSING" "$error" fi @@ -892,7 +891,7 @@ if [ "$udir" != 'no' ]; then rm -rf $tmpdir error="Can't unpack $user_dir user dir container" echo "$error" | $SENDMAIL -s "$subj" $email $notify - sed -i "/ $user /d" $HESTIA/data/queue/backup.pipe + sed -i "/ $user /d" $TULIO/data/queue/backup.pipe check_result "$E_PARSING" "$error" fi @@ -924,7 +923,7 @@ $BIN/v-add-user-notification "$user" "Backup restored successfully" "

> $HESTIA/data/queue/letsencrypt.pipe + >> $TULIO/data/queue/letsencrypt.pipe #----------------------------------------------------------# # TulioCP # diff --git a/bin/v-schedule-user-backup b/bin/v-schedule-user-backup index b14c63615..461ea04f2 100755 --- a/bin/v-schedule-user-backup +++ b/bin/v-schedule-user-backup @@ -17,11 +17,10 @@ user=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -42,8 +41,8 @@ check_tulio_demo_mode #----------------------------------------------------------# # Adding backup task to the queue -log=$HESTIA/log/backup.log -echo "$BIN/v-backup-user $user yes >> $log 2>&1" >> $HESTIA/data/queue/backup.pipe +log=$TULIO/log/backup.log +echo "$BIN/v-backup-user $user yes >> $log 2>&1" >> $TULIO/data/queue/backup.pipe #----------------------------------------------------------# # TulioCP # diff --git a/bin/v-schedule-user-backup-download b/bin/v-schedule-user-backup-download index 8e06a32c3..6b83097e3 100755 --- a/bin/v-schedule-user-backup-download +++ b/bin/v-schedule-user-backup-download @@ -18,15 +18,14 @@ backup=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/db.sh -source $HESTIA/func/db.sh +source $TULIO/func/db.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -43,7 +42,7 @@ check_tulio_demo_mode #----------------------------------------------------------# # Adding backup task to the queue -echo "$BIN/v-download-backup $user $backup 2>&1" >> $HESTIA/data/queue/backup.pipe +echo "$BIN/v-download-backup $user $backup 2>&1" >> $TULIO/data/queue/backup.pipe #----------------------------------------------------------# # TulioCP # diff --git a/bin/v-schedule-user-backup-restic b/bin/v-schedule-user-backup-restic index 06262ba16..15475b725 100755 --- a/bin/v-schedule-user-backup-restic +++ b/bin/v-schedule-user-backup-restic @@ -17,11 +17,10 @@ user=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -43,8 +42,8 @@ check_tulio_demo_mode #----------------------------------------------------------# # Adding backup task to the queue -log=$HESTIA/log/backup.log -echo "$BIN/v-backup-user-restic $user yes >> $log 2>&1" >> $HESTIA/data/queue/backup.pipe +log=$TULIO/log/backup.log +echo "$BIN/v-backup-user-restic $user yes >> $log 2>&1" >> $TULIO/data/queue/backup.pipe #----------------------------------------------------------# # TulioCP # diff --git a/bin/v-schedule-user-restore b/bin/v-schedule-user-restore index fde3a1e98..73afad4b5 100755 --- a/bin/v-schedule-user-restore +++ b/bin/v-schedule-user-restore @@ -24,11 +24,10 @@ udir=$8 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -49,9 +48,9 @@ check_tulio_demo_mode #----------------------------------------------------------# # Adding restore task to the queue -log=$HESTIA/log/restore.log +log=$TULIO/log/restore.log options="'$web' '$dns' '$mail' '$db' '$cron' '$udir'" -echo "$BIN/v-restore-user $user $backup $options yes >> $log 2>&1" >> $HESTIA/data/queue/backup.pipe +echo "$BIN/v-restore-user $user $backup $options yes >> $log 2>&1" >> $TULIO/data/queue/backup.pipe #----------------------------------------------------------# # TulioCP # diff --git a/bin/v-schedule-user-restore-restic b/bin/v-schedule-user-restore-restic index 02e9ebd34..c625e1859 100755 --- a/bin/v-schedule-user-restore-restic +++ b/bin/v-schedule-user-restore-restic @@ -20,11 +20,10 @@ value=$4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -43,21 +42,21 @@ check_tulio_demo_mode # Action # #----------------------------------------------------------# -log=$HESTIA/log/restore.log +log=$TULIO/log/restore.log if [ -z "$object" ]; then - echo "$BIN/v-restore-user-restic '$user' '$snapshot' '' '' '' '' '' '' 'yes' >> $log 2>&1" >> $HESTIA/data/queue/backup.pipe + echo "$BIN/v-restore-user-restic '$user' '$snapshot' '' '' '' '' '' '' 'yes' >> $log 2>&1" >> $TULIO/data/queue/backup.pipe else if [ "$object" = "web" ]; then - echo "$BIN/v-restore-web-domain-restic '$user' '$snapshot' '$value' 'yes' >> $log 2>&1" >> $HESTIA/data/queue/backup.pipe + echo "$BIN/v-restore-web-domain-restic '$user' '$snapshot' '$value' 'yes' >> $log 2>&1" >> $TULIO/data/queue/backup.pipe elif [ "$object" = "dns" ]; then - echo "$BIN/v-restore-dns-domain-restic '$user' '$snapshot' '$value' 'yes' >> $log 2>&1" >> $HESTIA/data/queue/backup.pipe + echo "$BIN/v-restore-dns-domain-restic '$user' '$snapshot' '$value' 'yes' >> $log 2>&1" >> $TULIO/data/queue/backup.pipe elif [ "$object" = "mail" ]; then - echo "$BIN/v-restore-mail-domain-restic '$user' '$snapshot' '$value' 'yes' >> $log 2>&1" >> $HESTIA/data/queue/backup.pipe + echo "$BIN/v-restore-mail-domain-restic '$user' '$snapshot' '$value' 'yes' >> $log 2>&1" >> $TULIO/data/queue/backup.pipe elif [ "$object" = "db" ]; then - echo "$BIN/v-restore-database-restic '$user' '$snapshot' '$value' 'yes' >> $log 2>&1" >> $HESTIA/data/queue/backup.pipe + echo "$BIN/v-restore-database-restic '$user' '$snapshot' '$value' 'yes' >> $log 2>&1" >> $TULIO/data/queue/backup.pipe elif [ "$object" = "cron" ]; then - echo "$BIN/v-restore-cron-restic '$user' '$snapshot' 'yes' >> $log 2>&1" >> $HESTIA/data/queue/backup.pipe + echo "$BIN/v-restore-cron-restic '$user' '$snapshot' 'yes' >> $log 2>&1" >> $TULIO/data/queue/backup.pipe else check_result "$E_INVALID" "Not supported" fi diff --git a/bin/v-search-command b/bin/v-search-command index 8e7d1ebc9..9813e9eb6 100755 --- a/bin/v-search-command +++ b/bin/v-search-command @@ -17,11 +17,10 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-search-domain-owner b/bin/v-search-domain-owner index 82e54df21..36f36b94c 100755 --- a/bin/v-search-domain-owner +++ b/bin/v-search-domain-owner @@ -18,11 +18,10 @@ type=${2-any} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -41,10 +40,10 @@ check_tulio_demo_mode # Define conf case $type in - web) conf="$HESTIA/data/users/*/web.conf" ;; - dns) conf="$HESTIA/data/users/*/dns.conf" ;; - mail) conf="$HESTIA/data/users/*/mail.conf" ;; - *) conf="$HESTIA/data/users/*/*.conf" ;; + web) conf="$TULIO/data/users/*/web.conf" ;; + dns) conf="$TULIO/data/users/*/dns.conf" ;; + mail) conf="$TULIO/data/users/*/mail.conf" ;; + *) conf="$TULIO/data/users/*/*.conf" ;; esac owner=$(grep -H "DOMAIN='$domain'" $conf | head -n 1 | cut -f7 -d '/') diff --git a/bin/v-search-fs-object b/bin/v-search-fs-object index 38eac90e5..4deaa06ea 100755 --- a/bin/v-search-fs-object +++ b/bin/v-search-fs-object @@ -18,11 +18,10 @@ path=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-search-object b/bin/v-search-object index 838487f0c..9ead07de1 100755 --- a/bin/v-search-object +++ b/bin/v-search-object @@ -18,13 +18,12 @@ format=${2-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio.conf/tulio.conf -source $HESTIA/conf/tulio.conf +source $TULIO/conf/tulio.conf # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Perform verification if read-only mode is enabled check_tulio_demo_mode @@ -98,13 +97,13 @@ IFS=$'\n' for user in $("$BIN/v-list-users" list); do # Search query search=$(grep "$object" \ - $HESTIA/data/users/$user/web.conf \ - $HESTIA/data/users/$user/dns.conf \ - $HESTIA/data/users/$user/dns/*.conf \ - $HESTIA/data/users/$user/mail.conf \ - $HESTIA/data/users/$user/mail/*.conf \ - $HESTIA/data/users/$user/db.conf \ - $HESTIA/data/users/$user/cron.conf 2> /dev/null) + $TULIO/data/users/$user/web.conf \ + $TULIO/data/users/$user/dns.conf \ + $TULIO/data/users/$user/dns/*.conf \ + $TULIO/data/users/$user/mail.conf \ + $TULIO/data/users/$user/mail/*.conf \ + $TULIO/data/users/$user/db.conf \ + $TULIO/data/users/$user/cron.conf 2> /dev/null) for row in $search; do # Initialise variable diff --git a/bin/v-search-user-object b/bin/v-search-user-object index a7a094f44..3cfdc285f 100755 --- a/bin/v-search-user-object +++ b/bin/v-search-user-object @@ -19,11 +19,10 @@ format=${3-shell} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Perform verification if read-only mode is enabled check_tulio_demo_mode @@ -96,13 +95,13 @@ IFS=$'\n' # Search query search=$(grep "$object" \ - $HESTIA/data/users/$user/web.conf \ - $HESTIA/data/users/$user/dns.conf \ - $HESTIA/data/users/$user/dns/*.conf \ - $HESTIA/data/users/$user/mail.conf \ - $HESTIA/data/users/$user/mail/*.conf \ - $HESTIA/data/users/$user/db.conf \ - $HESTIA/data/users/$user/cron.conf 2> /dev/null) + $TULIO/data/users/$user/web.conf \ + $TULIO/data/users/$user/dns.conf \ + $TULIO/data/users/$user/dns/*.conf \ + $TULIO/data/users/$user/mail.conf \ + $TULIO/data/users/$user/mail/*.conf \ + $TULIO/data/users/$user/db.conf \ + $TULIO/data/users/$user/cron.conf 2> /dev/null) for row in $search; do # Initialise variable diff --git a/bin/v-start-service b/bin/v-start-service index 292095623..dd7518d43 100755 --- a/bin/v-start-service +++ b/bin/v-start-service @@ -17,11 +17,10 @@ service=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-stop-firewall b/bin/v-stop-firewall index 560435097..87e6fac9d 100755 --- a/bin/v-stop-firewall +++ b/bin/v-stop-firewall @@ -17,13 +17,12 @@ iptables="/sbin/iptables" # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/firewall.sh -source $HESTIA/func/firewall.sh +source $TULIO/func/firewall.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -51,7 +50,7 @@ echo "$iptables -X tulio" >> $tmp # Deleting custom chains IFS=$'\n' -for chain in $(cat $HESTIA/data/firewall/chains.conf 2> /dev/null); do +for chain in $(cat $TULIO/data/firewall/chains.conf 2> /dev/null); do parse_object_kv_list "$chain" echo "$iptables -F fail2ban-$CHAIN" >> $tmp echo "$iptables -X fail2ban-$CHAIN" >> $tmp @@ -81,7 +80,7 @@ else echo "[Service]" >> $sd_unit echo "Type=oneshot" >> $sd_unit echo "RemainAfterExit=yes" >> $sd_unit - echo "ExecStartPre=-${HESTIA}/bin/v-update-firewall-ipset load" >> $sd_unit + echo "ExecStartPre=-${TULIO}/bin/v-update-firewall-ipset load" >> $sd_unit if [ "$iptablesversion" = "v1.6" ]; then echo "ExecStart=/sbin/iptables-restore /etc/iptables.rules" >> $sd_unit else diff --git a/bin/v-stop-service b/bin/v-stop-service index a27f290d6..47beb49f1 100755 --- a/bin/v-stop-service +++ b/bin/v-stop-service @@ -17,11 +17,10 @@ service=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-suspend-cron-job b/bin/v-suspend-cron-job index b6708ec60..d3da3a762 100755 --- a/bin/v-suspend-cron-job +++ b/bin/v-suspend-cron-job @@ -19,11 +19,10 @@ restart=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-suspend-cron-jobs b/bin/v-suspend-cron-jobs index 0afcc2dda..78ce8c460 100755 --- a/bin/v-suspend-cron-jobs +++ b/bin/v-suspend-cron-jobs @@ -18,11 +18,10 @@ restart=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-suspend-database b/bin/v-suspend-database index a3d02d612..7071a9755 100755 --- a/bin/v-suspend-database +++ b/bin/v-suspend-database @@ -18,13 +18,12 @@ database=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/db.sh -source $HESTIA/func/db.sh +source $TULIO/func/db.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-suspend-database-host b/bin/v-suspend-database-host index 95c60e3f1..b6372d1c7 100755 --- a/bin/v-suspend-database-host +++ b/bin/v-suspend-database-host @@ -18,11 +18,10 @@ host=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-suspend-databases b/bin/v-suspend-databases index b0ddf4726..eabfdab76 100755 --- a/bin/v-suspend-databases +++ b/bin/v-suspend-databases @@ -17,11 +17,10 @@ user=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-suspend-dns-domain b/bin/v-suspend-dns-domain index 972fce5a5..80446ad69 100755 --- a/bin/v-suspend-dns-domain +++ b/bin/v-suspend-dns-domain @@ -20,11 +20,10 @@ restart="$3" # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-suspend-dns-domains b/bin/v-suspend-dns-domains index ef1f0afbd..4a7bd8707 100755 --- a/bin/v-suspend-dns-domains +++ b/bin/v-suspend-dns-domains @@ -18,11 +18,10 @@ restart=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-suspend-dns-record b/bin/v-suspend-dns-record index 1fb8157fa..28c1462b5 100755 --- a/bin/v-suspend-dns-record +++ b/bin/v-suspend-dns-record @@ -21,13 +21,12 @@ restart=$4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain @@ -67,10 +66,10 @@ fi # Updating dns-cluster queue if [ "$DNS_CLUSTER" = "yes" ]; then # Check for first sync - dlock=$(grep "domain $user $domain" $HESTIA/data/queue/dns-cluster.pipe) + dlock=$(grep "domain $user $domain" $TULIO/data/queue/dns-cluster.pipe) if [ -z "$dlock" ]; then cmd="$BIN/v-add-remote-dns-record $user $domain $id" - echo "$cmd" >> $HESTIA/data/queue/dns-cluster.pipe + echo "$cmd" >> $TULIO/data/queue/dns-cluster.pipe fi fi diff --git a/bin/v-suspend-domain b/bin/v-suspend-domain index 1996d4e6d..f678b37a2 100755 --- a/bin/v-suspend-domain +++ b/bin/v-suspend-domain @@ -19,11 +19,10 @@ restart="${3-yes}" # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-suspend-firewall-rule b/bin/v-suspend-firewall-rule index 1e0785687..ec140cb97 100755 --- a/bin/v-suspend-firewall-rule +++ b/bin/v-suspend-firewall-rule @@ -17,11 +17,10 @@ rule=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-suspend-mail-account b/bin/v-suspend-mail-account index cf2c11703..728e2ff4a 100755 --- a/bin/v-suspend-mail-account +++ b/bin/v-suspend-mail-account @@ -20,13 +20,12 @@ account=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-suspend-mail-accounts b/bin/v-suspend-mail-accounts index bbc897156..306fc45f7 100755 --- a/bin/v-suspend-mail-accounts +++ b/bin/v-suspend-mail-accounts @@ -19,11 +19,10 @@ domain_idn=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-suspend-mail-domain b/bin/v-suspend-mail-domain index 787b38638..887f0d960 100755 --- a/bin/v-suspend-mail-domain +++ b/bin/v-suspend-mail-domain @@ -19,13 +19,12 @@ domain_idn=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-suspend-mail-domains b/bin/v-suspend-mail-domains index 9d4811243..877e28e24 100755 --- a/bin/v-suspend-mail-domains +++ b/bin/v-suspend-mail-domains @@ -17,13 +17,12 @@ user=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-suspend-remote-dns-host b/bin/v-suspend-remote-dns-host index 25e70a509..81031d77f 100755 --- a/bin/v-suspend-remote-dns-host +++ b/bin/v-suspend-remote-dns-host @@ -17,11 +17,10 @@ host=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-suspend-user b/bin/v-suspend-user index 5664dad73..b7cad6347 100755 --- a/bin/v-suspend-user +++ b/bin/v-suspend-user @@ -18,11 +18,10 @@ restart=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-suspend-web-domain b/bin/v-suspend-web-domain index c76261751..18d672f72 100755 --- a/bin/v-suspend-web-domain +++ b/bin/v-suspend-web-domain @@ -22,15 +22,14 @@ restart=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-suspend-web-domains b/bin/v-suspend-web-domains index 7e32c9253..1aeb40394 100755 --- a/bin/v-suspend-web-domains +++ b/bin/v-suspend-web-domains @@ -18,13 +18,12 @@ restart=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-sync-dns-cluster b/bin/v-sync-dns-cluster index 6c42c36c3..4046799a8 100755 --- a/bin/v-sync-dns-cluster +++ b/bin/v-sync-dns-cluster @@ -15,13 +15,12 @@ host=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/remote.sh -source $HESTIA/func/remote.sh +source $TULIO/func/remote.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -42,9 +41,9 @@ check_tulio_demo_mode # Selecting remote hosts IFS=$'\n' if [ -z $host ]; then - hosts=$(cat $HESTIA/conf/dns-cluster.conf | grep "SUSPENDED='no'") + hosts=$(cat $TULIO/conf/dns-cluster.conf | grep "SUSPENDED='no'") else - hosts=$(grep "HOST='$host'" $HESTIA/conf/dns-cluster.conf) + hosts=$(grep "HOST='$host'" $TULIO/conf/dns-cluster.conf) fi # Starting cluster loop @@ -61,12 +60,12 @@ for cluster in $hosts; do check_result $? "$HOST connection failed" $E_CONNECT # Syncing user domains - user_list=$(ls -d $HESTIA/data/users/*/ | sed "s#$HESTIA/data/users/##" | sed s"/.$//" | grep -v "dns-cluster") + user_list=$(ls -d $TULIO/data/users/*/ | sed "s#$TULIO/data/users/##" | sed s"/.$//" | grep -v "dns-cluster") for user in $user_list; do - USER_DATA="$HESTIA/data/users/$user" + USER_DATA="$TULIO/data/users/$user" ROLE=$(get_user_value '$ROLE') if [ "$ROLE" != "dns-cluster" ]; then - for str in $(cat $HESTIA/data/users/$user/dns.conf); do + for str in $(cat $TULIO/data/users/$user/dns.conf); do unset $SLAVE parse_object_kv_list "$str" if [ "$SLAVE" != "yes" ]; then @@ -78,7 +77,7 @@ for cluster in $hosts; do # Syncing domain records tmp_file="/tmp/vst-sync.$DOMAIN" - cluster_file "$HESTIA/data/users/$user/dns/$DOMAIN.conf" "$tmp_file" + cluster_file "$TULIO/data/users/$user/dns/$DOMAIN.conf" "$tmp_file" check_result $? "$HOST connection failed" "$E_CONNECT" cluster_cmd v-insert-dns-records "$DNS_USER" "$DOMAIN" "$tmp_file" 'no' @@ -89,7 +88,7 @@ for cluster in $hosts; do str=$(echo "$str" | sed "s/SLAVE=''/SLAVE='yes'/g") ip=$(ip addr | grep 'inet ' | grep global | head -n1 | awk '{print $2}' | cut -f1 -d/) - source_conf $HESTIA/data/ips/$ip + source_conf $TULIO/data/ips/$ip if [ -z $NAT ]; then str=$(echo "$str" | sed "s/MASTER=''/MASTER='$ip'/g") else @@ -119,8 +118,8 @@ done #----------------------------------------------------------# # Flushing dns-cluster queue -rm -f $HESTIA/data/queue/dns-cluster.pipe -touch $HESTIA/data/queue/dns-cluster.pipe -chmod 660 $HESTIA/data/queue/dns-cluster.pipe +rm -f $TULIO/data/queue/dns-cluster.pipe +touch $TULIO/data/queue/dns-cluster.pipe +chmod 660 $TULIO/data/queue/dns-cluster.pipe exit diff --git a/bin/v-unsuspend-cron-job b/bin/v-unsuspend-cron-job index 389a64662..c2b3debb5 100755 --- a/bin/v-unsuspend-cron-job +++ b/bin/v-unsuspend-cron-job @@ -19,11 +19,10 @@ restart="${3-yes}" # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-unsuspend-cron-jobs b/bin/v-unsuspend-cron-jobs index f318fe458..cd9b405fa 100755 --- a/bin/v-unsuspend-cron-jobs +++ b/bin/v-unsuspend-cron-jobs @@ -18,11 +18,10 @@ restart=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-unsuspend-database b/bin/v-unsuspend-database index 467761be5..f084b1bf7 100755 --- a/bin/v-unsuspend-database +++ b/bin/v-unsuspend-database @@ -18,13 +18,12 @@ database=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/db.sh -source $HESTIA/func/db.sh +source $TULIO/func/db.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-unsuspend-database-host b/bin/v-unsuspend-database-host index f9e45f6f7..d6c1cb126 100755 --- a/bin/v-unsuspend-database-host +++ b/bin/v-unsuspend-database-host @@ -18,11 +18,10 @@ host=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-unsuspend-databases b/bin/v-unsuspend-databases index 0507c6a0f..478bd687e 100755 --- a/bin/v-unsuspend-databases +++ b/bin/v-unsuspend-databases @@ -15,13 +15,12 @@ user=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/db.sh -source $HESTIA/func/db.sh +source $TULIO/func/db.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-unsuspend-dns-domain b/bin/v-unsuspend-dns-domain index db4087f4e..76ba9394d 100755 --- a/bin/v-unsuspend-dns-domain +++ b/bin/v-unsuspend-dns-domain @@ -19,11 +19,10 @@ domain_idn=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-unsuspend-dns-domains b/bin/v-unsuspend-dns-domains index 75ff8477f..0908c8c36 100755 --- a/bin/v-unsuspend-dns-domains +++ b/bin/v-unsuspend-dns-domains @@ -18,11 +18,10 @@ restart=${3-no} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-unsuspend-dns-record b/bin/v-unsuspend-dns-record index 0ee1d1238..a6d764eb2 100755 --- a/bin/v-unsuspend-dns-record +++ b/bin/v-unsuspend-dns-record @@ -21,13 +21,12 @@ restart=$4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain @@ -66,10 +65,10 @@ fi # Updating dns-cluster queue if [ "$DNS_CLUSTER" = "yes" ]; then # Check for first sync - dlock=$(grep "domain $user $domain" $HESTIA/data/queue/dns-cluster.pipe) + dlock=$(grep "domain $user $domain" $TULIO/data/queue/dns-cluster.pipe) if [ -z "$dlock" ]; then cmd="$BIN/v-add-remote-dns-record $user $domain $id" - echo "$cmd" >> $HESTIA/data/queue/dns-cluster.pipe + echo "$cmd" >> $TULIO/data/queue/dns-cluster.pipe fi fi diff --git a/bin/v-unsuspend-domain b/bin/v-unsuspend-domain index c4d7b128e..e847ecf9a 100755 --- a/bin/v-unsuspend-domain +++ b/bin/v-unsuspend-domain @@ -19,11 +19,10 @@ restart="${3-yes}" # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-unsuspend-firewall-rule b/bin/v-unsuspend-firewall-rule index ebdd1be5b..d0744a6a0 100755 --- a/bin/v-unsuspend-firewall-rule +++ b/bin/v-unsuspend-firewall-rule @@ -17,11 +17,10 @@ rule=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-unsuspend-mail-account b/bin/v-unsuspend-mail-account index dc9a8978c..812ba0b12 100755 --- a/bin/v-unsuspend-mail-account +++ b/bin/v-unsuspend-mail-account @@ -20,13 +20,12 @@ account=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-unsuspend-mail-accounts b/bin/v-unsuspend-mail-accounts index 241db981e..9fa5a48f9 100755 --- a/bin/v-unsuspend-mail-accounts +++ b/bin/v-unsuspend-mail-accounts @@ -19,11 +19,10 @@ domain_idn=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-unsuspend-mail-domain b/bin/v-unsuspend-mail-domain index 406796ef2..019af057f 100755 --- a/bin/v-unsuspend-mail-domain +++ b/bin/v-unsuspend-mail-domain @@ -20,13 +20,12 @@ restart=${3-yes} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-unsuspend-mail-domains b/bin/v-unsuspend-mail-domains index 71e6432f6..35387d1dc 100755 --- a/bin/v-unsuspend-mail-domains +++ b/bin/v-unsuspend-mail-domains @@ -17,13 +17,12 @@ user=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-unsuspend-remote-dns-host b/bin/v-unsuspend-remote-dns-host index 1cbae21c6..82f872e24 100755 --- a/bin/v-unsuspend-remote-dns-host +++ b/bin/v-unsuspend-remote-dns-host @@ -17,11 +17,10 @@ host=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-unsuspend-user b/bin/v-unsuspend-user index a15a85554..698603af0 100755 --- a/bin/v-unsuspend-user +++ b/bin/v-unsuspend-user @@ -18,11 +18,10 @@ restart=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-unsuspend-web-domain b/bin/v-unsuspend-web-domain index 5117c4bc0..0fc2c209b 100755 --- a/bin/v-unsuspend-web-domain +++ b/bin/v-unsuspend-web-domain @@ -20,15 +20,14 @@ restart=$3 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-unsuspend-web-domains b/bin/v-unsuspend-web-domains index 9d8ccaeb2..c7d537cd3 100755 --- a/bin/v-unsuspend-web-domains +++ b/bin/v-unsuspend-web-domains @@ -18,13 +18,12 @@ restart=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-update-database-disk b/bin/v-update-database-disk index e1c316e07..eb869b35c 100755 --- a/bin/v-update-database-disk +++ b/bin/v-update-database-disk @@ -18,13 +18,12 @@ database=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/db.sh -source $HESTIA/func/db.sh +source $TULIO/func/db.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-update-databases-disk b/bin/v-update-databases-disk index 6e586d333..fd9483bae 100755 --- a/bin/v-update-databases-disk +++ b/bin/v-update-databases-disk @@ -17,11 +17,10 @@ user=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-update-dns-templates b/bin/v-update-dns-templates index df85b1909..1f7dbc90b 100755 --- a/bin/v-update-dns-templates +++ b/bin/v-update-dns-templates @@ -17,11 +17,10 @@ restart=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Perform verification if read-only mode is enabled check_tulio_demo_mode @@ -37,7 +36,7 @@ is_format_valid 'restart' #----------------------------------------------------------# # Update templates -cp -rf $HESTIA_COMMON_DIR/templates/dns $HESTIA/data/templates/ +cp -rf $TULIO_COMMON_DIR/templates/dns $TULIO/data/templates/ #----------------------------------------------------------# # TulioCP # diff --git a/bin/v-update-firewall b/bin/v-update-firewall index 0f0a4ea2d..6be8c317c 100755 --- a/bin/v-update-firewall +++ b/bin/v-update-firewall @@ -20,13 +20,12 @@ source /etc/profile.d/tulio.sh # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source "$HESTIA/func/main.sh" +source "$TULIO/func/main.sh" # shellcheck source=/usr/local/tulio/func/firewall.sh -source "$HESTIA/func/firewall.sh" +source "$TULIO/func/firewall.sh" # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -42,7 +41,7 @@ is_system_enabled "$FIREWALL_SYSTEM" 'FIREWALL_SYSTEM' heal_iptables_links # Checking local IPv4 rules -rules="$HESTIA/data/firewall/rules.conf" +rules="$TULIO/data/firewall/rules.conf" if [ ! -e "$rules" ]; then exit @@ -62,8 +61,8 @@ if [ $? -ne 0 ]; then conntrack_ftp='no' fi -chains="$HESTIA/data/firewall/chains.conf" -banlist="$HESTIA/data/firewall/banlist.conf" +chains="$TULIO/data/firewall/chains.conf" +banlist="$TULIO/data/firewall/banlist.conf" # Checking custom OpenSSH port (or ports) sshport="$($BIN/v-list-sys-sshd-port plain | sed ':a;N;$!ba;s/\n/,/g')" @@ -93,7 +92,7 @@ if [ "$conntrack" != 'no' ] || grep --quiet container=lxc /proc/1/environ; then echo "$str" >> "$tmp" fi -ips="$(ls $HESTIA/data/ips)" +ips="$(ls $TULIO/data/ips)" # Handling local traffic for ip in $ips; do echo "$iptables -A INPUT -s $ip -j ACCEPT" >> "$tmp" @@ -157,8 +156,8 @@ bash "$tmp" 2> /dev/null rm -f "$tmp" # Checking custom trigger -if [ -x "$HESTIA/data/firewall/custom.sh" ]; then - bash "$HESTIA/data/firewall/custom.sh" +if [ -x "$TULIO/data/firewall/custom.sh" ]; then + bash "$TULIO/data/firewall/custom.sh" fi # Checking fail2ban support @@ -209,7 +208,7 @@ else echo "[Service]" >> $sd_unit echo "Type=oneshot" >> $sd_unit echo "RemainAfterExit=yes" >> $sd_unit - echo "ExecStartPre=-${HESTIA}/bin/v-update-firewall-ipset load" >> $sd_unit + echo "ExecStartPre=-${TULIO}/bin/v-update-firewall-ipset load" >> $sd_unit if [ "$iptablesversion" = "v1.6" ]; then echo "ExecStart=/sbin/iptables-restore /etc/iptables.rules" >> $sd_unit else diff --git a/bin/v-update-firewall-ipset b/bin/v-update-firewall-ipset index 7a70519c2..6bff1bbb0 100755 --- a/bin/v-update-firewall-ipset +++ b/bin/v-update-firewall-ipset @@ -17,11 +17,10 @@ source /etc/profile.d/tulio.sh # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-update-host-certificate b/bin/v-update-host-certificate index 71859ff25..eff009838 100755 --- a/bin/v-update-host-certificate +++ b/bin/v-update-host-certificate @@ -24,13 +24,12 @@ hostname=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -59,8 +58,8 @@ check_tulio_demo_mode #----------------------------------------------------------# # Copy hostnames certificates from user dir -cp /home/$user/conf/web/$hostname/ssl/$hostname.pem $HESTIA/ssl/certificate.crt -cp /home/$user/conf/web/$hostname/ssl/$hostname.key $HESTIA/ssl/certificate.key +cp /home/$user/conf/web/$hostname/ssl/$hostname.pem $TULIO/ssl/certificate.crt +cp /home/$user/conf/web/$hostname/ssl/$hostname.key $TULIO/ssl/certificate.key # Enable fallback support for mail domains that do not support SSL if [[ "$MAIL_SYSTEM" =~ exim ]]; then @@ -72,13 +71,13 @@ if [[ "$MAIL_SYSTEM" =~ exim ]]; then fi # Assign exim permissions to certificate - chown $exim_user:mail $HESTIA/ssl/certificate.crt - chown $exim_user:mail $HESTIA/ssl/certificate.key + chown $exim_user:mail $TULIO/ssl/certificate.crt + chown $exim_user:mail $TULIO/ssl/certificate.key fi # Add UPDATE_HOSTNAME_SSL if not exist if [ -z "$UPDATE_HOSTNAME_SSL" ]; then - echo "UPDATE_HOSTNAME_SSL='yes'" >> "$HESTIA/conf/tulio.conf" + echo "UPDATE_HOSTNAME_SSL='yes'" >> "$TULIO/conf/tulio.conf" fi # Restart services diff --git a/bin/v-update-letsencrypt-ssl b/bin/v-update-letsencrypt-ssl index 61d359bb5..0bb06e550 100755 --- a/bin/v-update-letsencrypt-ssl +++ b/bin/v-update-letsencrypt-ssl @@ -14,13 +14,12 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/syshealth.sh -source $HESTIA/func/syshealth.sh +source $TULIO/func/syshealth.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Perform verification if read-only mode is enabled check_tulio_demo_mode @@ -40,7 +39,7 @@ fi # Checking user certificates for user in $("$BIN/v-list-users" list); do - USER_DATA=$HESTIA/data/users/$user + USER_DATA=$TULIO/data/users/$user for domain in $(search_objects 'web' 'LETSENCRYPT' 'yes' 'DOMAIN'); do # Clear any keys related to web domains diff --git a/bin/v-update-mail-domain-disk b/bin/v-update-mail-domain-disk index 444de8784..15170ac0e 100755 --- a/bin/v-update-mail-domain-disk +++ b/bin/v-update-mail-domain-disk @@ -19,11 +19,10 @@ domain_idn=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-update-mail-domain-ssl b/bin/v-update-mail-domain-ssl index 6aff662e7..092741d8d 100755 --- a/bin/v-update-mail-domain-ssl +++ b/bin/v-update-mail-domain-ssl @@ -24,15 +24,14 @@ restart=$4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-update-mail-domains-disk b/bin/v-update-mail-domains-disk index d89adc03d..920f4e565 100755 --- a/bin/v-update-mail-domains-disk +++ b/bin/v-update-mail-domains-disk @@ -17,11 +17,10 @@ user=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-update-mail-templates b/bin/v-update-mail-templates index 79ef39dd6..c70a36829 100755 --- a/bin/v-update-mail-templates +++ b/bin/v-update-mail-templates @@ -18,11 +18,10 @@ skip=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Action # @@ -32,7 +31,7 @@ check_args '1' "$#" '[RESTART]' '[SKIP]' is_format_valid 'restart' # Update templates -cp -rf $HESTIA_INSTALL_DIR/templates/mail $HESTIA/data/templates/ +cp -rf $TULIO_INSTALL_DIR/templates/mail $TULIO/data/templates/ # Rebuild mail domains if mail services are enabled if [ -z "$skip" ]; then diff --git a/bin/v-update-sys-defaults b/bin/v-update-sys-defaults index 9f5eddca1..1000dc8c2 100755 --- a/bin/v-update-sys-defaults +++ b/bin/v-update-sys-defaults @@ -17,13 +17,12 @@ system=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/syshealth.sh -source $HESTIA/func/syshealth.sh +source $TULIO/func/syshealth.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Action # diff --git a/bin/v-update-sys-ip b/bin/v-update-sys-ip index 175c1d929..374e9b109 100755 --- a/bin/v-update-sys-ip +++ b/bin/v-update-sys-ip @@ -17,15 +17,14 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -57,7 +56,7 @@ for nic in $nics; do fi done -v_ips="$(ls $HESTIA/data/ips/)" +v_ips="$(ls $TULIO/data/ips/)" ip_num="$(echo "$ips" | wc -w)" v_ip_num="$(echo "$v_ips" | wc -w)" @@ -71,7 +70,7 @@ fi # Updating configs if [ -n "$old_ip" ]; then - mv $HESTIA/data/ips/$old_ip $HESTIA/data/ips/$new_ip + mv $TULIO/data/ips/$old_ip $TULIO/data/ips/$new_ip # Generating timestamp new_timestamp @@ -105,7 +104,7 @@ if [ -n "$old_ip" ]; then fi for user in $("$BIN/v-list-users" list); do - sed -i "s/$old_ip/$new_ip/g" $HESTIA/data/users/$user/web.conf + sed -i "s/$old_ip/$new_ip/g" $TULIO/data/users/$user/web.conf $BIN/v-rebuild-web-domains "$user" no done @@ -132,8 +131,8 @@ if [ -n "$old_ip" ]; then # Updating DNS if [ -n "$DNS_SYSTEM" ]; then for user in $("$BIN/v-list-users" list); do - sed -i "s/$old_ip/$new_ip/g" $HESTIA/data/users/$user/dns.conf - sed -i "s/$old_ip/$new_ip/g" $HESTIA/data/users/$user/dns/*.conf + sed -i "s/$old_ip/$new_ip/g" $TULIO/data/users/$user/dns.conf + sed -i "s/$old_ip/$new_ip/g" $TULIO/data/users/$user/dns/*.conf $BIN/v-rebuild-dns-domains "$user" no done $BIN/v-restart-dns @@ -150,7 +149,7 @@ if [ -n "$old_ip" ]; then # Updating firewall if [ -n "$FIREWALL_SYSTEM" ]; then - sed -i "s/$old_ip/$new_ip/g" $HESTIA/data/firewall/*.conf + sed -i "s/$old_ip/$new_ip/g" $TULIO/data/firewall/*.conf $BIN/v-update-firewall fi fi @@ -158,7 +157,7 @@ fi # Adding system IP for ip in $ips; do check_ip="$(ip addr list | grep -w "$ip")" - if [ ! -e "$HESTIA/data/ips/$ip" ] && [ -n "$check_ip" ]; then + if [ ! -e "$TULIO/data/ips/$ip" ] && [ -n "$check_ip" ]; then interface="$(ip -d -j addr show | jq --arg IP "$ip" -r '.[] | if .addr_info[].local == $IP then .ifname else empty end')" prefixlen="$(ip -d -j addr show | jq --arg IP "$ip" -r '.[].addr_info[] | if .local == $IP then .prefixlen else empty end')" netmask="$(convert_cidr "$prefixlen")" @@ -170,9 +169,9 @@ done # Updating NAT pub_ipv4="$(curl -fsLm5 --retry 2 --ipv4 https://ip.tuliocp.com/)" -if [ ! -e "$HESTIA/data/ips/$pub_ipv4" ]; then - if [ -z "$(grep -R "$pub_ipv4" $HESTIA/data/ips/)" ]; then - ip="$(ls -t $HESTIA/data/ips/ | head -n1)" +if [ ! -e "$TULIO/data/ips/$pub_ipv4" ]; then + if [ -z "$(grep -R "$pub_ipv4" $TULIO/data/ips/)" ]; then + ip="$(ls -t $TULIO/data/ips/ | head -n1)" $BIN/v-change-sys-ip-nat "$ip" "$pub_ipv4" fi fi diff --git a/bin/v-update-sys-ip-counters b/bin/v-update-sys-ip-counters index 174607847..07f62b829 100755 --- a/bin/v-update-sys-ip-counters +++ b/bin/v-update-sys-ip-counters @@ -17,13 +17,12 @@ ip="$1" # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -44,7 +43,7 @@ check_tulio_demo_mode # Creating user_list if [ -z "$ip" ]; then - ip_list="$(ls $HESTIA/data/ips/)" + ip_list="$(ls $TULIO/data/ips/)" else ip_list="$ip" fi @@ -53,7 +52,7 @@ fi for ip in $ip_list; do # Calculate usage - ip_usage="$(grep -H "$ip" $HESTIA/data/users/*/web.conf)" + ip_usage="$(grep -H "$ip" $TULIO/data/users/*/web.conf)" web_domains="$(echo "$ip_usage" | sed '/^$/d' | wc -l)" sys_users="$(echo "$ip_usage" | cut -f7 -d/ | sort -u | tr '\n' ',' | sed "s/,$//g")" diff --git a/bin/v-update-sys-queue b/bin/v-update-sys-queue index e3f963be3..2c9e13036 100755 --- a/bin/v-update-sys-queue +++ b/bin/v-update-sys-queue @@ -20,11 +20,10 @@ queue=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -46,14 +45,14 @@ fi # Defining pipe functions case $queue in - restart) bash $HESTIA/data/queue/$queue.pipe > /dev/null 2>&1 ;; - webstats) bash $HESTIA/data/queue/$queue.pipe > /dev/null 2>&1 ;; - backup) bash $HESTIA/data/queue/$queue.pipe > /dev/null 2>&1 ;; - disk) bash $HESTIA/data/queue/$queue.pipe > /dev/null 2>&1 ;; - daily) bash $HESTIA/data/queue/$queue.pipe > /dev/null 2>&1 ;; - traffic) bash $HESTIA/data/queue/$queue.pipe > /dev/null 2>&1 ;; - dns-cluster) bash $HESTIA/data/queue/$queue.pipe > /dev/null 2>&1 ;; - letsencrypt) bash $HESTIA/data/queue/$queue.pipe > /dev/null 2>&1 ;; + restart) bash $TULIO/data/queue/$queue.pipe > /dev/null 2>&1 ;; + webstats) bash $TULIO/data/queue/$queue.pipe > /dev/null 2>&1 ;; + backup) bash $TULIO/data/queue/$queue.pipe > /dev/null 2>&1 ;; + disk) bash $TULIO/data/queue/$queue.pipe > /dev/null 2>&1 ;; + daily) bash $TULIO/data/queue/$queue.pipe > /dev/null 2>&1 ;; + traffic) bash $TULIO/data/queue/$queue.pipe > /dev/null 2>&1 ;; + dns-cluster) bash $TULIO/data/queue/$queue.pipe > /dev/null 2>&1 ;; + letsencrypt) bash $TULIO/data/queue/$queue.pipe > /dev/null 2>&1 ;; *) check_args '1' '0' 'QUEUE' ;; esac diff --git a/bin/v-update-sys-rrd b/bin/v-update-sys-rrd index 5badee8de..7a284e969 100755 --- a/bin/v-update-sys-rrd +++ b/bin/v-update-sys-rrd @@ -15,11 +15,10 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Checking rrddir if [ ! -d "$RRD" ]; then diff --git a/bin/v-update-sys-rrd-apache2 b/bin/v-update-sys-rrd-apache2 index b13c3652a..e809ac338 100755 --- a/bin/v-update-sys-rrd-apache2 +++ b/bin/v-update-sys-rrd-apache2 @@ -17,11 +17,10 @@ period=${1-daily} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Action # diff --git a/bin/v-update-sys-rrd-ftp b/bin/v-update-sys-rrd-ftp index 61b7be41d..feb5f261b 100755 --- a/bin/v-update-sys-rrd-ftp +++ b/bin/v-update-sys-rrd-ftp @@ -17,11 +17,10 @@ period=${1-daily} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio.conf/tulio.conf -source $HESTIA/conf/tulio.conf +source $TULIO/conf/tulio.conf #----------------------------------------------------------# # Action # diff --git a/bin/v-update-sys-rrd-httpd b/bin/v-update-sys-rrd-httpd index 79f338271..d3cffb6e0 100755 --- a/bin/v-update-sys-rrd-httpd +++ b/bin/v-update-sys-rrd-httpd @@ -17,11 +17,10 @@ period=${1-daily} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Action # diff --git a/bin/v-update-sys-rrd-la b/bin/v-update-sys-rrd-la index 8690f218f..458f55892 100755 --- a/bin/v-update-sys-rrd-la +++ b/bin/v-update-sys-rrd-la @@ -17,11 +17,10 @@ period=${1-daily} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Action # diff --git a/bin/v-update-sys-rrd-mail b/bin/v-update-sys-rrd-mail index af3bf1fa9..e8288712e 100755 --- a/bin/v-update-sys-rrd-mail +++ b/bin/v-update-sys-rrd-mail @@ -17,11 +17,10 @@ period=${1-daily} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Action # diff --git a/bin/v-update-sys-rrd-mem b/bin/v-update-sys-rrd-mem index 10cade534..2720b50ef 100755 --- a/bin/v-update-sys-rrd-mem +++ b/bin/v-update-sys-rrd-mem @@ -17,11 +17,10 @@ period=${1-daily} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Action # diff --git a/bin/v-update-sys-rrd-mysql b/bin/v-update-sys-rrd-mysql index de4c68e60..ce5b72dcd 100755 --- a/bin/v-update-sys-rrd-mysql +++ b/bin/v-update-sys-rrd-mysql @@ -17,13 +17,12 @@ period=${1-daily} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/db.sh -source $HESTIA/func/db.sh +source $TULIO/func/db.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Action # @@ -60,7 +59,7 @@ if [ ! -d "$RRD/db" ]; then fi # Parsing db hosts -conf="$HESTIA/conf/mysql.conf" +conf="$TULIO/conf/mysql.conf" hosts=$(grep HOST "$conf" | awk '{print $1}' | cut -f 2 -d \') check_row=$(echo "$hosts" | wc -l) if [ 0 -eq "$check_row" ]; then diff --git a/bin/v-update-sys-rrd-net b/bin/v-update-sys-rrd-net index a045c8b4c..454610eca 100755 --- a/bin/v-update-sys-rrd-net +++ b/bin/v-update-sys-rrd-net @@ -17,11 +17,10 @@ period=${1-daily} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Action # diff --git a/bin/v-update-sys-rrd-nginx b/bin/v-update-sys-rrd-nginx index 74f64c18f..adc048972 100755 --- a/bin/v-update-sys-rrd-nginx +++ b/bin/v-update-sys-rrd-nginx @@ -17,11 +17,10 @@ period=${1-daily} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Action # diff --git a/bin/v-update-sys-rrd-pgsql b/bin/v-update-sys-rrd-pgsql index 7d6da64c4..6a0812c47 100755 --- a/bin/v-update-sys-rrd-pgsql +++ b/bin/v-update-sys-rrd-pgsql @@ -17,11 +17,10 @@ period=${1-daily} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Action # @@ -58,7 +57,7 @@ if [ ! -d "$RRD/db" ]; then fi # Parsing db hosts -conf="$HESTIA/conf/pgsql.conf" +conf="$TULIO/conf/pgsql.conf" hosts=$(grep HOST $conf | awk '{print $1}' | cut -f 2 -d \') check_row=$(echo "$hosts" | wc -l) if [ 0 -eq "$check_row" ]; then diff --git a/bin/v-update-sys-rrd-ssh b/bin/v-update-sys-rrd-ssh index 91de2038c..d00821a35 100755 --- a/bin/v-update-sys-rrd-ssh +++ b/bin/v-update-sys-rrd-ssh @@ -17,11 +17,10 @@ period=${1-daily} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Action # diff --git a/bin/v-update-sys-tulio b/bin/v-update-sys-tulio index 0db106267..4dc6d3bca 100755 --- a/bin/v-update-sys-tulio +++ b/bin/v-update-sys-tulio @@ -18,11 +18,10 @@ package=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-update-sys-tulio-all b/bin/v-update-sys-tulio-all index f60440c79..da0d4f18a 100755 --- a/bin/v-update-sys-tulio-all +++ b/bin/v-update-sys-tulio-all @@ -14,11 +14,10 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Perform verification if read-only mode is enabled check_tulio_demo_mode diff --git a/bin/v-update-sys-tulio-git b/bin/v-update-sys-tulio-git index a6b348edd..e74c698cd 100755 --- a/bin/v-update-sys-tulio-git +++ b/bin/v-update-sys-tulio-git @@ -17,11 +17,10 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Perform verification if read-only mode is enabled check_tulio_demo_mode @@ -76,7 +75,7 @@ download_file() { fi if [ ! -f "$ARCHIVE_DIR/$filename" ]; then - [ "$HESTIA_DEBUG" ] && echo >&2 DEBUG: wget $url -q $dstopt --show-progress --progress=bar:force --limit-rate=3m + [ "$TULIO_DEBUG" ] && echo >&2 DEBUG: wget $url -q $dstopt --show-progress --progress=bar:force --limit-rate=3m wget $url -q $dstopt --show-progress --progress=bar:force --limit-rate=3m if [ $? -ne 0 ]; then echo >&2 "[!] Archive $ARCHIVE_DIR/$filename is corrupted and exit script" @@ -97,13 +96,13 @@ download_file() { get_branch_file() { local filename=$1 local destination=$2 - [ "$HESTIA_DEBUG" ] && echo >&2 DEBUG: Get branch file "$filename" to "$destination" + [ "$TULIO_DEBUG" ] && echo >&2 DEBUG: Get branch file "$filename" to "$destination" if [ "$use_src_folder" == 'true' ]; then if [ -z "$destination" ]; then - [ "$HESTIA_DEBUG" ] && echo >&2 DEBUG: cp -f "$SRC_DIR/$filename" ./ + [ "$TULIO_DEBUG" ] && echo >&2 DEBUG: cp -f "$SRC_DIR/$filename" ./ cp -f "$SRC_DIR/$filename" ./ else - [ "$HESTIA_DEBUG" ] && echo >&2 DEBUG: cp -f "$SRC_DIR/$filename" "$destination" + [ "$TULIO_DEBUG" ] && echo >&2 DEBUG: cp -f "$SRC_DIR/$filename" "$destination" cp -f "$SRC_DIR/$filename" "$destination" fi else @@ -138,7 +137,7 @@ fi # Set Version for compiling BUILD_VER=$(curl -s https://raw.githubusercontent.com/$fork/tuliocp/$branch/src/deb/tulio/control | grep "Version:" | cut -d' ' -f2) -HESTIA_V="${BUILD_VER}_${BUILD_ARCH}" +TULIO_V="${BUILD_VER}_${BUILD_ARCH}" # Create build directories rm -rf $BUILD_DIR @@ -244,37 +243,37 @@ fi GIT_REP='https://raw.githubusercontent.com/'$REPO'/'$branch'/src/deb' # Generate Links for sourcecode -HESTIA_ARCHIVE_LINK='https://github.com/'$REPO'/archive/'$branch'.tar.gz' -echo $HESTIA_ARCHIVE_LINK +TULIO_ARCHIVE_LINK='https://github.com/'$REPO'/archive/'$branch'.tar.gz' +echo $TULIO_ARCHIVE_LINK echo "Building Tulio Control Panel package..." -BUILD_DIR_HESTIA=$BUILD_DIR/tulio_$HESTIA_V +BUILD_DIR_TULIO=$BUILD_DIR/tulio_$TULIO_V # Change to build directory cd $BUILD_DIR -if [ "$KEEPBUILD" != 'true' ] || [ ! -d "$BUILD_DIR_HESTIA" ]; then +if [ "$KEEPBUILD" != 'true' ] || [ ! -d "$BUILD_DIR_TULIO" ]; then # Check if target directory exist - if [ -d $BUILD_DIR_HESTIA ]; then - rm -r $BUILD_DIR_HESTIA + if [ -d $BUILD_DIR_TULIO ]; then + rm -r $BUILD_DIR_TULIO fi # Create directory - mkdir -p $BUILD_DIR_HESTIA + mkdir -p $BUILD_DIR_TULIO fi cd $BUILD_DIR rm -rf $BUILD_DIR/tuliocp-$branch_dash # Download and unpack source files if [ "$use_src_folder" == 'true' ]; then - [ "$HESTIA_DEBUG" ] && echo DEBUG: cp -rf "$SRC_DIR/" $BUILD_DIR/tuliocp-$branch_dash + [ "$TULIO_DEBUG" ] && echo DEBUG: cp -rf "$SRC_DIR/" $BUILD_DIR/tuliocp-$branch_dash cp -rf "$SRC_DIR/" $BUILD_DIR/tuliocp-$branch_dash elif [ -d $SRC_DIR ]; then - download_file $HESTIA_ARCHIVE_LINK '-' 'fresh' | tar xz + download_file $TULIO_ARCHIVE_LINK '-' 'fresh' | tar xz fi -mkdir -p $BUILD_DIR_HESTIA/usr/local/tulio +mkdir -p $BUILD_DIR_TULIO/usr/local/tulio # Move needed directories cd $BUILD_DIR/tuliocp-$branch_dash @@ -282,37 +281,37 @@ cd $BUILD_DIR/tuliocp-$branch_dash npm ci npm run build -cp -rf bin func install web $BUILD_DIR_HESTIA/usr/local/tulio/ +cp -rf bin func install web $BUILD_DIR_TULIO/usr/local/tulio/ # Set permissions -find $BUILD_DIR_HESTIA/usr/local/tulio/ -type f -exec chmod -x {} \; +find $BUILD_DIR_TULIO/usr/local/tulio/ -type f -exec chmod -x {} \; # Allow send email via /usr/local/tulio/web/inc/mail-wrapper.php via cli -chmod +x $BUILD_DIR_HESTIA/usr/local/tulio/web/inc/mail-wrapper.php +chmod +x $BUILD_DIR_TULIO/usr/local/tulio/web/inc/mail-wrapper.php # Allow the executable to be executed -chmod +x $BUILD_DIR_HESTIA/usr/local/tulio/bin/* -find $BUILD_DIR_HESTIA/usr/local/tulio/install/ \( -name '*.sh' \) -exec chmod +x {} \; -chmod -x $BUILD_DIR_HESTIA/usr/local/tulio/install/*.sh -chown -R root:root $BUILD_DIR_HESTIA +chmod +x $BUILD_DIR_TULIO/usr/local/tulio/bin/* +find $BUILD_DIR_TULIO/usr/local/tulio/install/ \( -name '*.sh' \) -exec chmod +x {} \; +chmod -x $BUILD_DIR_TULIO/usr/local/tulio/install/*.sh +chown -R root:root $BUILD_DIR_TULIO # Get Debian package files -mkdir -p $BUILD_DIR_HESTIA/DEBIAN -get_branch_file 'src/deb/tulio/control' "$BUILD_DIR_HESTIA/DEBIAN/control" +mkdir -p $BUILD_DIR_TULIO/DEBIAN +get_branch_file 'src/deb/tulio/control' "$BUILD_DIR_TULIO/DEBIAN/control" if [ "$BUILD_ARCH" != "amd64" ]; then - sed -i "s/amd64/${BUILD_ARCH}/g" "$BUILD_DIR_HESTIA/DEBIAN/control" + sed -i "s/amd64/${BUILD_ARCH}/g" "$BUILD_DIR_TULIO/DEBIAN/control" fi -get_branch_file 'src/deb/tulio/copyright' "$BUILD_DIR_HESTIA/DEBIAN/copyright" -get_branch_file 'src/deb/tulio/preinst' "$BUILD_DIR_HESTIA/DEBIAN/preinst" -get_branch_file 'src/deb/tulio/postinst' "$BUILD_DIR_HESTIA/DEBIAN/postinst" -chmod +x $BUILD_DIR_HESTIA/DEBIAN/postinst -chmod +x $BUILD_DIR_HESTIA/DEBIAN/preinst +get_branch_file 'src/deb/tulio/copyright' "$BUILD_DIR_TULIO/DEBIAN/copyright" +get_branch_file 'src/deb/tulio/preinst' "$BUILD_DIR_TULIO/DEBIAN/preinst" +get_branch_file 'src/deb/tulio/postinst' "$BUILD_DIR_TULIO/DEBIAN/postinst" +chmod +x $BUILD_DIR_TULIO/DEBIAN/postinst +chmod +x $BUILD_DIR_TULIO/DEBIAN/preinst echo Building Tulio DEB -dpkg-deb -Zxz --build $BUILD_DIR_HESTIA $DEB_DIR +dpkg-deb -Zxz --build $BUILD_DIR_TULIO $DEB_DIR # clear up the source folder if [ "$KEEPBUILD" != 'true' ]; then - rm -r $BUILD_DIR_HESTIA + rm -r $BUILD_DIR_TULIO rm -rf tuliocp-$branch_dash fi cd $BUILD_DIR/tuliocp-$branch_dash diff --git a/bin/v-update-user-backup-exclusions b/bin/v-update-user-backup-exclusions index e2c1db2d5..281546993 100755 --- a/bin/v-update-user-backup-exclusions +++ b/bin/v-update-user-backup-exclusions @@ -18,11 +18,10 @@ vfile=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" is_file_available() { if [ ! -e "$vfile" ]; then diff --git a/bin/v-update-user-cgroup b/bin/v-update-user-cgroup index 7f3619a57..f8bbb14fa 100755 --- a/bin/v-update-user-cgroup +++ b/bin/v-update-user-cgroup @@ -17,11 +17,10 @@ user=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-update-user-counters b/bin/v-update-user-counters index 5a40451db..2733ef580 100755 --- a/bin/v-update-user-counters +++ b/bin/v-update-user-counters @@ -14,11 +14,10 @@ # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Argument definition user=$1 @@ -46,7 +45,7 @@ fi # Updating user stats for user in $user_list; do - USER_DATA=$HESTIA/data/users/$user + USER_DATA=$TULIO/data/users/$user # Cleaning counters SUSPENDED_USERS=0 SUSPENDED_WEB=0 @@ -85,15 +84,15 @@ for user in $user_list; do # Checking users if [ "$user" = "$ROOT_USER" ]; then - spnd=$(grep "SUSPENDED='yes'" $HESTIA/data/users/*/user.conf | wc -l) + spnd=$(grep "SUSPENDED='yes'" $TULIO/data/users/*/user.conf | wc -l) SUSPENDED_USERS=$spnd U_USERS=$("$BIN/v-list-users" list | wc -l) fi - ips=$(ls $HESTIA/data/ips) + ips=$(ls $TULIO/data/ips) # Checking ip for ip in $ips; do - source $HESTIA/data/ips/$ip + source $TULIO/data/ips/$ip if [ "$OWNER" = "$user" ]; then IP_OWNED=$((IP_OWNED + 1)) IP_AVAIL=$((IP_AVAIL + 1)) @@ -103,7 +102,7 @@ for user in $user_list; do fi done if [ "$user" = "$ROOT_USER" ]; then - IP_AVAIL=$(ls $HESTIA/data/ips | wc -l) + IP_AVAIL=$(ls $TULIO/data/ips | wc -l) fi # Checking web system diff --git a/bin/v-update-user-disk b/bin/v-update-user-disk index 5fe624330..0b00aae10 100755 --- a/bin/v-update-user-disk +++ b/bin/v-update-user-disk @@ -17,11 +17,10 @@ user=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-update-user-package b/bin/v-update-user-package index 0b25f7d7c..5772dfdd5 100755 --- a/bin/v-update-user-package +++ b/bin/v-update-user-package @@ -17,11 +17,10 @@ package=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # @@ -36,7 +35,7 @@ is_package_valid #----------------------------------------------------------# for user in $("$BIN/v-list-users" list); do # Fix Bug User Data contain path to the root user - USER_DATA="$HESTIA/data/users/$user" + USER_DATA="$TULIO/data/users/$user" check_package=$(grep "PACKAGE='$package'" $USER_DATA/user.conf) if [ -n "$check_package" ]; then "$BIN/v-change-user-package" "$user" "$package" 'yes' diff --git a/bin/v-update-user-quota b/bin/v-update-user-quota index 35d90d3b0..574985aa1 100755 --- a/bin/v-update-user-quota +++ b/bin/v-update-user-quota @@ -17,11 +17,10 @@ user=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-update-user-stats b/bin/v-update-user-stats index 45c7083eb..0dbb0e269 100755 --- a/bin/v-update-user-stats +++ b/bin/v-update-user-stats @@ -18,13 +18,12 @@ source /etc/profile.d/tulio.sh # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Argument definition user=$1 @@ -74,11 +73,11 @@ TOTAL_USERS=0 # Updating user stats for user in $user_list; do - USER_DATA=$HESTIA/data/users/$user - if [ ! -f "$HESTIA/data/users/$user/user.conf" ]; then + USER_DATA=$TULIO/data/users/$user + if [ ! -f "$TULIO/data/users/$user/user.conf" ]; then continue fi - USER_DATA=$HESTIA/data/users/$user + USER_DATA=$TULIO/data/users/$user source $USER_DATA/user.conf next_month=$(date +'%m/01/%y' -d "$(date +%Y-%m-15) 1 month") DATE=$(date -d "$next_month -1day" +%F) @@ -135,7 +134,7 @@ done if [ "$update_overall_stats" = 'yes' ]; then # Updating overall stats - stats="$HESTIA/data/users/$ROOT_USER/overall_stats.log" + stats="$TULIO/data/users/$ROOT_USER/overall_stats.log" s="DATE='$DATE' TIME='$TIME' PACKAGE='default' IP_OWNED='$TOTAL_IP_OWNED'" s="$s DISK_QUOTA='0' U_DISK='$TOTAL_U_DISK' U_DISK_DIRS='$TOTAL_U_DISK_DIRS'" diff --git a/bin/v-update-web-domain-disk b/bin/v-update-web-domain-disk index d93f9f047..8e048cf36 100755 --- a/bin/v-update-web-domain-disk +++ b/bin/v-update-web-domain-disk @@ -19,13 +19,12 @@ domain_idn=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-update-web-domain-ssl b/bin/v-update-web-domain-ssl index 090583128..3f19bb0c1 100755 --- a/bin/v-update-web-domain-ssl +++ b/bin/v-update-web-domain-ssl @@ -24,15 +24,14 @@ restart=$4 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # shellcheck source=/usr/local/tulio/func/ip.sh -source $HESTIA/func/ip.sh +source $TULIO/func/ip.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-update-web-domain-stat b/bin/v-update-web-domain-stat index 423abebd8..065adbf2c 100755 --- a/bin/v-update-web-domain-stat +++ b/bin/v-update-web-domain-stat @@ -19,13 +19,12 @@ domain_idn=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain @@ -88,7 +87,7 @@ build_awstats() { # Logo check if [ ! -e "$dir/logo-tulio.svg" ]; then - cp -r $HESTIA/web/images/logo-tulio.svg $dir/ + cp -r $TULIO/web/images/logo-tulio.svg $dir/ fi # Icon directory check diff --git a/bin/v-update-web-domain-traff b/bin/v-update-web-domain-traff index e243a7779..0f3bf9a91 100755 --- a/bin/v-update-web-domain-traff +++ b/bin/v-update-web-domain-traff @@ -19,13 +19,12 @@ domain_idn=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" # Additional argument formatting format_domain diff --git a/bin/v-update-web-domains-disk b/bin/v-update-web-domains-disk index 4a32b903b..df21941d4 100755 --- a/bin/v-update-web-domains-disk +++ b/bin/v-update-web-domains-disk @@ -17,11 +17,10 @@ user=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-update-web-domains-stat b/bin/v-update-web-domains-stat index 2119f1b3b..b6a6974ea 100755 --- a/bin/v-update-web-domains-stat +++ b/bin/v-update-web-domains-stat @@ -17,13 +17,12 @@ user=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-update-web-domains-traff b/bin/v-update-web-domains-traff index 47ae2c073..7c5fdd7c1 100755 --- a/bin/v-update-web-domains-traff +++ b/bin/v-update-web-domains-traff @@ -17,13 +17,12 @@ user=$1 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # shellcheck source=/usr/local/tulio/func/domain.sh -source $HESTIA/func/domain.sh +source $TULIO/func/domain.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Verifications # diff --git a/bin/v-update-web-templates b/bin/v-update-web-templates index 2fd7641b8..e2773aa4f 100755 --- a/bin/v-update-web-templates +++ b/bin/v-update-web-templates @@ -18,11 +18,10 @@ skip=$2 # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh -source $HESTIA/func/main.sh +source $TULIO/func/main.sh # load config file -source_conf "$HESTIA/conf/tulio.conf" +source_conf "$TULIO/conf/tulio.conf" #----------------------------------------------------------# # Action # @@ -31,7 +30,7 @@ source_conf "$HESTIA/conf/tulio.conf" is_format_valid 'restart' # Check if /install/upgrade/manual/install_awstats_geoip.sh has been applied -awstats_patch=$(cat $HESTIA/data/templates/web/awstats/awstats.tpl | grep "LoadPlugin=\"geoip GEOIP_STANDARD /usr/share/GeoIP/GeoIP.dat\"") +awstats_patch=$(cat $TULIO/data/templates/web/awstats/awstats.tpl | grep "LoadPlugin=\"geoip GEOIP_STANDARD /usr/share/GeoIP/GeoIP.dat\"") # Skeleton, Unassinged and Suspended if [ "$POLICY_SYNC_SKELETON" != "no" ]; then @@ -39,7 +38,7 @@ if [ "$POLICY_SYNC_SKELETON" != "no" ]; then rm -rf "${WEBTPL}/suspend" 2> /dev/null rm -rf "${WEBTPL}/unassigned" 2> /dev/null - for webtpl_folder in $(ls $HESTIA_COMMON_DIR/templates/web/* -d 2> /dev/null); do + for webtpl_folder in $(ls $TULIO_COMMON_DIR/templates/web/* -d 2> /dev/null); do cp -rf "${webtpl_folder}" "${WEBTPL}/" done fi @@ -47,10 +46,10 @@ fi [ -d "${WEBTPL}/nginx" ] || mkdir -p "${WEBTPL}/nginx" if [ "$PROXY_SYSTEM" = 'nginx' ] || [ "$WEB_BACKEND" = "php-fpm" ]; then - cp -rf "${HESTIA_INSTALL_DIR}/templates/web/nginx" "${WEBTPL}/" + cp -rf "${TULIO_INSTALL_DIR}/templates/web/nginx" "${WEBTPL}/" fi -for webtpl_folder in $(ls $HESTIA_INSTALL_DIR/templates/web/* -d 2> /dev/null | egrep -v '/(nginx)$'); do +for webtpl_folder in $(ls $TULIO_INSTALL_DIR/templates/web/* -d 2> /dev/null | egrep -v '/(nginx)$'); do cp -rf "${webtpl_folder}" "${WEBTPL}/" done @@ -58,12 +57,12 @@ versions_list=$(ls -d /etc/php/*) for php_ver in $versions_list; do version=$(echo $php_ver | sed 's/.*\///') [ ! -d "/etc/php/$version/fpm/pool.d/" ] && continue - cp -f $HESTIA_INSTALL_DIR/php-fpm/multiphp.tpl ${WEBTPL}/php-fpm/PHP-${version/\./_}.tpl + cp -f $TULIO_INSTALL_DIR/php-fpm/multiphp.tpl ${WEBTPL}/php-fpm/PHP-${version/\./_}.tpl done if [ -n "$awstats_patch" ]; then # restore LoadPlugin variable - echo "LoadPlugin=\"geoip GEOIP_STANDARD /usr/share/GeoIP/GeoIP.dat\"" >> $HESTIA/data/templates/web/awstats/awstats.tpl + echo "LoadPlugin=\"geoip GEOIP_STANDARD /usr/share/GeoIP/GeoIP.dat\"" >> $TULIO/data/templates/web/awstats/awstats.tpl fi # Rebuilding web domains diff --git a/bin/v-update-white-label-logo b/bin/v-update-white-label-logo index 7264c32ba..d7ea24bb7 100755 --- a/bin/v-update-white-label-logo +++ b/bin/v-update-white-label-logo @@ -18,7 +18,6 @@ reset=${2-no} # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" # shellcheck source=/usr/local/tulio/func/main.sh source "$TULIO/func/main.sh" # load config file diff --git a/docs/.vitepress/config.js b/docs/.vitepress/config.js index b50954a29..9387f99c1 100644 --- a/docs/.vitepress/config.js +++ b/docs/.vitepress/config.js @@ -24,8 +24,8 @@ export default defineConfig({ socialLinks: [ { icon: 'github', link: 'https://github.com/contaura/tuliocp' }, - { icon: 'twitter', link: 'https://twitter.com/TulioCP' }, - { icon: 'facebook', link: 'https://www.facebook.com/tuliocp' }, + { icon: 'twitter', link: 'https://twitter.com/TulioCP' }, + { icon: 'facebook', link: 'https://www.facebook.com/tuliocp' }, ], sidebar: { '/docs/': sidebarDocs() }, @@ -39,7 +39,7 @@ export default defineConfig({ footer: { message: 'Released under the GPLv3 License.', - copyright: 'Copyright ยฉ 2019-present Tulio Control Panel', + copyright: 'Copyright ยฉ 2019-present Tulio Control Panel', }, algolia: { @@ -143,11 +143,11 @@ function sidebarDocs() { text: 'Community', collapsed: false, items: [ - { text: 'Tulio Nginx Cache', link: '/docs/community/tulio-nginx-cache' }, - { - text: 'Ioncube installer for Tulio', - link: '/docs/community/ioncube-tulio-installer', - }, + { text: 'Tulio Nginx Cache', link: '/docs/community/tulio-nginx-cache' }, + { + text: 'Ioncube installer for Tulio', + link: '/docs/community/ioncube-tulio-installer', + }, { text: 'Install script generator', link: '/docs/community/install-script-generator' }, ], }, diff --git a/docs/.vitepress/theme/components/InstallBuilder.vue b/docs/.vitepress/theme/components/InstallBuilder.vue index b6914e8b2..998ce331a 100644 --- a/docs/.vitepress/theme/components/InstallBuilder.vue +++ b/docs/.vitepress/theme/components/InstallBuilder.vue @@ -9,7 +9,7 @@

Check you are running as the root user, configure the options you want below, diff --git a/docs/_data/team.js b/docs/_data/team.js index ce3776b4f..7b7ba5a5c 100644 --- a/docs/_data/team.js +++ b/docs/_data/team.js @@ -14,6 +14,6 @@ const globeIcon = { /** @type {import("vitepress").DefaultTheme.TeamMember[]} */ export const teamMembers = [ - // New contributors welcome! + // New contributors welcome! // Submit a PR to be featured here. ]; diff --git a/docs/docs/server-administration/web-templates.md b/docs/docs/server-administration/web-templates.md index 7fc81709f..ff3fe29b8 100644 --- a/docs/docs/server-administration/web-templates.md +++ b/docs/docs/server-administration/web-templates.md @@ -16,8 +16,8 @@ This happens when: The templates can be found in `/usr/local/tulio/data/templates/web/`. -| Service | Location | -| ----------------------- | ----------------------------------------------------- | +| Service | Location | +| ----------------------- | ---------------------------------------------------- | | Nginx (Proxy) | /usr/local/tulio/data/templates/web/nginx/ | | Nginx - PHP FPM | /usr/local/tulio/data/templates/web/nginx/php-fpm/ | | Apache2 (Legacy/modphp) | /usr/local/tulio/data/templates/web/apache2/ | @@ -41,25 +41,25 @@ After modifying an existing template, you need to rebuild the user configuration ### Available variables -| Name | Description | Example | -| -------------------- | ----------------------------------------------------- | ------------------------------------------ | -| `%ip%` | IP Address of Server | `123.123.123.123` | -| `%proxy_port%` | Port of Proxy | `80` | -| `%proxy_ssl_port%` | Port of Proxy (SSL) | `443` | -| `%web_port%` | Port of Webserver | `8080` | -| `%web_ssl_port%` | Port of Webserver (SSL) | `8443` | -| `%domain%` | Domain | `domain.tld` | -| `%domain_idn%` | Domain (Internationalised) | `domain.tld` | -| `%alias_idn%` | Alias Domain (Internationalised) | `alias.domain.tld` | -| `%docroot%` | Document root of domain | `/home/username/web/public_html/` | -| `%sdocroot%` | Private root of domain | `/home/username/web/public_shtml/` | +| Name | Description | Example | +| -------------------- | ----------------------------------------------------- | ----------------------------------------- | +| `%ip%` | IP Address of Server | `123.123.123.123` | +| `%proxy_port%` | Port of Proxy | `80` | +| `%proxy_ssl_port%` | Port of Proxy (SSL) | `443` | +| `%web_port%` | Port of Webserver | `8080` | +| `%web_ssl_port%` | Port of Webserver (SSL) | `8443` | +| `%domain%` | Domain | `domain.tld` | +| `%domain_idn%` | Domain (Internationalised) | `domain.tld` | +| `%alias_idn%` | Alias Domain (Internationalised) | `alias.domain.tld` | +| `%docroot%` | Document root of domain | `/home/username/web/public_html/` | +| `%sdocroot%` | Private root of domain | `/home/username/web/public_shtml/` | | `%ssl_pem%` | Location of SSL Certificate | `/usr/local/tulio/data/user/username/ssl` | | `%ssl_key%` | Location of SSL Key | `/usr/local/tulio/data/user/username/ssl` | -| `%web_system%` | Software used as web server | `Nginx` | -| `%home%` | Default home directory | `/home` | -| `%user%` | Username of current user | `username` | -| `%backend_lsnr%` | Your default FPM Server | `proxy:fcgi://127.0.0.1:9000` | -| `%proxy_extentions%` | Extensions that should be handled by the proxy server | A list of extensions | +| `%web_system%` | Software used as web server | `Nginx` | +| `%home%` | Default home directory | `/home` | +| `%user%` | Username of current user | `username` | +| `%backend_lsnr%` | Your default FPM Server | `proxy:fcgi://127.0.0.1:9000` | +| `%proxy_extentions%` | Extensions that should be handled by the proxy server | A list of extensions | ::: tip `%sdocroot%` can also be set to `%docroot%` with settings diff --git a/docs/index.html b/docs/index.html index e74783559..0759a5baa 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,98 +1,159 @@ - + - - TulioCP APT Repository - - - -

-

๐Ÿš€ TulioCP APT Repository

-

Official APT repository for TulioCP Control Panel packages.

- -
- ๐Ÿ”„ Repository Status: Packages are automatically built from source via GitHub Actions and deployed here. -
- -

๐Ÿ“ฆ Available Packages

-
- tuliocp - Main control panel package with web interface and CLI tools -
-
- tulio-nginx - Custom Nginx build optimized for TulioCP with HTTP/2 and SSL support -
-
- tulio-php - Custom PHP-FPM build with enhanced performance and security features -
-
- tulio-web-terminal - Browser-based terminal interface with xterm.js support -
- -

โš™๏ธ Repository Setup

-
- โš ๏ธ Note: Repository is temporarily unsigned while we build proper package signing infrastructure. -
-
-
# Add TulioCP repository (unsigned - temporarily trusted)
+	
+		TulioCP APT Repository
+		
+	
+	
+		
+

๐Ÿš€ TulioCP APT Repository

+

Official APT repository for TulioCP Control Panel packages.

+ +
+ ๐Ÿ”„ Repository Status: Packages are automatically built from source via + GitHub Actions and deployed here. +
+ +

๐Ÿ“ฆ Available Packages

+
+ tuliocp - Main control panel package with web interface and CLI tools +
+
+ tulio-nginx - Custom Nginx build optimized for TulioCP with HTTP/2 and SSL + support +
+
+ tulio-php - Custom PHP-FPM build with enhanced performance and security + features +
+
+ tulio-web-terminal - Browser-based terminal interface with xterm.js support +
+ +

โš™๏ธ Repository Setup

+
+ โš ๏ธ Note: Repository is temporarily unsigned while we build proper package + signing infrastructure. +
+
+
+# Add TulioCP repository (unsigned - temporarily trusted)
 echo "deb [arch=amd64 trusted=yes] https://apt.tuliocp.com/ stable main" > /etc/apt/sources.list.d/tuliocp.list
 
 # Update package list
 apt update
 
 # Verify repository is working
-apt-cache search tuliocp
-
- -

๐Ÿ› ๏ธ Installation

-
-
# Install TulioCP (recommended method - uses automated installer)
+apt-cache search tuliocp
+
+ +

๐Ÿ› ๏ธ Installation

+
+
+# Install TulioCP (recommended method - uses automated installer)
 wget https://raw.githubusercontent.com/contaura/tuliocp/main/install/hst-install.sh
 bash hst-install.sh
 
 # Or install packages individually (advanced users)
-apt install tuliocp tulio-nginx tulio-php
-
- -
- โš ๏ธ Important: TulioCP should be installed on a clean Ubuntu 22.04/24.04 or Debian 11/12 server for best results. -
- -

๐Ÿ“š Documentation

- - -

๐Ÿ”„ Automated Building

-

This repository is automatically updated when changes are pushed to the main branch:

-
    -
  • โœ… Packages built from latest source code
  • -
  • โœ… Debian-compatible APT repository structure
  • -
  • โš ๏ธ Unsigned packages (GPG signing coming soon)
  • -
  • โœ… AMD64 architecture support
  • -
- -
-

- TulioCP - Lightweight and powerful control panel for the modern web
- Last updated: -

-
- - - - \ No newline at end of file +apt install tuliocp tulio-nginx tulio-php
+
+ +
+ โš ๏ธ Important: TulioCP should be installed on a clean Ubuntu 22.04/24.04 or + Debian 11/12 server for best results. +
+ +

๐Ÿ“š Documentation

+ + +

๐Ÿ”„ Automated Building

+

This repository is automatically updated when changes are pushed to the main branch:

+ + +
+

+ TulioCP - Lightweight and powerful control panel for the modern web
+ Last updated: +

+
+ + + + diff --git a/func/main.sh b/func/main.sh index 688373cc0..7ff0b6d22 100644 --- a/func/main.sh +++ b/func/main.sh @@ -8,23 +8,21 @@ # Source conf function for correct variable initialisation source_conf() { - while IFS='= ' read -r lhs rhs; do - if [[ ! $lhs =~ ^\ *# && -n $lhs ]]; then - rhs="${rhs%%^\#*}" # Del in line right comments + while IFS='= ' read -r lhs rhs; do + if [[ ! $lhs =~ ^\ *# && -n $lhs ]]; then + rhs="${rhs%%^\#*}" # Del in line right comments rhs="${rhs%%*( )}" # Del trailing spaces rhs="${rhs%\'*}" # Del opening string quotes rhs="${rhs#\'*}" # Del closing string quotes declare -g $lhs="$rhs" fi - done < $1 + done < $1 } : "${TULIO:=/usr/local/tulio}" -: "${HESTIA:=$TULIO}" - if [ -z "$user" ]; then - if [ -z "$ROOT_USER" ]; then - if [ -z "$TULIO" ]; then + if [ -z "$ROOT_USER" ]; then + if [ -z "$TULIO" ]; then # shellcheck source=/etc/tuliocp/tulio.conf source /etc/tuliocp/tulio.conf fi @@ -46,12 +44,12 @@ TULIO_COMMON_DIR="$TULIO/install/common" TULIO_BACKUP="/root/tst_backups/$(date +%d%m%Y%H%M)" TULIO_PHP="$TULIO/php/bin/php" if [ ! -x "$TULIO_PHP" ]; then - php_cmd=$(command -v php 2>/dev/null || true) - if [ -n "$php_cmd" ]; then - TULIO_PHP="$php_cmd" - elif [ -x "/usr/bin/php" ]; then - TULIO_PHP="/usr/bin/php" - fi + php_cmd=$(command -v php 2> /dev/null || true) + if [ -n "$php_cmd" ]; then + TULIO_PHP="$php_cmd" + elif [ -x "/usr/bin/php" ]; then + TULIO_PHP="/usr/bin/php" + fi fi USER_DATA=$TULIO/data/users/$user WEBTPL=$TULIO/data/templates/web @@ -62,12 +60,6 @@ SENDMAIL="$TULIO/web/inc/mail-wrapper.php" TULIO_GIT_REPO="https://raw.githubusercontent.com/contaura/tuliocp" TULIO_THEMES="$TULIO/web/css/themes" TULIO_THEMES_CUSTOM="$TULIO/web/css/themes/custom" -# Provide legacy Hestia variables for backwards compatibility -: "${HESTIA_INSTALL_DIR:=$TULIO_INSTALL_DIR}" -: "${HESTIA_COMMON_DIR:=$TULIO_COMMON_DIR}" -: "${HESTIA_PHP:=$TULIO_PHP}" -: "${HESTIA_THEMES:=$TULIO_THEMES}" -: "${HESTIA_THEMES_CUSTOM:=$TULIO_THEMES_CUSTOM}" SCRIPT="$(basename $0)" CHECK_RESULT_CALLBACK="" @@ -1409,7 +1401,7 @@ check_access_key_cmd() { check_result "$E_FORBIDEN" "Command not provided" elif [[ "$cmd" = 'v-make-tmp-file' ]]; then USER="" PERMISSIONS="" - source_conf "${HESTIA}/data/access-keys/${access_key_id}" + source_conf "${TULIO}/data/access-keys/${access_key_id}" local allowed_commands if [[ -n "$PERMISSIONS" ]]; then allowed_commands="$(get_apis_commands "$PERMISSIONS")" @@ -1424,7 +1416,7 @@ check_access_key_cmd() { check_result "$E_FORBIDEN" "Command $cmd not found" else USER="" PERMISSIONS="" - source_conf "${HESTIA}/data/access-keys/${access_key_id}" + source_conf "${TULIO}/data/access-keys/${access_key_id}" local allowed_commands if [[ -n "$PERMISSIONS" ]]; then diff --git a/func/syshealth.sh b/func/syshealth.sh index edd1571b4..8f4bbbd59 100644 --- a/func/syshealth.sh +++ b/func/syshealth.sh @@ -596,7 +596,7 @@ function syshealth_repair_system_cronjobs() { echo "41 4 * * * sudo /usr/local/tulio/bin/v-update-sys-tulio-all" >> /var/spool/cron/crontabs/tulioweb } -# Adapt Port Listing in HESTIA NGINX Backend +# Adapt Port Listing in TULIO NGINX Backend # Activates or deactivates port listing on IPV4 or/and IPV6 network interfaces function syshealth_adapt_tulio_nginx_listen_ports() { # Detect "physical" NICs only (virtual NICs created by Docker, WireGuard etc. are excluded) diff --git a/install/common/firewall/rules.conf b/install/common/firewall/rules.conf index 94f4b2da6..4d99b824c 100644 --- a/install/common/firewall/rules.conf +++ b/install/common/firewall/rules.conf @@ -1,5 +1,5 @@ RULE='1' ACTION='ACCEPT' PROTOCOL='ICMP' PORT='0' IP='0.0.0.0/0' COMMENT='PING' SUSPENDED='no' TIME='17:13:48' DATE='2014-09-16' -RULE='2' ACTION='ACCEPT' PROTOCOL='TCP' PORT='8083' IP='0.0.0.0/0' COMMENT='HESTIA' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' +RULE='2' ACTION='ACCEPT' PROTOCOL='TCP' PORT='8083' IP='0.0.0.0/0' COMMENT='TULIO' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' RULE='3' ACTION='ACCEPT' PROTOCOL='TCP' PORT='143,993' IP='0.0.0.0/0' COMMENT='IMAP' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' RULE='4' ACTION='ACCEPT' PROTOCOL='TCP' PORT='110,995' IP='0.0.0.0/0' COMMENT='POP3' SUSPENDED='no' TIME='07:40:16' DATE='2014-05-25' RULE='5' ACTION='ACCEPT' PROTOCOL='TCP' PORT='25,465,587' IP='0.0.0.0/0' COMMENT='SMTP' SUSPENDED='no' TIME='21:47:04' DATE='2018-11-07' diff --git a/install/deb/fail2ban/jail.local b/install/deb/fail2ban/jail.local index 939d4dfba..e33462c4f 100644 --- a/install/deb/fail2ban/jail.local +++ b/install/deb/fail2ban/jail.local @@ -34,7 +34,7 @@ maxretry = 5 [tulio-iptables] enabled = true filter = tulio -action = tulio[name=HESTIA] +action = tulio[name=TULIO] logpath = /var/log/tulio/auth.log maxretry = 5 diff --git a/install/deb/phpmyadmin/tulio-sso.php b/install/deb/phpmyadmin/tulio-sso.php index da5aa1bc9..991d98643 100644 --- a/install/deb/phpmyadmin/tulio-sso.php +++ b/install/deb/phpmyadmin/tulio-sso.php @@ -6,7 +6,7 @@ /* Following keys will get replaced when calling v-add-sys-pma-sso */ define("PHPMYADMIN_KEY", "%PHPMYADMIN_KEY%"); define("API_HOST_NAME", "%API_HOST_NAME%"); -define("API_HESTIA_PORT", "%API_HESTIA_PORT%"); +define("API_TULIO_PORT", "%API_TULIO_PORT%"); define("API_KEY", "%API_KEY%"); class Tulio_API { @@ -19,7 +19,7 @@ class Tulio_API { /** @var string */ private $api_url; public function __construct() { - $this->hostname = "https://" . API_HOST_NAME . ":" . API_HESTIA_PORT . "/api/"; + $this->hostname = "https://" . API_HOST_NAME . ":" . API_TULIO_PORT . "/api/"; $this->key = API_KEY; $this->pma_key = PHPMYADMIN_KEY; } @@ -154,10 +154,10 @@ function session_invalid() { if (!empty($_GET)) { if (isset($_GET["logout"])) { $api->delete_temp_user( - $_SESSION["HESTIA_sso_database"], - $_SESSION["HESTIA_sso_user"], + $_SESSION["TULIO_sso_database"], + $_SESSION["TULIO_sso_user"], $_SESSION["PMA_single_signon_user"], - $_SESSION["HESTIA_sso_host"], + $_SESSION["TULIO_sso_host"], ); //remove session session_invalid(); @@ -185,9 +185,9 @@ function session_invalid() { $_SESSION["PMA_single_signon_password"] = $data->login->password; $_SESSION["PMA_single_signon_host"] = $host; //save database / username to be used for sending logout notification. - $_SESSION["HESTIA_sso_user"] = $user; - $_SESSION["HESTIA_sso_database"] = $database; - $_SESSION["HESTIA_sso_host"] = $host; + $_SESSION["TULIO_sso_user"] = $user; + $_SESSION["TULIO_sso_database"] = $database; + $_SESSION["TULIO_sso_host"] = $host; @session_write_close(); setcookie($session_name, $id, 0, "/"); diff --git a/install/hst-install-debian.sh b/install/hst-install-debian.sh index b90645b78..837342130 100755 --- a/install/hst-install-debian.sh +++ b/install/hst-install-debian.sh @@ -18,7 +18,7 @@ export DEBIAN_FRONTEND=noninteractive RHOST='apt.tuliocp.com' VERSION='debian' # Using Tulio package paths temporarily until TulioCP packages are available -HESTIA_ROOT='/usr/local/tulio' +TULIO_ROOT='/usr/local/tulio' TULIO='/usr/local/tulio' LOG="/root/hst_install_backups/hst_install-$(date +%d%m%Y%H%M).log" memory=$(grep 'MemTotal' /proc/meminfo | tr ' ' '\n' | grep [0-9]) @@ -28,14 +28,14 @@ os='debian' release="$(cat /etc/debian_version | tr "." "\n" | head -n1)" codename="$(cat /etc/os-release | grep VERSION= | cut -f 2 -d \( | cut -f 1 -d \))" architecture="$(arch)" -HESTIA_INSTALL_DIR="$HESTIA_ROOT/install/deb" -HESTIA_COMMON_DIR="$HESTIA_ROOT/install/common" -TULIO_INSTALL_DIR="$HESTIA_INSTALL_DIR" -TULIO_COMMON_DIR="$HESTIA_COMMON_DIR" +TULIO_INSTALL_DIR="$TULIO_ROOT/install/deb" +TULIO_COMMON_DIR="$TULIO_ROOT/install/common" +TULIO_INSTALL_DIR="$TULIO_INSTALL_DIR" +TULIO_COMMON_DIR="$TULIO_COMMON_DIR" VERBOSE='no' # Define software versions -HESTIA_INSTALL_VER='1.10.0~alpha' +TULIO_INSTALL_VER='1.10.0~alpha' # Supported PHP versions multiphp_v=("5.6" "7.0" "7.1" "7.2" "7.3" "7.4" "8.0" "8.1" "8.2" "8.3" "8.4") # One of the following PHP versions is required for Roundcube / phpmyadmin @@ -150,37 +150,37 @@ set_default_value() { # Defining function to set default language value set_default_lang() { - if [ -z "$lang" ]; then - eval lang=$1 - fi - lang_list="ar az bg bn bs ca cs da de el en es fa fi fr hr hu id it ja ka ku ko nl no pl pt pt-br ro ru sk sq sr sv th tr uk ur vi zh-cn zh-tw" - if ! (echo $lang_list | grep -w $lang > /dev/null 2>&1); then - eval lang=$1 - fi + if [ -z "$lang" ]; then + eval lang=$1 + fi + lang_list="ar az bg bn bs ca cs da de el en es fa fi fr hr hu id it ja ka ku ko nl no pl pt pt-br ro ru sk sq sr sv th tr uk ur vi zh-cn zh-tw" + if ! (echo $lang_list | grep -w $lang > /dev/null 2>&1); then + eval lang=$1 + fi } # Safely prompt for user input even when the installer is executed via a pipe prompt_input() { - local __prompt="$1" - local __var_name="$2" - local __read_opts="${3:--r}" - local __input - - if [ -t 0 ]; then - read $__read_opts -p "$__prompt" __input - elif [ -r /dev/tty ]; then - read $__read_opts -p "$__prompt" __input < /dev/tty - else - return 1 - fi + local __prompt="$1" + local __var_name="$2" + local __read_opts="${3:--r}" + local __input + + if [ -t 0 ]; then + read $__read_opts -p "$__prompt" __input + elif [ -r /dev/tty ]; then + read $__read_opts -p "$__prompt" __input < /dev/tty + else + return 1 + fi - local __status=$? - if [ $__status -ne 0 ]; then - return $__status - fi + local __status=$? + if [ $__status -ne 0 ]; then + return $__status + fi - printf -v "$__var_name" '%s' "$__input" - return 0 + printf -v "$__var_name" '%s' "$__input" + return 0 } # Define the default backend port @@ -523,15 +523,15 @@ if [ -n "$conflicts" ] && [ -z "$force" ]; then echo echo '!!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!! !!!' echo - if ! prompt_input 'Would you like to remove the conflicting packages? [y/N] ' answer; then - check_result 1 "Unable to read user input from terminal." - fi - if [ "$answer" = 'y' ] || [ "$answer" = 'Y' ]; then - apt-get -qq purge $conflicts -y - check_result $? 'apt-get remove failed' - unset $answer - else - check_result 1 "TulioCP should be installed on a clean server." + if ! prompt_input 'Would you like to remove the conflicting packages? [y/N] ' answer; then + check_result 1 "Unable to read user input from terminal." + fi + if [ "$answer" = 'y' ] || [ "$answer" = 'Y' ]; then + apt-get -qq purge $conflicts -y + check_result $? 'apt-get remove failed' + unset $answer + else + check_result 1 "TulioCP should be installed on a clean server." fi fi @@ -590,17 +590,17 @@ esac #----------------------------------------------------------# install_welcome_message() { - DISPLAY_VER=$(echo $HESTIA_INSTALL_VER | sed "s|~alpha||g" | sed "s|~beta||g") + DISPLAY_VER=$(echo $TULIO_INSTALL_VER | sed "s|~alpha||g" | sed "s|~beta||g") echo echo "========================================================================" echo " " echo " TulioCP " echo " Web Server Control Panel " echo " " - if [[ "$HESTIA_INSTALL_VER" =~ "beta" ]]; then + if [[ "$TULIO_INSTALL_VER" =~ "beta" ]]; then echo " BETA RELEASE " fi - if [[ "$HESTIA_INSTALL_VER" =~ "alpha" ]]; then + if [[ "$TULIO_INSTALL_VER" =~ "alpha" ]]; then echo " DEVELOPMENT SNAPSHOT " echo " NOT INTENDED FOR PRODUCTION USE " echo " USE AT YOUR OWN RISK " @@ -703,41 +703,41 @@ echo -e "\n" # Asking for confirmation to proceed if [ "$interactive" = 'yes' ]; then - if ! prompt_input 'Would you like to continue with the installation? [y/N]: ' answer; then - echo 'Error: unable to read user input. If you are running non-interactively, re-run the installer with --interactive no and supply the required options.' - exit 1 - fi - if [ "$answer" != 'y' ] && [ "$answer" != 'Y' ]; then - echo 'Goodbye' - exit 1 - fi + if ! prompt_input 'Would you like to continue with the installation? [y/N]: ' answer; then + echo 'Error: unable to read user input. If you are running non-interactively, re-run the installer with --interactive no and supply the required options.' + exit 1 + fi + if [ "$answer" != 'y' ] && [ "$answer" != 'Y' ]; then + echo 'Goodbye' + exit 1 + fi fi # Validate Username / Password / Email / Hostname even when interactive = no if [ -z "$username" ]; then while validate_username; do - if ! prompt_input 'Please enter administrator username: ' username; then - echo 'Error: unable to read administrator username from terminal input.' - exit 1 - fi - done + if ! prompt_input 'Please enter administrator username: ' username; then + echo 'Error: unable to read administrator username from terminal input.' + exit 1 + fi + done else - if validate_username; then - exit 1 - fi + if validate_username; then + exit 1 + fi fi # Ask for password if [ -z "$vpass" ]; then - while validate_password; do - if ! prompt_input 'Please enter administrator password: ' vpass; then - echo 'Error: unable to read administrator password from terminal input.' - exit 1 - fi - done + while validate_password; do + if ! prompt_input 'Please enter administrator password: ' vpass; then + echo 'Error: unable to read administrator password from terminal input.' + exit 1 + fi + done else - if validate_password; then - echo "Please use a valid password" + if validate_password; then + echo "Please use a valid password" exit 1 fi fi @@ -746,15 +746,15 @@ fi # Asking for contact email if [ -z "$email" ]; then while validate_email; do - echo -e "\nPlease use a valid emailadress (ex. info@domain.tld)." - if ! prompt_input 'Please enter admin email address: ' email; then - echo 'Error: unable to read admin email address from terminal input.' - exit 1 - fi - done + echo -e "\nPlease use a valid emailadress (ex. info@domain.tld)." + if ! prompt_input 'Please enter admin email address: ' email; then + echo 'Error: unable to read admin email address from terminal input.' + exit 1 + fi + done else - if validate_email; then - echo "Please use a valid emailadress (ex. info@domain.tld)." + if validate_email; then + echo "Please use a valid emailadress (ex. info@domain.tld)." exit 1 fi fi @@ -762,10 +762,10 @@ fi # Asking to set FQDN hostname if [ -z "$servername" ]; then # Ask and validate FQDN hostname. - if ! prompt_input "Please enter FQDN hostname [$(hostname -f)]: " servername; then - echo 'Error: unable to read server hostname from terminal input.' - exit 1 - fi + if ! prompt_input "Please enter FQDN hostname [$(hostname -f)]: " servername; then + echo 'Error: unable to read server hostname from terminal input.' + exit 1 + fi # Set hostname if it wasn't set if [ -z "$servername" ]; then @@ -775,10 +775,10 @@ if [ -z "$servername" ]; then # Validate Hostname, go to loop if the validation fails. while validate_hostname; do echo -e "\nPlease use a valid hostname according to RFC1178 (ex. hostname.domain.tld)." - if ! prompt_input "Please enter FQDN hostname [$(hostname -f)]: " servername; then - echo 'Error: unable to read server hostname from terminal input.' - exit 1 - fi + if ! prompt_input "Please enter FQDN hostname [$(hostname -f)]: " servername; then + echo 'Error: unable to read server hostname from terminal input.' + exit 1 + fi done else # Validate FQDN hostname if it is preset @@ -1112,7 +1112,7 @@ if [ -d "$withdebs" ]; then software=$(echo "$software" | sed -e "s/tulio-nginx//") software=$(echo "$software" | sed -e "s/tulio-php//") software=$(echo "$software" | sed -e "s/tulio-web-terminal//") - software=$(echo "$software" | sed -e "s/tuliocp=${HESTIA_INSTALL_VER}//") + software=$(echo "$software" | sed -e "s/tuliocp=${TULIO_INSTALL_VER}//") fi #----------------------------------------------------------# @@ -1191,9 +1191,9 @@ if [ ! -d "$TULIO" ]; then # Create TulioCP base directory mkdir -p "$TULIO" # Link Tulio installation files to TulioCP paths - if [ -d "$HESTIA_ROOT" ]; then + if [ -d "$TULIO_ROOT" ]; then # Copy Tulio files to TulioCP directory - cp -r "$HESTIA_ROOT/"* "$TULIO/" + cp -r "$TULIO_ROOT/"* "$TULIO/" echo "Tulio files copied to TulioCP directory" fi fi @@ -1297,7 +1297,7 @@ chmod 440 /etc/sudoers.d/tulioweb # Add Tulio global config mkdir -p /etc/tuliocp if [[ ! -e /etc/tuliocp/tulio.conf ]]; then - cat < /etc/tuliocp/tulio.conf + cat << EOF > /etc/tuliocp/tulio.conf # Do not edit this file, will get overwritten on next upgrade, use /etc/tuliocp/local.conf instead export TULIO='$TULIO' @@ -1305,15 +1305,15 @@ export TULIO='$TULIO' [[ -f /etc/tuliocp/local.conf ]] && source /etc/tuliocp/local.conf EOF else - if grep -q '^export HESTIA=' /etc/tuliocp/tulio.conf; then - sed -i "/^export HESTIA=/d" /etc/tuliocp/tulio.conf - fi - if ! grep -q '^export TULIO=' /etc/tuliocp/tulio.conf; then - echo "export TULIO='$TULIO'" >> /etc/tuliocp/tulio.conf - fi - if ! grep -q 'source /etc/tuliocp/local.conf' /etc/tuliocp/tulio.conf; then - echo "[[ -f /etc/tuliocp/local.conf ]] && source /etc/tuliocp/local.conf" >> /etc/tuliocp/tulio.conf - fi + if grep -q '^export TULIO=' /etc/tuliocp/tulio.conf; then + sed -i "/^export TULIO=/d" /etc/tuliocp/tulio.conf + fi + if ! grep -q '^export TULIO=' /etc/tuliocp/tulio.conf; then + echo "export TULIO='$TULIO'" >> /etc/tuliocp/tulio.conf + fi + if ! grep -q 'source /etc/tuliocp/local.conf' /etc/tuliocp/tulio.conf; then + echo "[[ -f /etc/tuliocp/local.conf ]] && source /etc/tuliocp/local.conf" >> /etc/tuliocp/tulio.conf + fi fi # Configuring system env @@ -1472,7 +1472,7 @@ write_config_value "THEME" "dark" write_config_value "INACTIVE_SESSION_TIMEOUT" "60" # Version & Release Branch -write_config_value "VERSION" "${HESTIA_INSTALL_VER}" +write_config_value "VERSION" "${TULIO_INSTALL_VER}" write_config_value "RELEASE_BRANCH" "release" # Email notifications after upgrade @@ -2445,10 +2445,10 @@ echo # Ensure Tulio service init script and systemd unit are available if [ ! -f "/etc/init.d/tulio" ]; then - if [ -f "$TULIO/install/deb/nginx/tulio" ]; then - cp -f "$TULIO/install/deb/nginx/tulio" /etc/init.d/tulio - else - cat <<'EOF' > /etc/init.d/tulio + if [ -f "$TULIO/install/deb/nginx/tulio" ]; then + cp -f "$TULIO/install/deb/nginx/tulio" /etc/init.d/tulio + else + cat << 'EOF' > /etc/init.d/tulio #!/bin/sh ### BEGIN INIT INFO @@ -2652,12 +2652,12 @@ esac exit 0 EOF - fi - chmod 755 /etc/init.d/tulio + fi + chmod 755 /etc/init.d/tulio fi if [ ! -f "/lib/systemd/system/tulio.service" ]; then - cat <<'EOF' > /lib/systemd/system/tulio.service + cat << 'EOF' > /lib/systemd/system/tulio.service [Unit] Description=Tulio Control Panel After=network.target @@ -2672,8 +2672,8 @@ RemainAfterExit=yes [Install] WantedBy=multi-user.target EOF - chmod 644 /lib/systemd/system/tulio.service - systemctl daemon-reload > /dev/null 2>&1 + chmod 644 /lib/systemd/system/tulio.service + systemctl daemon-reload > /dev/null 2>&1 fi # Starting Tulio service diff --git a/install/hst-install-ubuntu.sh b/install/hst-install-ubuntu.sh index 96bca517b..db4053820 100755 --- a/install/hst-install-ubuntu.sh +++ b/install/hst-install-ubuntu.sh @@ -18,7 +18,7 @@ export DEBIAN_FRONTEND=noninteractive RHOST='apt.tuliocp.com' VERSION='ubuntu' # Using Tulio package paths temporarily until TulioCP packages are available -HESTIA_ROOT='/usr/local/tulio' +TULIO_ROOT='/usr/local/tulio' TULIO='/usr/local/tulio' LOG="/root/hst_install_backups/hst_install-$(date +%d%m%Y%H%M).log" memory=$(grep 'MemTotal' /proc/meminfo | tr ' ' '\n' | grep [0-9]) @@ -28,15 +28,15 @@ os='ubuntu' release="$(lsb_release -s -r)" codename="$(lsb_release -s -c)" architecture="$(arch)" -HESTIA_INSTALL_DIR="$HESTIA_ROOT/install/deb" -HESTIA_COMMON_DIR="$HESTIA_ROOT/install/common" +TULIO_INSTALL_DIR="$TULIO_ROOT/install/deb" +TULIO_COMMON_DIR="$TULIO_ROOT/install/common" # TulioCP directories (using repository paths during installation) TULIO_INSTALL_DIR="$(pwd)/install/deb" TULIO_COMMON_DIR="$(pwd)/install/common" VERBOSE='no' # Define software versions -HESTIA_INSTALL_VER='1.10.0~alpha' +TULIO_INSTALL_VER='1.10.0~alpha' # Supported PHP versions multiphp_v=("5.6" "7.0" "7.1" "7.2" "7.3" "7.4" "8.0" "8.1" "8.2" "8.3" "8.4") # One of the following PHP versions is required for Roundcube / phpmyadmin @@ -580,17 +580,17 @@ esac #----------------------------------------------------------# install_welcome_message() { - DISPLAY_VER=$(echo $HESTIA_INSTALL_VER | sed "s|~alpha||g" | sed "s|~beta||g") + DISPLAY_VER=$(echo $TULIO_INSTALL_VER | sed "s|~alpha||g" | sed "s|~beta||g") echo echo "========================================================================" echo " " echo " TulioCP " echo " Web Server Control Panel " echo " " - if [[ "$HESTIA_INSTALL_VER" =~ "beta" ]]; then + if [[ "$TULIO_INSTALL_VER" =~ "beta" ]]; then echo " BETA RELEASE " fi - if [[ "$HESTIA_INSTALL_VER" =~ "alpha" ]]; then + if [[ "$TULIO_INSTALL_VER" =~ "alpha" ]]; then echo " DEVELOPMENT SNAPSHOT " echo " NOT INTENDED FOR PRODUCTION USE " echo " USE AT YOUR OWN RISK " @@ -1094,7 +1094,7 @@ if [ -d "$withdebs" ]; then software=$(echo "$software" | sed -e "s/tulio-nginx//") software=$(echo "$software" | sed -e "s/tulio-php//") software=$(echo "$software" | sed -e "s/tulio-web-terminal//") - software=$(echo "$software" | sed -e "s/tuliocp=${HESTIA_INSTALL_VER}//") + software=$(echo "$software" | sed -e "s/tuliocp=${TULIO_INSTALL_VER}//") fi if [ "$release" = '24.04' ]; then @@ -1191,135 +1191,135 @@ fi echo "[ * ] Setting up TulioCP directory structure..." DOWNLOAD_TMP_DIR="" if [ ! -d "$TULIO" ]; then - # Create TulioCP base directory - mkdir -p "$TULIO" - - # Try to find the repository source files - # Check multiple possible locations for source files - SOURCE_DIR="" - for possible_dir in "$(pwd)" "$(dirname $0)/.." "/tmp/tuliocp-source" "$HOME/tuliocp"; do - if [ -d "$possible_dir/bin" ] && [ -d "$possible_dir/install" ]; then - SOURCE_DIR="$possible_dir" - break - fi - done + # Create TulioCP base directory + mkdir -p "$TULIO" + + # Try to find the repository source files + # Check multiple possible locations for source files + SOURCE_DIR="" + for possible_dir in "$(pwd)" "$(dirname $0)/.." "/tmp/tuliocp-source" "$HOME/tuliocp"; do + if [ -d "$possible_dir/bin" ] && [ -d "$possible_dir/install" ]; then + SOURCE_DIR="$possible_dir" + break + fi + done - if [ -z "$SOURCE_DIR" ]; then - echo "Warning: Could not locate TulioCP source files locally" - echo "Attempting to download TulioCP source archive..." - - if command -v curl >/dev/null 2>&1 || command -v wget >/dev/null 2>&1; then - DOWNLOAD_TMP_DIR=$(mktemp -d 2>/dev/null) - if [ -n "$DOWNLOAD_TMP_DIR" ] && [ -d "$DOWNLOAD_TMP_DIR" ]; then - ARCHIVE_PATH="$DOWNLOAD_TMP_DIR/tuliocp.tar.gz" - REPO_ARCHIVE_URL="https://github.com/contaura/tuliocp/archive/refs/heads/main.tar.gz" - - if command -v curl >/dev/null 2>&1; then - curl -fsSL "$REPO_ARCHIVE_URL" -o "$ARCHIVE_PATH" >> $LOG 2>&1 - else - wget -qO "$ARCHIVE_PATH" "$REPO_ARCHIVE_URL" >> $LOG 2>&1 - fi - - if [ $? -eq 0 ] && tar -xzf "$ARCHIVE_PATH" -C "$DOWNLOAD_TMP_DIR" >> $LOG 2>&1; then - SOURCE_DIR=$(find "$DOWNLOAD_TMP_DIR" -maxdepth 1 -mindepth 1 -type d -name 'tuliocp-*' | head -n1) - if [ -n "$SOURCE_DIR" ] && [ -d "$SOURCE_DIR/bin" ] && [ -d "$SOURCE_DIR/install" ]; then - echo "โœ“ Downloaded TulioCP source archive" - else - echo "Warning: Downloaded archive did not contain expected TulioCP structure" - SOURCE_DIR="" - fi - else - echo "Warning: Failed to download TulioCP source archive" - SOURCE_DIR="" - fi - else - echo "Warning: Unable to create temporary directory for download" - fi - else - echo "Warning: Neither curl nor wget available, cannot download TulioCP source files" - fi - fi + if [ -z "$SOURCE_DIR" ]; then + echo "Warning: Could not locate TulioCP source files locally" + echo "Attempting to download TulioCP source archive..." + + if command -v curl > /dev/null 2>&1 || command -v wget > /dev/null 2>&1; then + DOWNLOAD_TMP_DIR=$(mktemp -d 2> /dev/null) + if [ -n "$DOWNLOAD_TMP_DIR" ] && [ -d "$DOWNLOAD_TMP_DIR" ]; then + ARCHIVE_PATH="$DOWNLOAD_TMP_DIR/tuliocp.tar.gz" + REPO_ARCHIVE_URL="https://github.com/contaura/tuliocp/archive/refs/heads/main.tar.gz" + + if command -v curl > /dev/null 2>&1; then + curl -fsSL "$REPO_ARCHIVE_URL" -o "$ARCHIVE_PATH" >> $LOG 2>&1 + else + wget -qO "$ARCHIVE_PATH" "$REPO_ARCHIVE_URL" >> $LOG 2>&1 + fi + + if [ $? -eq 0 ] && tar -xzf "$ARCHIVE_PATH" -C "$DOWNLOAD_TMP_DIR" >> $LOG 2>&1; then + SOURCE_DIR=$(find "$DOWNLOAD_TMP_DIR" -maxdepth 1 -mindepth 1 -type d -name 'tuliocp-*' | head -n1) + if [ -n "$SOURCE_DIR" ] && [ -d "$SOURCE_DIR/bin" ] && [ -d "$SOURCE_DIR/install" ]; then + echo "โœ“ Downloaded TulioCP source archive" + else + echo "Warning: Downloaded archive did not contain expected TulioCP structure" + SOURCE_DIR="" + fi + else + echo "Warning: Failed to download TulioCP source archive" + SOURCE_DIR="" + fi + else + echo "Warning: Unable to create temporary directory for download" + fi + else + echo "Warning: Neither curl nor wget available, cannot download TulioCP source files" + fi + fi - if [ -n "$SOURCE_DIR" ]; then - echo "Using TulioCP source files from: $SOURCE_DIR" + if [ -n "$SOURCE_DIR" ]; then + echo "Using TulioCP source files from: $SOURCE_DIR" - # Copy essential directories with verification - if [ -d "$SOURCE_DIR/bin" ]; then - cp -r "$SOURCE_DIR/bin" "$TULIO/" && echo "โœ“ bin directory copied successfully" || echo "โœ— bin directory copy failed" - else - echo "โœ— bin directory not found in source" - fi + # Copy essential directories with verification + if [ -d "$SOURCE_DIR/bin" ]; then + cp -r "$SOURCE_DIR/bin" "$TULIO/" && echo "โœ“ bin directory copied successfully" || echo "โœ— bin directory copy failed" + else + echo "โœ— bin directory not found in source" + fi - if [ -d "$SOURCE_DIR/func" ]; then - cp -r "$SOURCE_DIR/func" "$TULIO/" && echo "โœ“ func directory copied successfully" || echo "โœ— func directory copy failed" - else - echo "โœ— func directory not found in source" - fi + if [ -d "$SOURCE_DIR/func" ]; then + cp -r "$SOURCE_DIR/func" "$TULIO/" && echo "โœ“ func directory copied successfully" || echo "โœ— func directory copy failed" + else + echo "โœ— func directory not found in source" + fi - if [ -d "$SOURCE_DIR/web" ]; then - cp -r "$SOURCE_DIR/web" "$TULIO/" && echo "โœ“ web directory copied successfully" || echo "โœ— web directory copy failed" - else - echo "โœ— web directory not found in source" - fi + if [ -d "$SOURCE_DIR/web" ]; then + cp -r "$SOURCE_DIR/web" "$TULIO/" && echo "โœ“ web directory copied successfully" || echo "โœ— web directory copy failed" + else + echo "โœ— web directory not found in source" + fi - if [ -d "$SOURCE_DIR/install" ]; then - cp -r "$SOURCE_DIR/install" "$TULIO/" && echo "โœ“ install directory copied successfully" || echo "โœ— install directory copy failed" - else - echo "โœ— install directory not found in source" - fi + if [ -d "$SOURCE_DIR/install" ]; then + cp -r "$SOURCE_DIR/install" "$TULIO/" && echo "โœ“ install directory copied successfully" || echo "โœ— install directory copy failed" + else + echo "โœ— install directory not found in source" + fi - # Verify bin directory was copied and make scripts executable - if [ -d "$TULIO/bin" ]; then - echo "Setting executable permissions on CLI scripts..." - chmod +x $TULIO/bin/* 2>/dev/null - echo "โœ“ TulioCP CLI scripts ready" - else - echo "โœ— Warning: bin directory not available after copy - CLI features will not work" - fi + # Verify bin directory was copied and make scripts executable + if [ -d "$TULIO/bin" ]; then + echo "Setting executable permissions on CLI scripts..." + chmod +x $TULIO/bin/* 2> /dev/null + echo "โœ“ TulioCP CLI scripts ready" + else + echo "โœ— Warning: bin directory not available after copy - CLI features will not work" + fi - echo "TulioCP files copied to installation directory" - else - echo "Error: Unable to obtain TulioCP source files." - echo "Please ensure TulioCP packages are available or rerun the installer with the --with-debs option." - [ -n "$DOWNLOAD_TMP_DIR" ] && rm -rf "$DOWNLOAD_TMP_DIR" - exit 1 - fi + echo "TulioCP files copied to installation directory" + else + echo "Error: Unable to obtain TulioCP source files." + echo "Please ensure TulioCP packages are available or rerun the installer with the --with-debs option." + [ -n "$DOWNLOAD_TMP_DIR" ] && rm -rf "$DOWNLOAD_TMP_DIR" + exit 1 + fi - # Clean up downloaded archive if we created one - if [ -n "$DOWNLOAD_TMP_DIR" ] && [ -d "$DOWNLOAD_TMP_DIR" ]; then - rm -rf "$DOWNLOAD_TMP_DIR" - fi + # Clean up downloaded archive if we created one + if [ -n "$DOWNLOAD_TMP_DIR" ] && [ -d "$DOWNLOAD_TMP_DIR" ]; then + rm -rf "$DOWNLOAD_TMP_DIR" + fi - # Update TULIO_INSTALL_DIR and TULIO_COMMON_DIR to point to installed locations - TULIO_INSTALL_DIR="$TULIO/install/deb" - TULIO_COMMON_DIR="$TULIO/install/common" + # Update TULIO_INSTALL_DIR and TULIO_COMMON_DIR to point to installed locations + TULIO_INSTALL_DIR="$TULIO/install/deb" + TULIO_COMMON_DIR="$TULIO/install/common" fi # Refresh install directories to point at the active TulioCP location if [ -d "$TULIO/install/deb" ]; then - TULIO_INSTALL_DIR="$TULIO/install/deb" + TULIO_INSTALL_DIR="$TULIO/install/deb" fi if [ -d "$TULIO/install/common" ]; then - TULIO_COMMON_DIR="$TULIO/install/common" + TULIO_COMMON_DIR="$TULIO/install/common" fi # Ensure critical TulioCP files exist before continuing missing_requirements=() if [ ! -f "$TULIO/func/main.sh" ]; then - missing_requirements+=("$TULIO/func/main.sh") + missing_requirements+=("$TULIO/func/main.sh") fi if [ ! -f "$TULIO_INSTALL_DIR/nginx/nginx.conf" ]; then - missing_requirements+=("$TULIO_INSTALL_DIR/nginx/nginx.conf") + missing_requirements+=("$TULIO_INSTALL_DIR/nginx/nginx.conf") fi if [ ${#missing_requirements[@]} -gt 0 ]; then - echo "Error: Required TulioCP files are missing:" - for missing_file in "${missing_requirements[@]}"; do - echo " - $missing_file" - done - echo "TulioCP package installation appears incomplete." - echo "Please verify repository access or provide local packages with the --with-debs option." - exit 1 + echo "Error: Required TulioCP files are missing:" + for missing_file in "${missing_requirements[@]}"; do + echo " - $missing_file" + done + echo "TulioCP package installation appears incomplete." + echo "Please verify repository access or provide local packages with the --with-debs option." + exit 1 fi # Restoring autostart policy @@ -1462,7 +1462,7 @@ fi # Add Tulio global config mkdir -p /etc/tuliocp if [[ ! -e /etc/tuliocp/tulio.conf ]]; then - cat < /etc/tuliocp/tulio.conf + cat << EOF > /etc/tuliocp/tulio.conf # Do not edit this file, will get overwritten on next upgrade, use /etc/tuliocp/local.conf instead export TULIO='$TULIO' @@ -1470,15 +1470,15 @@ export TULIO='$TULIO' [[ -f /etc/tuliocp/local.conf ]] && source /etc/tuliocp/local.conf EOF else - if grep -q '^export HESTIA=' /etc/tuliocp/tulio.conf; then - sed -i "/^export HESTIA=/d" /etc/tuliocp/tulio.conf - fi - if ! grep -q '^export TULIO=' /etc/tuliocp/tulio.conf; then - echo "export TULIO='$TULIO'" >> /etc/tuliocp/tulio.conf - fi - if ! grep -q 'source /etc/tuliocp/local.conf' /etc/tuliocp/tulio.conf; then - echo "[[ -f /etc/tuliocp/local.conf ]] && source /etc/tuliocp/local.conf" >> /etc/tuliocp/tulio.conf - fi + if grep -q '^export TULIO=' /etc/tuliocp/tulio.conf; then + sed -i "/^export TULIO=/d" /etc/tuliocp/tulio.conf + fi + if ! grep -q '^export TULIO=' /etc/tuliocp/tulio.conf; then + echo "export TULIO='$TULIO'" >> /etc/tuliocp/tulio.conf + fi + if ! grep -q 'source /etc/tuliocp/local.conf' /etc/tuliocp/tulio.conf; then + echo "[[ -f /etc/tuliocp/local.conf ]] && source /etc/tuliocp/local.conf" >> /etc/tuliocp/tulio.conf + fi fi # Configuring system env @@ -1648,7 +1648,7 @@ write_config_value "THEME" "dark" write_config_value "INACTIVE_SESSION_TIMEOUT" "60" # Version & Release Branch -write_config_value "VERSION" "${HESTIA_INSTALL_VER}" +write_config_value "VERSION" "${TULIO_INSTALL_VER}" write_config_value "RELEASE_BRANCH" "release" # Email notifications after upgrade @@ -1692,21 +1692,21 @@ fi IFS='.' read -r -a domain_elements <<< "$servername" if [ -n "${domain_elements[-2]}" ] && [ -n "${domain_elements[-1]}" ]; then serverdomain="${domain_elements[-2]}.${domain_elements[-1]}" - if [ -f $TULIO/data/packages/*.pkg 2>/dev/null ]; then - sed -i s/"domain.tld"/"$serverdomain"/g $TULIO/data/packages/*.pkg 2>/dev/null + if [ -f $TULIO/data/packages/*.pkg ] 2> /dev/null; then + sed -i s/"domain.tld"/"$serverdomain"/g $TULIO/data/packages/*.pkg 2> /dev/null fi fi # Installing templates mkdir -p $TULIO/data/templates if [ -d "$TULIO_INSTALL_DIR/templates" ]; then - cp -rf $TULIO_INSTALL_DIR/templates/* $TULIO/data/templates/ 2>/dev/null + cp -rf $TULIO_INSTALL_DIR/templates/* $TULIO/data/templates/ 2> /dev/null fi if [ -d "$TULIO_COMMON_DIR/templates/web" ]; then - cp -rf $TULIO_COMMON_DIR/templates/web $TULIO/data/templates/ 2>/dev/null + cp -rf $TULIO_COMMON_DIR/templates/web $TULIO/data/templates/ 2> /dev/null fi if [ -d "$TULIO_COMMON_DIR/templates/dns" ]; then - cp -rf $TULIO_COMMON_DIR/templates/dns $TULIO/data/templates/ 2>/dev/null + cp -rf $TULIO_COMMON_DIR/templates/dns $TULIO/data/templates/ 2> /dev/null fi mkdir -p /var/www/html @@ -1720,7 +1720,7 @@ else fi if [ -d "$TULIO_COMMON_DIR/templates/web/skel/document_errors" ]; then - cp -rf $TULIO_COMMON_DIR/templates/web/skel/document_errors/* /var/www/document_errors/ 2>/dev/null + cp -rf $TULIO_COMMON_DIR/templates/web/skel/document_errors/* /var/www/document_errors/ 2> /dev/null else echo '

404 Not Found

' > /var/www/document_errors/404.html fi @@ -1728,7 +1728,7 @@ fi # Installing firewall rules if [ -d "$TULIO_COMMON_DIR/firewall" ]; then cp -rf $TULIO_COMMON_DIR/firewall $TULIO/data/ - rm -f $TULIO/data/firewall/ipset/blacklist.sh $TULIO/data/firewall/ipset/blacklist.ipv6.sh 2>/dev/null + rm -f $TULIO/data/firewall/ipset/blacklist.sh $TULIO/data/firewall/ipset/blacklist.ipv6.sh 2> /dev/null else echo "Warning: firewall rules not found, creating minimal firewall structure" mkdir -p $TULIO/data/firewall @@ -1766,7 +1766,7 @@ if [ -x "$TULIO/bin/v-change-sys-hostname" ]; then $TULIO/bin/v-change-sys-hostname $servername > /dev/null 2>&1 else echo "Warning: Hostname script not found, setting hostname manually" - hostname $servername 2>/dev/null || echo "Warning: Failed to set hostname" + hostname $servername 2> /dev/null || echo "Warning: Failed to set hostname" fi # Configuring global OpenSSL options @@ -1803,7 +1803,7 @@ cp /tmp/hst.crt certificate.crt cp /tmp/hst.key certificate.key # Set proper ownership and permissions -chown root:mail $TULIO/ssl/* 2>/dev/null || chown root:root $TULIO/ssl/* +chown root:mail $TULIO/ssl/* 2> /dev/null || chown root:root $TULIO/ssl/* chmod 660 $TULIO/ssl/* # Clean up temporary files @@ -2676,10 +2676,10 @@ echo # Ensure Tulio service init script and systemd unit are available if [ ! -f "/etc/init.d/tulio" ]; then - if [ -f "$TULIO/install/deb/nginx/tulio" ]; then - cp -f "$TULIO/install/deb/nginx/tulio" /etc/init.d/tulio - else - cat <<'EOF' > /etc/init.d/tulio + if [ -f "$TULIO/install/deb/nginx/tulio" ]; then + cp -f "$TULIO/install/deb/nginx/tulio" /etc/init.d/tulio + else + cat << 'EOF' > /etc/init.d/tulio #!/bin/sh ### BEGIN INIT INFO @@ -2883,12 +2883,12 @@ esac exit 0 EOF - fi - chmod 755 /etc/init.d/tulio + fi + chmod 755 /etc/init.d/tulio fi if [ ! -f "/lib/systemd/system/tulio.service" ]; then - cat <<'EOF' > /lib/systemd/system/tulio.service + cat << 'EOF' > /lib/systemd/system/tulio.service [Unit] Description=Tulio Control Panel After=network.target @@ -2903,8 +2903,8 @@ RemainAfterExit=yes [Install] WantedBy=multi-user.target EOF - chmod 644 /lib/systemd/system/tulio.service - systemctl daemon-reload > /dev/null 2>&1 + chmod 644 /lib/systemd/system/tulio.service + systemctl daemon-reload > /dev/null 2>&1 fi # Starting Tulio service diff --git a/install/hst-install.sh b/install/hst-install.sh index 2b28b4135..3ba45efcc 100755 --- a/install/hst-install.sh +++ b/install/hst-install.sh @@ -23,7 +23,7 @@ fi FORCE_INSTALL=false for arg in "$@"; do case $arg in - --force|-f) + --force | -f) FORCE_INSTALL=true ;; esac @@ -33,7 +33,7 @@ done if [ ! -z "$(grep ^admin: /etc/passwd)" ]; then if [ "$FORCE_INSTALL" = "true" ]; then echo "[ * ] Removing existing admin user (--force enabled)..." - userdel admin 2>/dev/null || true + userdel admin 2> /dev/null || true else echo "Error: user admin exists" echo @@ -48,7 +48,7 @@ fi if [ ! -z "$(grep ^admin: /etc/group)" ]; then if [ "$FORCE_INSTALL" = "true" ]; then echo "[ * ] Removing existing admin group (--force enabled)..." - groupdel admin 2>/dev/null || true + groupdel admin 2> /dev/null || true else echo "Error: group admin exists" echo diff --git a/install/upgrade/manual/migrate_apache.sh b/install/upgrade/manual/migrate_apache.sh index 004db02fb..1bb48c30b 100755 --- a/install/upgrade/manual/migrate_apache.sh +++ b/install/upgrade/manual/migrate_apache.sh @@ -33,13 +33,13 @@ php_v="$(multiphp_default_version)" $BIN/v-add-web-php "$php_v" -cp -f "${HESTIA_INSTALL_DIR}/php-fpm/www.conf" "/etc/php/${php_v}/fpm/pool.d/www.conf" +cp -f "${TULIO_INSTALL_DIR}/php-fpm/www.conf" "/etc/php/${php_v}/fpm/pool.d/www.conf" systemctl start php${php_v}-fpm check_result $? "php${php_v}-fpm start failed" update-alternatives --set php /usr/bin/php${php_v} if [ ! -z "$WEB_SYSTEM" ]; then - cp -rf "${HESTIA_INSTALL_DIR}/templates/web/$WEB_SYSTEM" "${WEBTPL}/" + cp -rf "${TULIO_INSTALL_DIR}/templates/web/$WEB_SYSTEM" "${WEBTPL}/" fi sed -i "/^WEB_BACKEND=/d" $TULIO/conf/tulio.conf $TULIO/conf/defaults/tulio.conf diff --git a/install/upgrade/manual/migrate_multiphp.sh b/install/upgrade/manual/migrate_multiphp.sh index 271c5cdd0..a6bd7880e 100755 --- a/install/upgrade/manual/migrate_multiphp.sh +++ b/install/upgrade/manual/migrate_multiphp.sh @@ -53,7 +53,7 @@ if [ "$num_php_versions" -gt 1 ] && [ -z "$WEB_BACKEND" ]; then done if [ ! -z "$WEB_SYSTEM" ]; then - cp -rf "${HESTIA_INSTALL_DIR}/templates/web/$WEB_SYSTEM" "${WEBTPL}/" + cp -rf "${TULIO_INSTALL_DIR}/templates/web/$WEB_SYSTEM" "${WEBTPL}/" fi # Migrate domains diff --git a/install/upgrade/versions/1.3.3.sh b/install/upgrade/versions/1.3.3.sh index 7624bbbc2..83f1fbc64 100644 --- a/install/upgrade/versions/1.3.3.sh +++ b/install/upgrade/versions/1.3.3.sh @@ -15,9 +15,9 @@ fi mkdir -p /etc/tuliocp if [[ ! -e /etc/tuliocp/tulio.conf ]]; then - echo '[ * ] Create global TulioCP config' + echo '[ * ] Create global TulioCP config' - cat < /etc/tuliocp/tulio.conf + cat << EOF > /etc/tuliocp/tulio.conf # Do not edit this file, will get overwritten on next upgrade, use /etc/tuliocp/local.conf instead export TULIO='$TULIO' @@ -25,13 +25,13 @@ export TULIO='$TULIO' [[ -f /etc/tuliocp/local.conf ]] && source /etc/tuliocp/local.conf EOF else - if grep -q '^export HESTIA=' /etc/tuliocp/tulio.conf; then - sed -i "/^export HESTIA=/d" /etc/tuliocp/tulio.conf - fi - if ! grep -q '^export TULIO=' /etc/tuliocp/tulio.conf; then - echo "export TULIO='$TULIO'" >> /etc/tuliocp/tulio.conf - fi - if ! grep -q 'source /etc/tuliocp/local.conf' /etc/tuliocp/tulio.conf; then - echo "[[ -f /etc/tuliocp/local.conf ]] && source /etc/tuliocp/local.conf" >> /etc/tuliocp/tulio.conf - fi + if grep -q '^export TULIO=' /etc/tuliocp/tulio.conf; then + sed -i "/^export TULIO=/d" /etc/tuliocp/tulio.conf + fi + if ! grep -q '^export TULIO=' /etc/tuliocp/tulio.conf; then + echo "export TULIO='$TULIO'" >> /etc/tuliocp/tulio.conf + fi + if ! grep -q 'source /etc/tuliocp/local.conf' /etc/tuliocp/tulio.conf; then + echo "[[ -f /etc/tuliocp/local.conf ]] && source /etc/tuliocp/local.conf" >> /etc/tuliocp/tulio.conf + fi fi diff --git a/scripts/configure-build-integration.sh b/scripts/configure-build-integration.sh index f31e86a71..c70d93c01 100755 --- a/scripts/configure-build-integration.sh +++ b/scripts/configure-build-integration.sh @@ -9,8 +9,8 @@ echo "========================================" # Verify build server setup if [ ! -d "/opt/tuliocp-build" ]; then - echo "โŒ Build server not set up. Run deploy-build-server.sh first." - exit 1 + echo "โŒ Build server not set up. Run deploy-build-server.sh first." + exit 1 fi cd /opt/tuliocp-build @@ -21,23 +21,23 @@ cd tuliocp git pull origin main if ./src/build-minimal-package.sh; then - echo "โœ… Package build successful!" - - # Show built packages - echo "๐Ÿ“ฆ Built packages:" - ls -la /tmp/*.deb 2>/dev/null || echo "No .deb files found" - - # Get package info - for deb in /tmp/*.deb; do - if [ -f "$deb" ]; then - echo "Package info for $(basename $deb):" - dpkg-deb --info "$deb" | head -15 - echo "---" - fi - done + echo "โœ… Package build successful!" + + # Show built packages + echo "๐Ÿ“ฆ Built packages:" + ls -la /tmp/*.deb 2> /dev/null || echo "No .deb files found" + + # Get package info + for deb in /tmp/*.deb; do + if [ -f "$deb" ]; then + echo "Package info for $(basename $deb):" + dpkg-deb --info "$deb" | head -15 + echo "---" + fi + done else - echo "โŒ Package build failed!" - exit 1 + echo "โŒ Package build failed!" + exit 1 fi # Create repository deployment script @@ -230,4 +230,4 @@ echo "" echo "Next steps:" echo "1. Test: ./deploy-to-repo.sh" echo "2. Setup GitHub Actions runner (optional)" -echo "3. Configure automated deployment" \ No newline at end of file +echo "3. Configure automated deployment" diff --git a/scripts/deploy-build-server.sh b/scripts/deploy-build-server.sh index 063518425..4849aaac7 100755 --- a/scripts/deploy-build-server.sh +++ b/scripts/deploy-build-server.sh @@ -9,8 +9,8 @@ echo "================================" # Check if running on supported OS if ! grep -E "Ubuntu|Debian" /etc/os-release; then - echo "โŒ This script requires Ubuntu or Debian" - exit 1 + echo "โŒ This script requires Ubuntu or Debian" + exit 1 fi # Update system @@ -20,22 +20,22 @@ sudo apt update && sudo apt upgrade -y # Install build dependencies echo "๐Ÿ”ง Installing build dependencies..." sudo apt install -y \ - build-essential \ - dpkg-dev \ - git \ - curl \ - wget \ - nodejs \ - npm \ - libssl-dev \ - zlib1g-dev \ - libpcre3-dev \ - libxml2-dev \ - libxslt1-dev \ - libgd-dev \ - libgeoip-dev \ - libzip-dev \ - lsb-release + build-essential \ + dpkg-dev \ + git \ + curl \ + wget \ + nodejs \ + npm \ + libssl-dev \ + zlib1g-dev \ + libpcre3-dev \ + libxml2-dev \ + libxslt1-dev \ + libgd-dev \ + libgeoip-dev \ + libzip-dev \ + lsb-release # Create build directory echo "๐Ÿ“ Setting up build environment..." @@ -46,11 +46,11 @@ cd /opt/tuliocp-build # Clone TulioCP repository echo "๐Ÿ“ฅ Cloning TulioCP repository..." if [ -d "tuliocp" ]; then - cd tuliocp - git pull origin main + cd tuliocp + git pull origin main else - git clone https://github.com/Contaura/tuliocp.git - cd tuliocp + git clone https://github.com/Contaura/tuliocp.git + cd tuliocp fi # Install Node.js dependencies @@ -61,10 +61,10 @@ npm ci --ignore-scripts || echo "โš ๏ธ Node dependencies failed, continuing... echo "๐Ÿงช Testing package build..." chmod +x src/build-minimal-package.sh if ./src/build-minimal-package.sh; then - echo "โœ… Package build successful!" - ls -la /tmp/*.deb 2>/dev/null || echo "No .deb files found" + echo "โœ… Package build successful!" + ls -la /tmp/*.deb 2> /dev/null || echo "No .deb files found" else - echo "โŒ Package build failed, but server is ready for debugging" + echo "โŒ Package build failed, but server is ready for debugging" fi # Create automated build script @@ -103,4 +103,4 @@ echo "2. Setup GitHub Actions runner (see docs/build-server-setup.md)" echo "3. Configure automated deployment to apt.tuliocp.com" echo "" echo "Build directory: /opt/tuliocp-build/" -echo "Auto-build script: /opt/tuliocp-build/auto-build.sh" \ No newline at end of file +echo "Auto-build script: /opt/tuliocp-build/auto-build.sh" diff --git a/scripts/deploy-to-github-pages.sh b/scripts/deploy-to-github-pages.sh index 9fa2b8388..271878b5b 100644 --- a/scripts/deploy-to-github-pages.sh +++ b/scripts/deploy-to-github-pages.sh @@ -10,9 +10,9 @@ echo "๐Ÿš€ Deploying TulioCP packages to GitHub Pages..." # Check if repository exists if [ ! -d "$REPO_DIR" ]; then - echo "โŒ Repository not found at $REPO_DIR" - echo "Run ./deploy-to-repo.sh first to build the repository" - exit 1 + echo "โŒ Repository not found at $REPO_DIR" + echo "Run ./deploy-to-repo.sh first to build the repository" + exit 1 fi # Navigate to build directory @@ -20,15 +20,15 @@ cd "$BUILD_DIR" # Check if we have a git repository for the pages if [ ! -d "tuliocp-pages" ]; then - echo "๐Ÿ“ฅ Cloning GitHub Pages repository..." - git clone -b gh-pages https://github.com/Contaura/tuliocp.git tuliocp-pages || { - echo "๐Ÿ“ฅ Creating new gh-pages branch..." - git clone https://github.com/Contaura/tuliocp.git tuliocp-pages - cd tuliocp-pages - git checkout --orphan gh-pages - git rm -rf . - cd .. - } + echo "๐Ÿ“ฅ Cloning GitHub Pages repository..." + git clone -b gh-pages https://github.com/Contaura/tuliocp.git tuliocp-pages || { + echo "๐Ÿ“ฅ Creating new gh-pages branch..." + git clone https://github.com/Contaura/tuliocp.git tuliocp-pages + cd tuliocp-pages + git checkout --orphan gh-pages + git rm -rf . + cd .. + } fi # Navigate to pages repository @@ -50,8 +50,8 @@ git add . # Check if there are changes to commit if git diff --staged --quiet; then - echo "โ„น๏ธ No changes to deploy" - exit 0 + echo "โ„น๏ธ No changes to deploy" + exit 0 fi # Commit and push @@ -61,16 +61,16 @@ git status --porcelain echo "" echo "Committing changes..." git commit -m "Deploy TulioCP packages - $(date)" || { - echo "โŒ Commit failed. Checking for authentication issues..." - echo "Git remote info:" - git remote -v - exit 1 + echo "โŒ Commit failed. Checking for authentication issues..." + echo "Git remote info:" + git remote -v + exit 1 } echo "Pushing to GitHub Pages..." git push origin gh-pages || { - echo "โŒ Push failed. This might be due to authentication issues." - echo "Make sure the build server has proper GitHub access." - exit 1 + echo "โŒ Push failed. This might be due to authentication issues." + echo "Make sure the build server has proper GitHub access." + exit 1 } echo "โœ… Deployment complete!" @@ -79,4 +79,4 @@ echo "" echo "๐Ÿ”ง To install TulioCP:" echo " wget -O - https://apt.tuliocp.com/setup.sh | sudo bash" echo " sudo apt update" -echo " sudo apt install tuliocp" \ No newline at end of file +echo " sudo apt install tuliocp" diff --git a/scripts/deploy-to-repo-fixed.sh b/scripts/deploy-to-repo-fixed.sh index a0b825088..a95818959 100644 --- a/scripts/deploy-to-repo-fixed.sh +++ b/scripts/deploy-to-repo-fixed.sh @@ -6,14 +6,14 @@ set -e echo "๐Ÿ“ค Deploying packages to repository..." # Check if packages exist -if [ ! -d "/tmp" ] || [ -z "$(find /tmp -name "*.deb" 2>/dev/null)" ]; then - echo "โŒ No packages found in /tmp/" - echo "Run build script first to create packages" - exit 1 +if [ ! -d "/tmp" ] || [ -z "$(find /tmp -name "*.deb" 2> /dev/null)" ]; then + echo "โŒ No packages found in /tmp/" + echo "Run build script first to create packages" + exit 1 fi echo "๐Ÿ“ฆ Packages ready for deployment:" -ls -la /tmp/*.deb 2>/dev/null || echo "No .deb files found" +ls -la /tmp/*.deb 2> /dev/null || echo "No .deb files found" # Create repository structure REPO_DIR="/tmp/tuliocp-repo" @@ -22,9 +22,9 @@ mkdir -p "$REPO_DIR"/{dists/stable/main/binary-amd64,pool/main} # Copy packages echo "๐Ÿ“‹ Copying packages to repository..." -cp /tmp/*.deb "$REPO_DIR/pool/main/" 2>/dev/null || { - echo "โŒ Failed to copy packages" - exit 1 +cp /tmp/*.deb "$REPO_DIR/pool/main/" 2> /dev/null || { + echo "โŒ Failed to copy packages" + exit 1 } cd "$REPO_DIR" @@ -52,36 +52,36 @@ EOF # Add MD5Sum section echo "MD5Sum:" >> Release find . -name "*.gz" -o -name "Packages" | while read file; do - if [ -f "$file" ]; then - md5sum "$file" | awk -v file="$file" '{printf " %s %8d %s\n", $1, length, file}' - fi + if [ -f "$file" ]; then + md5sum "$file" | awk -v file="$file" '{printf " %s %8d %s\n", $1, length, file}' + fi done | sed 's|^\./||' >> Release -# Add SHA1 section +# Add SHA1 section echo "SHA1:" >> Release find . -name "*.gz" -o -name "Packages" | while read file; do - if [ -f "$file" ]; then - sha1sum "$file" | awk -v file="$file" '{printf " %s %8d %s\n", $1, length, file}' - fi + if [ -f "$file" ]; then + sha1sum "$file" | awk -v file="$file" '{printf " %s %8d %s\n", $1, length, file}' + fi done | sed 's|^\./||' >> Release # Add SHA256 section echo "SHA256:" >> Release find . -name "*.gz" -o -name "Packages" | while read file; do - if [ -f "$file" ]; then - sha256sum "$file" | awk -v file="$file" '{printf " %s %8d %s\n", $1, length, file}' - fi + if [ -f "$file" ]; then + sha256sum "$file" | awk -v file="$file" '{printf " %s %8d %s\n", $1, length, file}' + fi done | sed 's|^\./||' >> Release cd "$REPO_DIR" # Copy repository index page if [ -f "/opt/tuliocp-build/tuliocp/apt-repo/index.html" ]; then - cp "/opt/tuliocp-build/tuliocp/apt-repo/index.html" index.html - echo "โœ… Using updated repository index page" + cp "/opt/tuliocp-build/tuliocp/apt-repo/index.html" index.html + echo "โœ… Using updated repository index page" else - echo "โš ๏ธ Creating basic index page" - cat > index.html << 'EOF' + echo "โš ๏ธ Creating basic index page" + cat > index.html << 'EOF' @@ -135,8 +135,8 @@ echo "๐Ÿš€ Repository ready for deployment!" echo "" echo "๐Ÿ“‹ Repository includes:" echo " โœ… Proper Release file with checksums" -echo " โœ… Packages and Packages.gz files" +echo " โœ… Packages and Packages.gz files" echo " โœ… Repository index page" echo " โš ๏ธ Unsigned (requires --allow-unauthenticated)" echo "" -echo "Repository location: $REPO_DIR" \ No newline at end of file +echo "Repository location: $REPO_DIR" diff --git a/scripts/fix-github-runner.sh b/scripts/fix-github-runner.sh index 3a888731b..d9b02d4da 100644 --- a/scripts/fix-github-runner.sh +++ b/scripts/fix-github-runner.sh @@ -7,8 +7,8 @@ echo "========================================" # Check if we're on the build server if [ ! -d "/opt/tuliocp-build" ]; then - echo "โš ๏ธ This should be run on your build server, not locally" - echo "But we can still generate the correct commands for you..." + echo "โš ๏ธ This should be run on your build server, not locally" + echo "But we can still generate the correct commands for you..." fi echo "" @@ -118,4 +118,4 @@ echo "" echo "๐ŸŽฏ Recommended Next Steps:" echo "1. Get a fresh token from the GitHub UI" echo "2. Try the manual setup commands above" -echo "3. If still failing, let's use the webhook approach instead" \ No newline at end of file +echo "3. If still failing, let's use the webhook approach instead" diff --git a/scripts/setup-github-auth.sh b/scripts/setup-github-auth.sh index b438a9226..1482bec22 100644 --- a/scripts/setup-github-auth.sh +++ b/scripts/setup-github-auth.sh @@ -8,30 +8,30 @@ echo "==================================================" # Check if we're on the build server if [ ! -d "/opt/tuliocp-build" ]; then - echo "โŒ This script must be run on the build server" - echo "Build directory not found: /opt/tuliocp-build" - exit 1 + echo "โŒ This script must be run on the build server" + echo "Build directory not found: /opt/tuliocp-build" + exit 1 fi # If token provided as argument, use it if [ -n "$1" ]; then - GITHUB_TOKEN="$1" + GITHUB_TOKEN="$1" fi # Check for GitHub token if [ -z "$GITHUB_TOKEN" ]; then - echo "โŒ GitHub token not provided" - echo "" - echo "To set up GitHub authentication:" - echo "1. Go to: https://github.com/settings/tokens/new" - echo "2. Create a Personal Access Token with 'repo' permissions" - echo "3. Copy the token and run:" - echo " export GITHUB_TOKEN='your-token-here'" - echo " $0" - echo "" - echo "Or run this script with the token as an argument:" - echo " $0 your-token-here" - exit 1 + echo "โŒ GitHub token not provided" + echo "" + echo "To set up GitHub authentication:" + echo "1. Go to: https://github.com/settings/tokens/new" + echo "2. Create a Personal Access Token with 'repo' permissions" + echo "3. Copy the token and run:" + echo " export GITHUB_TOKEN='your-token-here'" + echo " $0" + echo "" + echo "Or run this script with the token as an argument:" + echo " $0 your-token-here" + exit 1 fi echo "๐Ÿ”ง Configuring Git with GitHub token..." @@ -45,16 +45,16 @@ echo "https://${GITHUB_TOKEN}@github.com" > ~/.git-credentials # Configure the repository remotes to use HTTPS with token if [ -d "tuliocp-pages" ]; then - cd tuliocp-pages - git remote set-url origin "https://${GITHUB_TOKEN}@github.com/Contaura/tuliocp.git" - cd .. + cd tuliocp-pages + git remote set-url origin "https://${GITHUB_TOKEN}@github.com/Contaura/tuliocp.git" + cd .. fi # Also configure the main repository if it exists if [ -d "tuliocp" ]; then - cd tuliocp - git remote set-url origin "https://${GITHUB_TOKEN}@github.com/Contaura/tuliocp.git" - cd .. + cd tuliocp + git remote set-url origin "https://${GITHUB_TOKEN}@github.com/Contaura/tuliocp.git" + cd .. fi echo "โœ… GitHub authentication configured successfully!" @@ -63,4 +63,4 @@ echo "๐Ÿ”’ Security note: Token is stored securely for git operations" echo "๐Ÿ“‹ You can now run deployment scripts without authentication issues" echo "" echo "๐Ÿงช Test the authentication:" -echo " cd /opt/tuliocp-build && ./deploy-to-github-pages.sh" \ No newline at end of file +echo " cd /opt/tuliocp-build && ./deploy-to-github-pages.sh" diff --git a/scripts/setup-secure-webhook.sh b/scripts/setup-secure-webhook.sh index b5f460e1e..8ae69f2d7 100644 --- a/scripts/setup-secure-webhook.sh +++ b/scripts/setup-secure-webhook.sh @@ -8,36 +8,36 @@ echo "==========================================" # Check if running on build server if [ ! -d "/opt/tuliocp-build" ]; then - echo "โŒ This script must be run on the build server" - echo "Build directory not found: /opt/tuliocp-build" - exit 1 + echo "โŒ This script must be run on the build server" + echo "Build directory not found: /opt/tuliocp-build" + exit 1 fi # Generate a secure webhook secret if [ -z "$WEBHOOK_SECRET" ]; then - echo "๐Ÿ”‘ Generating secure webhook secret..." - WEBHOOK_SECRET=$(openssl rand -hex 32) - echo "Generated secret: $WEBHOOK_SECRET" - echo "" - echo "โš ๏ธ IMPORTANT: Save this secret! You'll need it for GitHub webhook configuration." - echo "Add this to your environment: export WEBHOOK_SECRET='$WEBHOOK_SECRET'" - echo "" + echo "๐Ÿ”‘ Generating secure webhook secret..." + WEBHOOK_SECRET=$(openssl rand -hex 32) + echo "Generated secret: $WEBHOOK_SECRET" + echo "" + echo "โš ๏ธ IMPORTANT: Save this secret! You'll need it for GitHub webhook configuration." + echo "Add this to your environment: export WEBHOOK_SECRET='$WEBHOOK_SECRET'" + echo "" fi # Download and install secure webhook handler echo "๐Ÿ“‹ Installing secure webhook handler..." -if command -v curl >/dev/null 2>&1; then - curl -s -o /opt/tuliocp-build/secure-webhook-handler.py https://raw.githubusercontent.com/Contaura/tuliocp/main/scripts/secure-webhook-handler.py -elif command -v wget >/dev/null 2>&1; then - wget -O /opt/tuliocp-build/secure-webhook-handler.py https://raw.githubusercontent.com/Contaura/tuliocp/main/scripts/secure-webhook-handler.py +if command -v curl > /dev/null 2>&1; then + curl -s -o /opt/tuliocp-build/secure-webhook-handler.py https://raw.githubusercontent.com/Contaura/tuliocp/main/scripts/secure-webhook-handler.py +elif command -v wget > /dev/null 2>&1; then + wget -O /opt/tuliocp-build/secure-webhook-handler.py https://raw.githubusercontent.com/Contaura/tuliocp/main/scripts/secure-webhook-handler.py else - echo "โŒ Neither curl nor wget found. Please install one of them." - exit 1 + echo "โŒ Neither curl nor wget found. Please install one of them." + exit 1 fi if [ ! -f "/opt/tuliocp-build/secure-webhook-handler.py" ]; then - echo "โŒ Failed to download secure webhook handler" - exit 1 + echo "โŒ Failed to download secure webhook handler" + exit 1 fi chmod +x /opt/tuliocp-build/secure-webhook-handler.py @@ -85,11 +85,11 @@ EOF # Set up firewall rule echo "๐Ÿ›ก๏ธ Setting up firewall..." -if command -v ufw >/dev/null 2>&1; then - sudo ufw allow 8443/tcp comment "TulioCP Webhook HTTPS" - echo "Firewall rule added for port 8443" +if command -v ufw > /dev/null 2>&1; then + sudo ufw allow 8443/tcp comment "TulioCP Webhook HTTPS" + echo "Firewall rule added for port 8443" else - echo "โš ๏ธ UFW not found. Manually configure firewall to allow port 8443" + echo "โš ๏ธ UFW not found. Manually configure firewall to allow port 8443" fi # Install and start service @@ -103,19 +103,19 @@ sleep 3 # Check service status if sudo systemctl is-active --quiet tuliocp-webhook; then - echo "โœ… Webhook service started successfully" - - # Test health endpoint - sleep 2 - if curl -k -s https://localhost:8443/health > /dev/null; then - echo "โœ… HTTPS health check passed" - else - echo "โš ๏ธ HTTPS health check failed (this may be normal with self-signed certs)" - fi + echo "โœ… Webhook service started successfully" + + # Test health endpoint + sleep 2 + if curl -k -s https://localhost:8443/health > /dev/null; then + echo "โœ… HTTPS health check passed" + else + echo "โš ๏ธ HTTPS health check failed (this may be normal with self-signed certs)" + fi else - echo "โŒ Webhook service failed to start" - echo "Check logs: sudo journalctl -u tuliocp-webhook -f" - exit 1 + echo "โŒ Webhook service failed to start" + echo "Check logs: sudo journalctl -u tuliocp-webhook -f" + exit 1 fi echo "" @@ -143,4 +143,4 @@ echo " - โœ… Repository verification" echo " - โœ… Branch filtering (main only)" echo " - โœ… Request size limits" echo " - โœ… Systemd security restrictions" -echo " - โœ… Proper logging" \ No newline at end of file +echo " - โœ… Proper logging" diff --git a/scripts/test-build-server.sh b/scripts/test-build-server.sh index ca11bba3a..895666d30 100755 --- a/scripts/test-build-server.sh +++ b/scripts/test-build-server.sh @@ -17,44 +17,44 @@ BLUE='\033[0;34m' NC='\033[0m' # No Color print_status() { - echo -e "${BLUE}[INFO]${NC} $1" + echo -e "${BLUE}[INFO]${NC} $1" } print_success() { - echo -e "${GREEN}[SUCCESS]${NC} $1" + echo -e "${GREEN}[SUCCESS]${NC} $1" } print_warning() { - echo -e "${YELLOW}[WARNING]${NC} $1" + echo -e "${YELLOW}[WARNING]${NC} $1" } print_error() { - echo -e "${RED}[ERROR]${NC} $1" + echo -e "${RED}[ERROR]${NC} $1" } # Function to run command and capture output run_test() { - local test_name="$1" - local command="$2" - local required="${3:-false}" - - print_status "Running: $test_name" - echo "Command: $command" - echo "----------------------------------------" - - if eval "$command"; then - print_success "$test_name - PASSED" - return 0 - else - if [[ "$required" == "true" ]]; then - print_error "$test_name - FAILED (CRITICAL)" - return 1 - else - print_warning "$test_name - FAILED (NON-CRITICAL)" - return 0 - fi - fi - echo "" + local test_name="$1" + local command="$2" + local required="${3:-false}" + + print_status "Running: $test_name" + echo "Command: $command" + echo "----------------------------------------" + + if eval "$command"; then + print_success "$test_name - PASSED" + return 0 + else + if [[ "$required" == "true" ]]; then + print_error "$test_name - FAILED (CRITICAL)" + return 1 + else + print_warning "$test_name - FAILED (NON-CRITICAL)" + return 0 + fi + fi + echo "" } # Test 1: Environment Check @@ -107,27 +107,27 @@ print_status "Running package build test..." cd /opt/tuliocp-build/tuliocp if ./src/build-minimal-package.sh; then - print_success "Package build completed successfully!" - - # Check for created packages - if ls /tmp/*.deb 1> /dev/null 2>&1; then - print_success "Package files found:" - ls -la /tmp/*.deb - - # Show package details - for deb in /tmp/*.deb; do - echo "" - print_status "Package info for $(basename $deb):" - dpkg-deb --info "$deb" | head -15 - echo "Package contents:" - dpkg-deb --contents "$deb" | head -10 - echo "..." - done - else - print_error "No package files found in /tmp/" - fi + print_success "Package build completed successfully!" + + # Check for created packages + if ls /tmp/*.deb 1> /dev/null 2>&1; then + print_success "Package files found:" + ls -la /tmp/*.deb + + # Show package details + for deb in /tmp/*.deb; do + echo "" + print_status "Package info for $(basename $deb):" + dpkg-deb --info "$deb" | head -15 + echo "Package contents:" + dpkg-deb --contents "$deb" | head -10 + echo "..." + done + else + print_error "No package files found in /tmp/" + fi else - print_error "Package build FAILED!" + print_error "Package build FAILED!" fi echo "" @@ -136,29 +136,29 @@ echo "" print_status "=== STEP 5: REPOSITORY DEPLOYMENT TEST ===" if [[ -f "/opt/tuliocp-build/deploy-to-repo.sh" ]]; then - print_status "Testing repository deployment script..." - if /opt/tuliocp-build/deploy-to-repo.sh; then - print_success "Repository deployment test completed!" - - # Check repository structure - if [[ -d "/tmp/tuliocp-repo" ]]; then - print_status "Repository structure created:" - find /tmp/tuliocp-repo -type f | head -20 - - print_status "Packages file content:" - if [[ -f "/tmp/tuliocp-repo/dists/stable/main/binary-amd64/Packages" ]]; then - cat /tmp/tuliocp-repo/dists/stable/main/binary-amd64/Packages - else - print_warning "Packages file not found" - fi - else - print_error "Repository directory not created" - fi - else - print_error "Repository deployment script failed!" - fi + print_status "Testing repository deployment script..." + if /opt/tuliocp-build/deploy-to-repo.sh; then + print_success "Repository deployment test completed!" + + # Check repository structure + if [[ -d "/tmp/tuliocp-repo" ]]; then + print_status "Repository structure created:" + find /tmp/tuliocp-repo -type f | head -20 + + print_status "Packages file content:" + if [[ -f "/tmp/tuliocp-repo/dists/stable/main/binary-amd64/Packages" ]]; then + cat /tmp/tuliocp-repo/dists/stable/main/binary-amd64/Packages + else + print_warning "Packages file not found" + fi + else + print_error "Repository directory not created" + fi + else + print_error "Repository deployment script failed!" + fi else - print_warning "Repository deployment script not found" + print_warning "Repository deployment script not found" fi echo "" @@ -167,15 +167,15 @@ echo "" print_status "=== STEP 6: GITHUB ACTIONS RUNNER STATUS ===" if [[ -d "$HOME/actions-runner" ]]; then - run_test "Check runner installation" "ls -la $HOME/actions-runner/" - - run_test "Check runner service status" "cd $HOME/actions-runner && sudo ./svc.sh status || ./svc.sh status || echo 'Service not running'" - - if [[ -d "$HOME/actions-runner/_diag" ]]; then - run_test "Check recent runner logs" "cd $HOME/actions-runner && ls -la _diag/ && tail -20 _diag/Runner_*.log 2>/dev/null || echo 'No recent logs'" - fi + run_test "Check runner installation" "ls -la $HOME/actions-runner/" + + run_test "Check runner service status" "cd $HOME/actions-runner && sudo ./svc.sh status || ./svc.sh status || echo 'Service not running'" + + if [[ -d "$HOME/actions-runner/_diag" ]]; then + run_test "Check recent runner logs" "cd $HOME/actions-runner && ls -la _diag/ && tail -20 _diag/Runner_*.log 2>/dev/null || echo 'No recent logs'" + fi else - print_warning "GitHub Actions runner not installed in $HOME/actions-runner" + print_warning "GitHub Actions runner not installed in $HOME/actions-runner" fi echo "" @@ -197,27 +197,27 @@ echo "" print_status "=== STEP 8: WEBHOOK HANDLER TEST ===" if [[ -f "/opt/tuliocp-build/webhook-handler.py" ]]; then - print_status "Webhook handler found, testing Python requirements..." - run_test "Test Python HTTP server" "python3 -c 'from http.server import HTTPServer, BaseHTTPRequestHandler; print(\"HTTP server module available\")'" - - print_status "Starting webhook handler test (5 second timeout)..." - # Start webhook handler in background and test it - cd /opt/tuliocp-build - timeout 5s python3 webhook-handler.py & - WEBHOOK_PID=$! - sleep 2 - - # Test webhook endpoint - if curl -X POST http://localhost:8080/build 2>/dev/null; then - print_success "Webhook handler responds to requests" - else - print_warning "Webhook handler test failed or timed out" - fi - - # Kill webhook handler - kill $WEBHOOK_PID 2>/dev/null || true + print_status "Webhook handler found, testing Python requirements..." + run_test "Test Python HTTP server" "python3 -c 'from http.server import HTTPServer, BaseHTTPRequestHandler; print(\"HTTP server module available\")'" + + print_status "Starting webhook handler test (5 second timeout)..." + # Start webhook handler in background and test it + cd /opt/tuliocp-build + timeout 5s python3 webhook-handler.py & + WEBHOOK_PID=$! + sleep 2 + + # Test webhook endpoint + if curl -X POST http://localhost:8080/build 2> /dev/null; then + print_success "Webhook handler responds to requests" + else + print_warning "Webhook handler test failed or timed out" + fi + + # Kill webhook handler + kill $WEBHOOK_PID 2> /dev/null || true else - print_warning "Webhook handler not found" + print_warning "Webhook handler not found" fi echo "" @@ -250,10 +250,10 @@ echo "Test completed at: $(date)" echo "" print_status "Key findings:" -echo "- Build environment: $(ls -d /opt/tuliocp-build 2>/dev/null && echo 'EXISTS' || echo 'MISSING')" -echo "- Package files: $(ls /tmp/*.deb 2>/dev/null | wc -l) .deb files found" -echo "- Repository structure: $(ls -d /tmp/tuliocp-repo 2>/dev/null && echo 'CREATED' || echo 'NOT CREATED')" -echo "- GitHub runner: $(ls -d $HOME/actions-runner 2>/dev/null && echo 'INSTALLED' || echo 'NOT INSTALLED')" +echo "- Build environment: $(ls -d /opt/tuliocp-build 2> /dev/null && echo 'EXISTS' || echo 'MISSING')" +echo "- Package files: $(ls /tmp/*.deb 2> /dev/null | wc -l) .deb files found" +echo "- Repository structure: $(ls -d /tmp/tuliocp-repo 2> /dev/null && echo 'CREATED' || echo 'NOT CREATED')" +echo "- GitHub runner: $(ls -d $HOME/actions-runner 2> /dev/null && echo 'INSTALLED' || echo 'NOT INSTALLED')" echo "" print_status "Next steps based on results:" @@ -263,4 +263,4 @@ echo "3. If repository created: Test deployment to GitHub Pages" echo "4. If everything works: Set up automated deployment" echo "" -print_success "Test script completed! Review the output above for issues." \ No newline at end of file +print_success "Test script completed! Review the output above for issues." diff --git a/src/build-minimal-package.sh b/src/build-minimal-package.sh index 8d097ae88..62dfafddf 100755 --- a/src/build-minimal-package.sh +++ b/src/build-minimal-package.sh @@ -7,10 +7,10 @@ echo "Building minimal TulioCP package..." # Check for required tools if ! command -v dpkg-deb &> /dev/null; then - echo "โŒ Error: dpkg-deb is not installed or not in PATH" - echo "On Ubuntu/Debian: sudo apt-get install dpkg-dev" - echo "This script requires a Debian/Ubuntu environment" - exit 1 + echo "โŒ Error: dpkg-deb is not installed or not in PATH" + echo "On Ubuntu/Debian: sudo apt-get install dpkg-dev" + echo "This script requires a Debian/Ubuntu environment" + exit 1 fi echo "โœ… dpkg-deb found: $(which dpkg-deb)" @@ -85,22 +85,22 @@ echo "Copying essential files..." # Copy bin directory if exists if [ -d "$REPO_ROOT/bin" ]; then - cp -r "$REPO_ROOT/bin"/* "$INSTALL_DIR/bin/" 2>/dev/null || true + cp -r "$REPO_ROOT/bin"/* "$INSTALL_DIR/bin/" 2> /dev/null || true fi -# Copy web directory if exists +# Copy web directory if exists if [ -d "$REPO_ROOT/web" ]; then - cp -r "$REPO_ROOT/web"/* "$INSTALL_DIR/web/" 2>/dev/null || true + cp -r "$REPO_ROOT/web"/* "$INSTALL_DIR/web/" 2> /dev/null || true fi # Copy func directory if exists if [ -d "$REPO_ROOT/func" ]; then - cp -r "$REPO_ROOT/func"/* "$INSTALL_DIR/func/" 2>/dev/null || true + cp -r "$REPO_ROOT/func"/* "$INSTALL_DIR/func/" 2> /dev/null || true fi # Copy install directory if exists if [ -d "$REPO_ROOT/install" ]; then - cp -r "$REPO_ROOT/install"/* "$INSTALL_DIR/install/" 2>/dev/null || true + cp -r "$REPO_ROOT/install"/* "$INSTALL_DIR/install/" 2> /dev/null || true fi # Create basic tulio.conf @@ -117,18 +117,18 @@ echo "Package directory contents:" find "$PACKAGE_DIR" -type f | head -20 if dpkg-deb --build "$PACKAGE_DIR" "/tmp/tuliocp_1.10.0~alpha_amd64.deb"; then - if [ -f "/tmp/tuliocp_1.10.0~alpha_amd64.deb" ]; then - echo "โœ… Package built successfully: /tmp/tuliocp_1.10.0~alpha_amd64.deb" - echo "Package size: $(du -h '/tmp/tuliocp_1.10.0~alpha_amd64.deb' | cut -f1)" - echo "Package info:" - dpkg-deb --info "/tmp/tuliocp_1.10.0~alpha_amd64.deb" | head -15 - else - echo "โŒ Package file not created despite successful dpkg-deb command" - exit 1 - fi + if [ -f "/tmp/tuliocp_1.10.0~alpha_amd64.deb" ]; then + echo "โœ… Package built successfully: /tmp/tuliocp_1.10.0~alpha_amd64.deb" + echo "Package size: $(du -h '/tmp/tuliocp_1.10.0~alpha_amd64.deb' | cut -f1)" + echo "Package info:" + dpkg-deb --info "/tmp/tuliocp_1.10.0~alpha_amd64.deb" | head -15 + else + echo "โŒ Package file not created despite successful dpkg-deb command" + exit 1 + fi else - echo "โŒ dpkg-deb command failed with exit code: $?" - echo "Package directory structure:" - find "$PACKAGE_DIR" -ls - exit 1 + echo "โŒ dpkg-deb command failed with exit code: $?" + echo "Package directory structure:" + find "$PACKAGE_DIR" -ls + exit 1 fi diff --git a/src/deb/nginx/postinst b/src/deb/nginx/postinst index b63d7b0b4..47bda3889 100755 --- a/src/deb/nginx/postinst +++ b/src/deb/nginx/postinst @@ -20,7 +20,7 @@ fi update-rc.d tulio defaults > /dev/null invoke-rc.d tulio start || true -# Adapt Port Listing in HESTIA NGINX Backend +# Adapt Port Listing in TULIO NGINX Backend source /usr/local/tulio/func/syshealth.sh # Load syshealth functions # Check if the function syshealth_adapt_tulio_nginx_listen_ports exists diff --git a/src/deb/nginx/preinst b/src/deb/nginx/preinst index 6f9f026b6..4dcbee8af 100644 --- a/src/deb/nginx/preinst +++ b/src/deb/nginx/preinst @@ -6,8 +6,8 @@ if [ ! -e "/usr/local/tulio/data/users/admin" ]; then fi # Create a new Backup folder -HESTIA_BACKUP="/root/hst_nginx_backups/$(date +%d%m%Y%H%M)" -mkdir -p HESTIA_BACKUP +TULIO_BACKUP="/root/hst_nginx_backups/$(date +%d%m%Y%H%M)" +mkdir -p TULIO_BACKUP # Create a backup of the current configuration cp -r /usr/local/tulio/nginx/conf/nginx.conf $TULIO_BACKUP/nginx.conf diff --git a/src/deb/nginx/tulio b/src/deb/nginx/tulio index 8c0ac2088..57a419499 100644 --- a/src/deb/nginx/tulio +++ b/src/deb/nginx/tulio @@ -26,33 +26,33 @@ NGINX_CONF=$NGINX_DEFAULT_CONF NGINX_EXTRA_ARGS="" if [ ! -x "$NGINX_DAEMON" ]; then -NGINX_DAEMON="" -if command -v tulio-nginx >/dev/null 2>&1; then -NGINX_DAEMON=$(command -v tulio-nginx) -elif command -v nginx >/dev/null 2>&1; then -NGINX_DAEMON=$(command -v nginx) -fi - -if [ -n "$NGINX_DAEMON" ]; then -NGINX_NAME=$(basename "$NGINX_DAEMON") -NGINX_DESC=$NGINX_NAME -nginx_details=$("$NGINX_DAEMON" -V 2>&1) -NGINX_PID=$(echo "$nginx_details" | sed -n 's/.*--pid-path=\([^ ]*\).*/\1/p' | head -n 1) -if [ -z "$NGINX_PID" ]; then -NGINX_PID=/run/nginx.pid -fi -NGINX_CONF=$(echo "$nginx_details" | sed -n 's/.*--conf-path=\([^ ]*\).*/\1/p' | head -n 1) -if [ -z "$NGINX_CONF" ]; then -NGINX_CONF=/etc/nginx/nginx.conf -fi -if [ -f "$NGINX_CONF" ]; then -NGINX_EXTRA_ARGS="-c $NGINX_CONF" -else -NGINX_EXTRA_ARGS="" -fi -else -NGINX_DAEMON=$NGINX_DEFAULT_DAEMON -fi + NGINX_DAEMON="" + if command -v tulio-nginx > /dev/null 2>&1; then + NGINX_DAEMON=$(command -v tulio-nginx) + elif command -v nginx > /dev/null 2>&1; then + NGINX_DAEMON=$(command -v nginx) + fi + + if [ -n "$NGINX_DAEMON" ]; then + NGINX_NAME=$(basename "$NGINX_DAEMON") + NGINX_DESC=$NGINX_NAME + nginx_details=$("$NGINX_DAEMON" -V 2>&1) + NGINX_PID=$(echo "$nginx_details" | sed -n 's/.*--pid-path=\([^ ]*\).*/\1/p' | head -n 1) + if [ -z "$NGINX_PID" ]; then + NGINX_PID=/run/nginx.pid + fi + NGINX_CONF=$(echo "$nginx_details" | sed -n 's/.*--conf-path=\([^ ]*\).*/\1/p' | head -n 1) + if [ -z "$NGINX_CONF" ]; then + NGINX_CONF=/etc/nginx/nginx.conf + fi + if [ -f "$NGINX_CONF" ]; then + NGINX_EXTRA_ARGS="-c $NGINX_CONF" + else + NGINX_EXTRA_ARGS="" + fi + else + NGINX_DAEMON=$NGINX_DEFAULT_DAEMON + fi fi PHP_DEFAULT_DAEMON=/usr/local/tulio/php/sbin/tulio-php @@ -67,38 +67,38 @@ PHP_CONF=$PHP_DEFAULT_CONF PHP_EXTRA_ARGS="" if [ ! -x "$PHP_DAEMON" ]; then -PHP_DAEMON="" -for candidate in tulio-php php-fpm php-fpm8.4 php-fpm8.3 php-fpm8.2 php-fpm8.1 php-fpm8.0 php-fpm7.4 php-fpm7.3 php-fpm7.2 php-fpm7.1 php-fpm7.0 php-fpm5.6; do -if command -v "$candidate" >/dev/null 2>&1; then -PHP_DAEMON=$(command -v "$candidate") -break -fi -done - -if [ -n "$PHP_DAEMON" ]; then -PHP_NAME=$(basename "$PHP_DAEMON") -PHP_DESC=$PHP_NAME -PHP_CONF="" -for conf in /usr/local/tulio/php/etc/php-fpm.conf /etc/php/*/fpm/php-fpm.conf /etc/php-fpm.conf /etc/php/php-fpm.conf; do -if [ -f "$conf" ]; then -PHP_CONF="$conf" -break -fi -done -if [ -n "$PHP_CONF" ] && [ -f "$PHP_CONF" ]; then -PHP_EXTRA_ARGS="--fpm-config $PHP_CONF" -PHP_PID=$(grep -E '^[[:space:]]*pid[[:space:]]*=' "$PHP_CONF" | grep -v '^[[:space:]]*;' | tail -n 1 | cut -d= -f2- | tr -d '[:space:]') -if [ -z "$PHP_PID" ]; then -PHP_PID=/run/php/php-fpm.pid -fi -else -PHP_CONF=$PHP_DEFAULT_CONF -PHP_PID=/run/php/php-fpm.pid -PHP_EXTRA_ARGS="" -fi -else -PHP_DAEMON=$PHP_DEFAULT_DAEMON -fi + PHP_DAEMON="" + for candidate in tulio-php php-fpm php-fpm8.4 php-fpm8.3 php-fpm8.2 php-fpm8.1 php-fpm8.0 php-fpm7.4 php-fpm7.3 php-fpm7.2 php-fpm7.1 php-fpm7.0 php-fpm5.6; do + if command -v "$candidate" > /dev/null 2>&1; then + PHP_DAEMON=$(command -v "$candidate") + break + fi + done + + if [ -n "$PHP_DAEMON" ]; then + PHP_NAME=$(basename "$PHP_DAEMON") + PHP_DESC=$PHP_NAME + PHP_CONF="" + for conf in /usr/local/tulio/php/etc/php-fpm.conf /etc/php/*/fpm/php-fpm.conf /etc/php-fpm.conf /etc/php/php-fpm.conf; do + if [ -f "$conf" ]; then + PHP_CONF="$conf" + break + fi + done + if [ -n "$PHP_CONF" ] && [ -f "$PHP_CONF" ]; then + PHP_EXTRA_ARGS="--fpm-config $PHP_CONF" + PHP_PID=$(grep -E '^[[:space:]]*pid[[:space:]]*=' "$PHP_CONF" | grep -v '^[[:space:]]*;' | tail -n 1 | cut -d= -f2- | tr -d '[:space:]') + if [ -z "$PHP_PID" ]; then + PHP_PID=/run/php/php-fpm.pid + fi + else + PHP_CONF=$PHP_DEFAULT_CONF + PHP_PID=/run/php/php-fpm.pid + PHP_EXTRA_ARGS="" + fi + else + PHP_DAEMON=$PHP_DEFAULT_DAEMON + fi fi set -e @@ -108,45 +108,45 @@ set -e . /etc/profile.d/tulio.sh start_nginx() { - if [ ! -x "$NGINX_DAEMON" ]; then - return 1 - fi - if [ -n "$NGINX_EXTRA_ARGS" ]; then - start-stop-daemon --start --quiet --pidfile $NGINX_PID \ - --retry 5 --exec $NGINX_DAEMON --oknodo -- $NGINX_EXTRA_ARGS - else - start-stop-daemon --start --quiet --pidfile $NGINX_PID \ - --retry 5 --exec $NGINX_DAEMON --oknodo - fi + if [ ! -x "$NGINX_DAEMON" ]; then + return 1 + fi + if [ -n "$NGINX_EXTRA_ARGS" ]; then + start-stop-daemon --start --quiet --pidfile $NGINX_PID \ + --retry 5 --exec $NGINX_DAEMON --oknodo -- $NGINX_EXTRA_ARGS + else + start-stop-daemon --start --quiet --pidfile $NGINX_PID \ + --retry 5 --exec $NGINX_DAEMON --oknodo + fi } start_php() { - if [ ! -x "$PHP_DAEMON" ]; then - return 1 - fi - if [ -n "$PHP_EXTRA_ARGS" ]; then - start-stop-daemon --start --quiet --pidfile $PHP_PID \ - --retry 5 --exec $PHP_DAEMON --oknodo -- $PHP_EXTRA_ARGS - else - start-stop-daemon --start --quiet --pidfile $PHP_PID \ - --retry 5 --exec $PHP_DAEMON --oknodo - fi + if [ ! -x "$PHP_DAEMON" ]; then + return 1 + fi + if [ -n "$PHP_EXTRA_ARGS" ]; then + start-stop-daemon --start --quiet --pidfile $PHP_PID \ + --retry 5 --exec $PHP_DAEMON --oknodo -- $PHP_EXTRA_ARGS + else + start-stop-daemon --start --quiet --pidfile $PHP_PID \ + --retry 5 --exec $PHP_DAEMON --oknodo + fi } stop_nginx() { - if [ ! -x "$NGINX_DAEMON" ]; then - return 0 - fi - start-stop-daemon --stop --quiet --pidfile $NGINX_PID \ - --retry 5 --oknodo --exec $NGINX_DAEMON + if [ ! -x "$NGINX_DAEMON" ]; then + return 0 + fi + start-stop-daemon --stop --quiet --pidfile $NGINX_PID \ + --retry 5 --oknodo --exec $NGINX_DAEMON } stop_php() { - if [ ! -x "$PHP_DAEMON" ]; then - return 0 - fi - start-stop-daemon --stop --quiet --pidfile $PHP_PID \ - --retry 5 --oknodo --exec $PHP_DAEMON + if [ ! -x "$PHP_DAEMON" ]; then + return 0 + fi + start-stop-daemon --stop --quiet --pidfile $PHP_PID \ + --retry 5 --oknodo --exec $PHP_DAEMON } case "$1" in @@ -180,18 +180,18 @@ case "$1" in log_end_msg $? ;; - status) - if [ -x "$NGINX_DAEMON" ]; then - status_of_proc -p $NGINX_PID "$NGINX_DAEMON" "$NGINX_NAME" - else - echo "$NGINX_NAME is not installed" - fi - if [ -x "$PHP_DAEMON" ]; then - status_of_proc -p $PHP_PID "$PHP_DAEMON" "$PHP_NAME" - else - echo "$PHP_NAME is not installed" - fi - ;; + status) + if [ -x "$NGINX_DAEMON" ]; then + status_of_proc -p $NGINX_PID "$NGINX_DAEMON" "$NGINX_NAME" + else + echo "$NGINX_NAME is not installed" + fi + if [ -x "$PHP_DAEMON" ]; then + status_of_proc -p $PHP_PID "$PHP_DAEMON" "$PHP_NAME" + else + echo "$PHP_NAME is not installed" + fi + ;; *) echo "Usage: tulio {start|stop|restart|status}" >&2 diff --git a/src/deb/php/php-fpm.conf b/src/deb/php/php-fpm.conf index 165346bc8..6031418a9 100644 --- a/src/deb/php/php-fpm.conf +++ b/src/deb/php/php-fpm.conf @@ -27,7 +27,7 @@ env[PATH] = /usr/local/bin:/usr/bin:/bin env[TMP] = /tmp env[TMPDIR] = /tmp env[TEMP] = /tmp -env[HESTIA] = $TULIO +env[TULIO] = $TULIO env[LANG] = en_US.UTF-8 php_flag[display_errors] = off diff --git a/src/deb/php/php.ini b/src/deb/php/php.ini index 205db1216..99472c221 100644 --- a/src/deb/php/php.ini +++ b/src/deb/php/php.ini @@ -1401,7 +1401,7 @@ session.use_only_cookies = 1 ; Name of the session (used as cookie name). ; https://php.net/session.name -session.name = HESTIASID +session.name = TULIOSID ; Initialize session on request startup. ; https://php.net/session.auto-start diff --git a/src/deb/tulio/preinst b/src/deb/tulio/preinst index 8f9c4883b..457d0b874 100755 --- a/src/deb/tulio/preinst +++ b/src/deb/tulio/preinst @@ -16,4 +16,4 @@ if [ ! -f /etc/apt/apt.conf.d/80-retries ]; then fi # Validate version number and replace if different -HESTIA_V=$(dpkg -s tulio | grep -i version | awk '{ print $2 }') +TULIO_V=$(dpkg -s tulio | grep -i version | awk '{ print $2 }') diff --git a/src/deb/web-terminal/server.js b/src/deb/web-terminal/server.js index 3140327dd..52df2aa1b 100644 --- a/src/deb/web-terminal/server.js +++ b/src/deb/web-terminal/server.js @@ -5,13 +5,13 @@ import { readFileSync } from 'node:fs'; import { spawn } from 'node-pty'; import { WebSocketServer } from 'ws'; -const sessionName = 'HESTIASID'; +const sessionName = 'TULIOSID'; const hostname = execSync('hostname', { silent: true }).toString().trim(); const systemIPs = JSON.parse( - execSync(`${process.env.HESTIA}/bin/v-list-sys-ips json`, { silent: true }).toString(), + execSync(`${process.env.TULIO}/bin/v-list-sys-ips json`, { silent: true }).toString(), ); const { config } = JSON.parse( - execSync(`${process.env.HESTIA}/bin/v-list-sys-config json`, { silent: true }).toString(), + execSync(`${process.env.TULIO}/bin/v-list-sys-config json`, { silent: true }).toString(), ); const wss = new WebSocketServer({ @@ -51,7 +51,7 @@ wss.on('connection', (ws, req) => { const sessionID = req.headers.cookie.split(`${sessionName}=`)[1].split(';')[0]; console.log(`New connection from ${remoteIP} (${sessionID})`); - const file = readFileSync(`${process.env.HESTIA}/data/sessions/sess_${sessionID}`); + const file = readFileSync(`${process.env.TULIO}/data/sessions/sess_${sessionID}`); if (!file) { console.error(`Invalid session ID ${sessionID}, refusing connection`); ws.close(1000, 'Your session has expired.'); @@ -92,7 +92,7 @@ wss.on('connection', (ws, req) => { USER: username, HOME: homedir, PWD: homedir, - HESTIA: process.env.HESTIA, + TULIO: process.env.TULIO, }, }); console.log(`New pty (${pty.pid}): ${shell} as ${username} (${uid}:${gid}) in ${homedir}`); diff --git a/src/tst_autocompile.sh b/src/tst_autocompile.sh index ab853a095..b701328f8 100755 --- a/src/tst_autocompile.sh +++ b/src/tst_autocompile.sh @@ -128,7 +128,7 @@ for i in $*; do NGINX_B='true' PHP_B='true' WEB_TERMINAL_B='true' - HESTIA_B='true' + TULIO_B='true' ;; --nginx) NGINX_B='true' @@ -140,10 +140,10 @@ for i in $*; do WEB_TERMINAL_B='true' ;; --tulio) - HESTIA_B='true' + TULIO_B='true' ;; --debug) - HESTIA_DEBUG='true' + TULIO_DEBUG='true' ;; --install | Y) install='true' @@ -216,7 +216,7 @@ fi echo "Build version $BUILD_VER, with Nginx version $NGINX_V, PHP version $PHP_V and Web Terminal version $WEB_TERMINAL_V" -HESTIA_V="${BUILD_VER}_${BUILD_ARCH}" +TULIO_V="${BUILD_VER}_${BUILD_ARCH}" OPENSSL_V='3.4.0' PCRE_V='10.44' ZLIB_V='1.3.1' @@ -288,7 +288,7 @@ if [ "$TULIO_DEBUG" ]; then fi # Generate Links for sourcecode -HESTIA_ARCHIVE_LINK='https://github.com/contaura/tuliocp/archive/'$branch'.tar.gz' +TULIO_ARCHIVE_LINK='https://github.com/contaura/tuliocp/archive/'$branch'.tar.gz' if [[ $NGINX_V =~ - ]]; then NGINX='https://nginx.org/download/nginx-'$(echo $NGINX_V | cut -d"-" -f1)'.tar.gz' else @@ -324,22 +324,22 @@ if [ "$NGINX_B" = true ]; then # Change to build directory cd $BUILD_DIR - BUILD_DIR_HESTIANGINX=$BUILD_DIR/tulio-nginx_$NGINX_V + BUILD_DIR_TULIO_NGINX=$BUILD_DIR/tulio-nginx_$NGINX_V if [[ $NGINX_V =~ - ]]; then BUILD_DIR_NGINX=$BUILD_DIR/nginx-$(echo $NGINX_V | cut -d"-" -f1) else BUILD_DIR_NGINX=$BUILD_DIR/nginx-$(echo $NGINX_V | cut -d"~" -f1) fi - if [ "$KEEPBUILD" != 'true' ] || [ ! -d "$BUILD_DIR_HESTIANGINX" ]; then + if [ "$KEEPBUILD" != 'true' ] || [ ! -d "$BUILD_DIR_TULIO_NGINX" ]; then # Check if target directory exist - if [ -d "$BUILD_DIR_HESTIANGINX" ]; then + if [ -d "$BUILD_DIR_TULIO_NGINX" ]; then #mv $BUILD_DIR/tulio-nginx_$NGINX_V $BUILD_DIR/tulio-nginx_$NGINX_V-$(timestamp) - rm -r "$BUILD_DIR_HESTIANGINX" + rm -r "$BUILD_DIR_TULIO_NGINX" fi # Create directory - mkdir -p $BUILD_DIR_HESTIANGINX + mkdir -p $BUILD_DIR_TULIO_NGINX # Download and unpack source files download_file $NGINX '-' | tar xz @@ -384,45 +384,45 @@ if [ "$NGINX_B" = true ]; then if [ "$KEEPBUILD" != 'true' ]; then rm -r $BUILD_DIR_NGINX $BUILD_DIR/openssl-$OPENSSL_V $BUILD_DIR/pcre2-$PCRE_V $BUILD_DIR/zlib-$ZLIB_V fi - cd $BUILD_DIR_HESTIANGINX + cd $BUILD_DIR_TULIO_NGINX # Move nginx directory - mkdir -p $BUILD_DIR_HESTIANGINX/usr/local/tulio - rm -rf $BUILD_DIR_HESTIANGINX/usr/local/tulio/nginx - mv $BUILD_DIR/usr/local/tulio/nginx $BUILD_DIR_HESTIANGINX/usr/local/tulio/ + mkdir -p $BUILD_DIR_TULIO_NGINX/usr/local/tulio + rm -rf $BUILD_DIR_TULIO_NGINX/usr/local/tulio/nginx + mv $BUILD_DIR/usr/local/tulio/nginx $BUILD_DIR_TULIO_NGINX/usr/local/tulio/ # Remove original nginx.conf (will use custom) - rm -f $BUILD_DIR_HESTIANGINX/usr/local/tulio/nginx/conf/nginx.conf + rm -f $BUILD_DIR_TULIO_NGINX/usr/local/tulio/nginx/conf/nginx.conf # copy binary - mv $BUILD_DIR_HESTIANGINX/usr/local/tulio/nginx/sbin/nginx $BUILD_DIR_HESTIANGINX/usr/local/tulio/nginx/sbin/tulio-nginx + mv $BUILD_DIR_TULIO_NGINX/usr/local/tulio/nginx/sbin/nginx $BUILD_DIR_TULIO_NGINX/usr/local/tulio/nginx/sbin/tulio-nginx # change permission and build the package cd $BUILD_DIR - chown -R root:root $BUILD_DIR_HESTIANGINX + chown -R root:root $BUILD_DIR_TULIO_NGINX # Get Debian package files - mkdir -p $BUILD_DIR_HESTIANGINX/DEBIAN - get_branch_file 'src/deb/nginx/control' "$BUILD_DIR_HESTIANGINX/DEBIAN/control" + mkdir -p $BUILD_DIR_TULIO_NGINX/DEBIAN + get_branch_file 'src/deb/nginx/control' "$BUILD_DIR_TULIO_NGINX/DEBIAN/control" if [ "$BUILD_ARCH" != "amd64" ]; then - sed -i "s/amd64/${BUILD_ARCH}/g" "$BUILD_DIR_HESTIANGINX/DEBIAN/control" + sed -i "s/amd64/${BUILD_ARCH}/g" "$BUILD_DIR_TULIO_NGINX/DEBIAN/control" fi - get_branch_file 'src/deb/nginx/copyright' "$BUILD_DIR_HESTIANGINX/DEBIAN/copyright" - get_branch_file 'src/deb/nginx/postinst' "$BUILD_DIR_HESTIANGINX/DEBIAN/postinst" - get_branch_file 'src/deb/nginx/postrm' "$BUILD_DIR_HESTIANGINX/DEBIAN/portrm" - chmod +x "$BUILD_DIR_HESTIANGINX/DEBIAN/postinst" - chmod +x "$BUILD_DIR_HESTIANGINX/DEBIAN/portrm" + get_branch_file 'src/deb/nginx/copyright' "$BUILD_DIR_TULIO_NGINX/DEBIAN/copyright" + get_branch_file 'src/deb/nginx/postinst' "$BUILD_DIR_TULIO_NGINX/DEBIAN/postinst" + get_branch_file 'src/deb/nginx/postrm' "$BUILD_DIR_TULIO_NGINX/DEBIAN/portrm" + chmod +x "$BUILD_DIR_TULIO_NGINX/DEBIAN/postinst" + chmod +x "$BUILD_DIR_TULIO_NGINX/DEBIAN/portrm" # Init file - mkdir -p $BUILD_DIR_HESTIANGINX/etc/init.d - get_branch_file 'src/deb/nginx/tulio' "$BUILD_DIR_HESTIANGINX/etc/init.d/tulio" - chmod +x "$BUILD_DIR_HESTIANGINX/etc/init.d/tulio" + mkdir -p $BUILD_DIR_TULIO_NGINX/etc/init.d + get_branch_file 'src/deb/nginx/tulio' "$BUILD_DIR_TULIO_NGINX/etc/init.d/tulio" + chmod +x "$BUILD_DIR_TULIO_NGINX/etc/init.d/tulio" # Custom config - get_branch_file 'src/deb/nginx/nginx.conf' "${BUILD_DIR_HESTIANGINX}/usr/local/tulio/nginx/conf/nginx.conf" + get_branch_file 'src/deb/nginx/nginx.conf' "${BUILD_DIR_TULIO_NGINX}/usr/local/tulio/nginx/conf/nginx.conf" # Build the package echo Building Nginx DEB - dpkg-deb -Zxz --build $BUILD_DIR_HESTIANGINX $DEB_DIR + dpkg-deb -Zxz --build $BUILD_DIR_TULIO_NGINX $DEB_DIR rm -r $BUILD_DIR/usr @@ -450,7 +450,7 @@ if [ "$PHP_B" = true ]; then echo "Building tulio-php package..." - BUILD_DIR_HESTIAPHP=$BUILD_DIR/tulio-php_$PHP_V + BUILD_DIR_TULIO_PHP=$BUILD_DIR/tulio-php_$PHP_V BUILD_DIR_PHP=$BUILD_DIR/php-$(echo $PHP_V | cut -d"~" -f1) @@ -460,14 +460,14 @@ if [ "$PHP_B" = true ]; then BUILD_DIR_PHP=$BUILD_DIR/php-$(echo $PHP_V | cut -d"~" -f1) fi - if [ "$KEEPBUILD" != 'true' ] || [ ! -d "$BUILD_DIR_HESTIAPHP" ]; then + if [ "$KEEPBUILD" != 'true' ] || [ ! -d "$BUILD_DIR_TULIO_PHP" ]; then # Check if target directory exist - if [ -d $BUILD_DIR_HESTIAPHP ]; then - rm -r $BUILD_DIR_HESTIAPHP + if [ -d $BUILD_DIR_TULIO_PHP ]; then + rm -r $BUILD_DIR_TULIO_PHP fi # Create directory - mkdir -p $BUILD_DIR_HESTIAPHP + mkdir -p $BUILD_DIR_TULIO_PHP # Download and unpack source files cd $BUILD_DIR @@ -500,60 +500,60 @@ if [ "$PHP_B" = true ]; then cp -rf "$SRC_DIR/" $BUILD_DIR/tuliocp-$branch_dash fi # Move php directory - [ "$TULIO_DEBUG" ] && echo DEBUG: mkdir -p $BUILD_DIR_HESTIAPHP/usr/local/tulio - mkdir -p $BUILD_DIR_HESTIAPHP/usr/local/tulio + [ "$TULIO_DEBUG" ] && echo DEBUG: mkdir -p $BUILD_DIR_TULIO_PHP/usr/local/tulio + mkdir -p $BUILD_DIR_TULIO_PHP/usr/local/tulio - [ "$TULIO_DEBUG" ] && echo DEBUG: rm -r $BUILD_DIR_HESTIAPHP/usr/local/tulio/php - if [ -d $BUILD_DIR_HESTIAPHP/usr/local/tulio/php ]; then - rm -r $BUILD_DIR_HESTIAPHP/usr/local/tulio/php + [ "$TULIO_DEBUG" ] && echo DEBUG: rm -r $BUILD_DIR_TULIO_PHP/usr/local/tulio/php + if [ -d $BUILD_DIR_TULIO_PHP/usr/local/tulio/php ]; then + rm -r $BUILD_DIR_TULIO_PHP/usr/local/tulio/php fi - [ "$TULIO_DEBUG" ] && echo DEBUG: mv ${BUILD_DIR}/usr/local/tulio/php ${BUILD_DIR_HESTIAPHP}/usr/local/tulio/ - mv ${BUILD_DIR}/usr/local/tulio/php ${BUILD_DIR_HESTIAPHP}/usr/local/tulio/ + [ "$TULIO_DEBUG" ] && echo DEBUG: mv ${BUILD_DIR}/usr/local/tulio/php ${BUILD_DIR_TULIO_PHP}/usr/local/tulio/ + mv ${BUILD_DIR}/usr/local/tulio/php ${BUILD_DIR_TULIO_PHP}/usr/local/tulio/ # copy binary - [ "$TULIO_DEBUG" ] && echo DEBUG: cp $BUILD_DIR_HESTIAPHP/usr/local/tulio/php/sbin/php-fpm $BUILD_DIR_HESTIAPHP/usr/local/tulio/php/sbin/tulio-php - cp $BUILD_DIR_HESTIAPHP/usr/local/tulio/php/sbin/php-fpm $BUILD_DIR_HESTIAPHP/usr/local/tulio/php/sbin/tulio-php + [ "$TULIO_DEBUG" ] && echo DEBUG: cp $BUILD_DIR_TULIO_PHP/usr/local/tulio/php/sbin/php-fpm $BUILD_DIR_TULIO_PHP/usr/local/tulio/php/sbin/tulio-php + cp $BUILD_DIR_TULIO_PHP/usr/local/tulio/php/sbin/php-fpm $BUILD_DIR_TULIO_PHP/usr/local/tulio/php/sbin/tulio-php # Change permissions and build the package - chown -R root:root $BUILD_DIR_HESTIAPHP + chown -R root:root $BUILD_DIR_TULIO_PHP # Get Debian package files - [ "$TULIO_DEBUG" ] && echo DEBUG: mkdir -p $BUILD_DIR_HESTIAPHP/DEBIAN - mkdir -p $BUILD_DIR_HESTIAPHP/DEBIAN - get_branch_file 'src/deb/php/control' "$BUILD_DIR_HESTIAPHP/DEBIAN/control" + [ "$TULIO_DEBUG" ] && echo DEBUG: mkdir -p $BUILD_DIR_TULIO_PHP/DEBIAN + mkdir -p $BUILD_DIR_TULIO_PHP/DEBIAN + get_branch_file 'src/deb/php/control' "$BUILD_DIR_TULIO_PHP/DEBIAN/control" if [ "$BUILD_ARCH" != "amd64" ]; then - sed -i "s/amd64/${BUILD_ARCH}/g" "$BUILD_DIR_HESTIAPHP/DEBIAN/control" + sed -i "s/amd64/${BUILD_ARCH}/g" "$BUILD_DIR_TULIO_PHP/DEBIAN/control" fi os=$(lsb_release -is) release=$(lsb_release -rs) if [[ "$os" = "Ubuntu" ]] && [[ "$release" = "20.04" ]]; then - sed -i "/Conflicts: libzip5/d" "$BUILD_DIR_HESTIAPHP/DEBIAN/control" - sed -i "s/libzip4/libzip5/g" "$BUILD_DIR_HESTIAPHP/DEBIAN/control" + sed -i "/Conflicts: libzip5/d" "$BUILD_DIR_TULIO_PHP/DEBIAN/control" + sed -i "s/libzip4/libzip5/g" "$BUILD_DIR_TULIO_PHP/DEBIAN/control" fi if [[ "$os" = "Ubuntu" ]] && [[ "$release" = "24.04" ]]; then - sed -i "/Conflicts: libzip5/d" "$BUILD_DIR_HESTIAPHP/DEBIAN/control" - sed -i "s/libzip4/libzip4t64/g" "$BUILD_DIR_HESTIAPHP/DEBIAN/control" + sed -i "/Conflicts: libzip5/d" "$BUILD_DIR_TULIO_PHP/DEBIAN/control" + sed -i "s/libzip4/libzip4t64/g" "$BUILD_DIR_TULIO_PHP/DEBIAN/control" fi - get_branch_file 'src/deb/php/copyright' "$BUILD_DIR_HESTIAPHP/DEBIAN/copyright" - get_branch_file 'src/deb/php/postinst' "$BUILD_DIR_HESTIAPHP/DEBIAN/postinst" - chmod +x $BUILD_DIR_HESTIAPHP/DEBIAN/postinst + get_branch_file 'src/deb/php/copyright' "$BUILD_DIR_TULIO_PHP/DEBIAN/copyright" + get_branch_file 'src/deb/php/postinst' "$BUILD_DIR_TULIO_PHP/DEBIAN/postinst" + chmod +x $BUILD_DIR_TULIO_PHP/DEBIAN/postinst # Get custom config - get_branch_file 'src/deb/php/php-fpm.conf' "${BUILD_DIR_HESTIAPHP}/usr/local/tulio/php/etc/php-fpm.conf" - get_branch_file 'src/deb/php/php.ini' "${BUILD_DIR_HESTIAPHP}/usr/local/tulio/php/lib/php.ini" + get_branch_file 'src/deb/php/php-fpm.conf' "${BUILD_DIR_TULIO_PHP}/usr/local/tulio/php/etc/php-fpm.conf" + get_branch_file 'src/deb/php/php.ini' "${BUILD_DIR_TULIO_PHP}/usr/local/tulio/php/lib/php.ini" # Build the package echo Building PHP DEB - [ "$TULIO_DEBUG" ] && echo DEBUG: dpkg-deb -Zxz --build $BUILD_DIR_HESTIAPHP $DEB_DIR - dpkg-deb -Zxz --build $BUILD_DIR_HESTIAPHP $DEB_DIR + [ "$TULIO_DEBUG" ] && echo DEBUG: dpkg-deb -Zxz --build $BUILD_DIR_TULIO_PHP $DEB_DIR + dpkg-deb -Zxz --build $BUILD_DIR_TULIO_PHP $DEB_DIR rm -r $BUILD_DIR/usr # clear up the source folder if [ "$KEEPBUILD" != 'true' ]; then rm -r $BUILD_DIR/php-$(echo $PHP_V | cut -d"~" -f1) - rm -r $BUILD_DIR_HESTIAPHP + rm -r $BUILD_DIR_TULIO_PHP if [ "$use_src_folder" == 'true' ] && [ -d $BUILD_DIR/tuliocp-$branch_dash ]; then rm -r $BUILD_DIR/tuliocp-$branch_dash fi @@ -574,53 +574,53 @@ if [ "$WEB_TERMINAL_B" = true ]; then echo "Building tulio-web-terminal package..." - BUILD_DIR_HESTIA_TERMINAL=$BUILD_DIR/tulio-web-terminal_$WEB_TERMINAL_V + BUILD_DIR_TULIO_TERMINAL=$BUILD_DIR/tulio-web-terminal_$WEB_TERMINAL_V # Check if target directory exist - if [ -d $BUILD_DIR_HESTIA_TERMINAL ]; then - rm -r $BUILD_DIR_HESTIA_TERMINAL + if [ -d $BUILD_DIR_TULIO_TERMINAL ]; then + rm -r $BUILD_DIR_TULIO_TERMINAL fi # Create directory - mkdir -p $BUILD_DIR_HESTIA_TERMINAL - chown -R root:root $BUILD_DIR_HESTIA_TERMINAL + mkdir -p $BUILD_DIR_TULIO_TERMINAL + chown -R root:root $BUILD_DIR_TULIO_TERMINAL # Get Debian package files - [ "$TULIO_DEBUG" ] && echo DEBUG: mkdir -p $BUILD_DIR_HESTIA_TERMINAL/DEBIAN - mkdir -p $BUILD_DIR_HESTIA_TERMINAL/DEBIAN - get_branch_file 'src/deb/web-terminal/control' "$BUILD_DIR_HESTIA_TERMINAL/DEBIAN/control" + [ "$TULIO_DEBUG" ] && echo DEBUG: mkdir -p $BUILD_DIR_TULIO_TERMINAL/DEBIAN + mkdir -p $BUILD_DIR_TULIO_TERMINAL/DEBIAN + get_branch_file 'src/deb/web-terminal/control' "$BUILD_DIR_TULIO_TERMINAL/DEBIAN/control" if [ "$BUILD_ARCH" != "amd64" ]; then - sed -i "s/amd64/${BUILD_ARCH}/g" "$BUILD_DIR_HESTIA_TERMINAL/DEBIAN/control" + sed -i "s/amd64/${BUILD_ARCH}/g" "$BUILD_DIR_TULIO_TERMINAL/DEBIAN/control" fi - get_branch_file 'src/deb/web-terminal/copyright' "$BUILD_DIR_HESTIA_TERMINAL/DEBIAN/copyright" - get_branch_file 'src/deb/web-terminal/postinst' "$BUILD_DIR_HESTIA_TERMINAL/DEBIAN/postinst" - chmod +x $BUILD_DIR_HESTIA_TERMINAL/DEBIAN/postinst + get_branch_file 'src/deb/web-terminal/copyright' "$BUILD_DIR_TULIO_TERMINAL/DEBIAN/copyright" + get_branch_file 'src/deb/web-terminal/postinst' "$BUILD_DIR_TULIO_TERMINAL/DEBIAN/postinst" + chmod +x $BUILD_DIR_TULIO_TERMINAL/DEBIAN/postinst # Get server files - [ "$TULIO_DEBUG" ] && echo DEBUG: mkdir -p "${BUILD_DIR_HESTIA_TERMINAL}/usr/local/tulio/web-terminal" - mkdir -p "${BUILD_DIR_HESTIA_TERMINAL}/usr/local/tulio/web-terminal" - get_branch_file 'src/deb/web-terminal/package.json' "${BUILD_DIR_HESTIA_TERMINAL}/usr/local/tulio/web-terminal/package.json" - get_branch_file 'src/deb/web-terminal/package-lock.json' "${BUILD_DIR_HESTIA_TERMINAL}/usr/local/tulio/web-terminal/package-lock.json" - get_branch_file 'src/deb/web-terminal/server.js' "${BUILD_DIR_HESTIA_TERMINAL}/usr/local/tulio/web-terminal/server.js" - chmod +x "${BUILD_DIR_HESTIA_TERMINAL}/usr/local/tulio/web-terminal/server.js" - - cd $BUILD_DIR_HESTIA_TERMINAL/usr/local/tulio/web-terminal + [ "$TULIO_DEBUG" ] && echo DEBUG: mkdir -p "${BUILD_DIR_TULIO_TERMINAL}/usr/local/tulio/web-terminal" + mkdir -p "${BUILD_DIR_TULIO_TERMINAL}/usr/local/tulio/web-terminal" + get_branch_file 'src/deb/web-terminal/package.json' "${BUILD_DIR_TULIO_TERMINAL}/usr/local/tulio/web-terminal/package.json" + get_branch_file 'src/deb/web-terminal/package-lock.json' "${BUILD_DIR_TULIO_TERMINAL}/usr/local/tulio/web-terminal/package-lock.json" + get_branch_file 'src/deb/web-terminal/server.js' "${BUILD_DIR_TULIO_TERMINAL}/usr/local/tulio/web-terminal/server.js" + chmod +x "${BUILD_DIR_TULIO_TERMINAL}/usr/local/tulio/web-terminal/server.js" + + cd $BUILD_DIR_TULIO_TERMINAL/usr/local/tulio/web-terminal npm ci --omit=dev # Systemd service - [ "$TULIO_DEBUG" ] && echo DEBUG: mkdir -p $BUILD_DIR_HESTIA_TERMINAL/etc/systemd/system - mkdir -p $BUILD_DIR_HESTIA_TERMINAL/etc/systemd/system - get_branch_file 'src/deb/web-terminal/tulio-web-terminal.service' "$BUILD_DIR_HESTIA_TERMINAL/etc/systemd/system/tulio-web-terminal.service" + [ "$TULIO_DEBUG" ] && echo DEBUG: mkdir -p $BUILD_DIR_TULIO_TERMINAL/etc/systemd/system + mkdir -p $BUILD_DIR_TULIO_TERMINAL/etc/systemd/system + get_branch_file 'src/deb/web-terminal/tulio-web-terminal.service' "$BUILD_DIR_TULIO_TERMINAL/etc/systemd/system/tulio-web-terminal.service" # Build the package echo Building Web Terminal DEB - [ "$TULIO_DEBUG" ] && echo DEBUG: dpkg-deb -Zxz --build $BUILD_DIR_HESTIA_TERMINAL $DEB_DIR - dpkg-deb -Zxz --build $BUILD_DIR_HESTIA_TERMINAL $DEB_DIR + [ "$TULIO_DEBUG" ] && echo DEBUG: dpkg-deb -Zxz --build $BUILD_DIR_TULIO_TERMINAL $DEB_DIR + dpkg-deb -Zxz --build $BUILD_DIR_TULIO_TERMINAL $DEB_DIR # clear up the source folder if [ "$KEEPBUILD" != 'true' ]; then - rm -r $BUILD_DIR_HESTIA_TERMINAL + rm -r $BUILD_DIR_TULIO_TERMINAL if [ "$use_src_folder" == 'true' ] && [ -d $BUILD_DIR/tuliocp-$branch_dash ]; then rm -r $BUILD_DIR/tuliocp-$branch_dash fi @@ -647,14 +647,14 @@ if [ "$TULIO_B" = true ]; then # Change to build directory cd $BUILD_DIR - if [ "$KEEPBUILD" != 'true' ] || [ ! -d "$BUILD_DIR_HESTIA" ]; then + if [ "$KEEPBUILD" != 'true' ] || [ ! -d "$BUILD_DIR_TULIO" ]; then # Check if target directory exist - if [ -d $BUILD_DIR_HESTIA ]; then - rm -r $BUILD_DIR_HESTIA + if [ -d $BUILD_DIR_TULIO ]; then + rm -r $BUILD_DIR_TULIO fi # Create directory - mkdir -p $BUILD_DIR_HESTIA + mkdir -p $BUILD_DIR_TULIO fi cd $BUILD_DIR @@ -667,42 +667,42 @@ if [ "$TULIO_B" = true ]; then download_file $TULIO_ARCHIVE_LINK '-' 'fresh' | tar xz fi - mkdir -p $BUILD_DIR_HESTIA/usr/local/tulio + mkdir -p $BUILD_DIR_TULIO/usr/local/tulio # Build web and move needed directories cd $BUILD_DIR/tuliocp-$branch_dash npm ci --ignore-scripts npm run build - cp -rf bin func install web $BUILD_DIR_HESTIA/usr/local/tulio/ + cp -rf bin func install web $BUILD_DIR_TULIO/usr/local/tulio/ # Set permissions - find $BUILD_DIR_HESTIA/usr/local/tulio/ -type f -exec chmod -x {} \; + find $BUILD_DIR_TULIO/usr/local/tulio/ -type f -exec chmod -x {} \; # Allow send email via /usr/local/tulio/web/inc/mail-wrapper.php via cli - chmod +x $BUILD_DIR_HESTIA/usr/local/tulio/web/inc/mail-wrapper.php + chmod +x $BUILD_DIR_TULIO/usr/local/tulio/web/inc/mail-wrapper.php # Allow the executable to be executed - chmod +x $BUILD_DIR_HESTIA/usr/local/tulio/bin/* - find $BUILD_DIR_HESTIA/usr/local/tulio/install/ \( -name '*.sh' \) -exec chmod +x {} \; - chmod -x $BUILD_DIR_HESTIA/usr/local/tulio/install/*.sh - chown -R root:root $BUILD_DIR_HESTIA + chmod +x $BUILD_DIR_TULIO/usr/local/tulio/bin/* + find $BUILD_DIR_TULIO/usr/local/tulio/install/ \( -name '*.sh' \) -exec chmod +x {} \; + chmod -x $BUILD_DIR_TULIO/usr/local/tulio/install/*.sh + chown -R root:root $BUILD_DIR_TULIO # Get Debian package files - mkdir -p $BUILD_DIR_HESTIA/DEBIAN - get_branch_file 'src/deb/tulio/control' "$BUILD_DIR_HESTIA/DEBIAN/control" + mkdir -p $BUILD_DIR_TULIO/DEBIAN + get_branch_file 'src/deb/tulio/control' "$BUILD_DIR_TULIO/DEBIAN/control" if [ "$BUILD_ARCH" != "amd64" ]; then - sed -i "s/amd64/${BUILD_ARCH}/g" "$BUILD_DIR_HESTIA/DEBIAN/control" + sed -i "s/amd64/${BUILD_ARCH}/g" "$BUILD_DIR_TULIO/DEBIAN/control" fi - get_branch_file 'src/deb/tulio/copyright' "$BUILD_DIR_HESTIA/DEBIAN/copyright" - get_branch_file 'src/deb/tulio/preinst' "$BUILD_DIR_HESTIA/DEBIAN/preinst" - get_branch_file 'src/deb/tulio/postinst' "$BUILD_DIR_HESTIA/DEBIAN/postinst" - chmod +x $BUILD_DIR_HESTIA/DEBIAN/postinst - chmod +x $BUILD_DIR_HESTIA/DEBIAN/preinst + get_branch_file 'src/deb/tulio/copyright' "$BUILD_DIR_TULIO/DEBIAN/copyright" + get_branch_file 'src/deb/tulio/preinst' "$BUILD_DIR_TULIO/DEBIAN/preinst" + get_branch_file 'src/deb/tulio/postinst' "$BUILD_DIR_TULIO/DEBIAN/postinst" + chmod +x $BUILD_DIR_TULIO/DEBIAN/postinst + chmod +x $BUILD_DIR_TULIO/DEBIAN/preinst echo Building Tulio DEB - dpkg-deb -Zxz --build $BUILD_DIR_HESTIA $DEB_DIR + dpkg-deb -Zxz --build $BUILD_DIR_TULIO $DEB_DIR # clear up the source folder if [ "$KEEPBUILD" != 'true' ]; then - rm -r $BUILD_DIR_HESTIA + rm -r $BUILD_DIR_TULIO rm -rf tuliocp-$branch_dash fi cd $BUILD_DIR/tuliocp-$branch_dash diff --git a/test/test.bats b/test/test.bats index 5a7cabba9..da236032f 100755 --- a/test/test.bats +++ b/test/test.bats @@ -1728,11 +1728,11 @@ function check_ip_not_banned(){ assert_success refute_output - run grep "RECORD='_domainkey'" "${HESTIA}/data/users/${user}/dns/${domain}.conf" + run grep "RECORD='_domainkey'" "${TULIO}/data/users/${user}/dns/${domain}.conf" assert_failure refute_output - run grep "RECORD='mail._domainkey'" "${HESTIA}/data/users/${user}/dns/${domain}.conf" + run grep "RECORD='mail._domainkey'" "${TULIO}/data/users/${user}/dns/${domain}.conf" assert_failure refute_output } @@ -1742,11 +1742,11 @@ function check_ip_not_banned(){ assert_success refute_output - run grep "RECORD='_domainkey'" "${HESTIA}/data/users/${user}/dns/${domain}.conf" + run grep "RECORD='_domainkey'" "${TULIO}/data/users/${user}/dns/${domain}.conf" assert_success assert_output --partial "RECORD='_domainkey' TYPE='TXT'" - run grep "RECORD='mail._domainkey'" "${HESTIA}/data/users/${user}/dns/${domain}.conf" + run grep "RECORD='mail._domainkey'" "${TULIO}/data/users/${user}/dns/${domain}.conf" assert_success assert_output --partial "RECORD='mail._domainkey' TYPE='TXT'" } @@ -1760,7 +1760,7 @@ function check_ip_not_banned(){ assert_success refute_output - run grep "RECORD='k2._domainkey'" "${HESTIA}/data/users/${user}/dns/${domain}.conf" + run grep "RECORD='k2._domainkey'" "${TULIO}/data/users/${user}/dns/${domain}.conf" assert_success assert_output --partial "RECORD='k2._domainkey' TYPE='TXT'" } @@ -2059,43 +2059,43 @@ function check_ip_not_banned(){ #----------------------------------------------------------# @test "Firewall: Add ip to banlist" { - run v-add-firewall-ban '1.2.3.4' 'HESTIA' + run v-add-firewall-ban '1.2.3.4' 'TULIO' assert_success refute_output - check_ip_banned '1.2.3.4' 'HESTIA' + check_ip_banned '1.2.3.4' 'TULIO' } @test "Firewall: Delete ip to banlist" { - run v-delete-firewall-ban '1.2.3.4' 'HESTIA' + run v-delete-firewall-ban '1.2.3.4' 'TULIO' assert_success refute_output - check_ip_not_banned '1.2.3.4' 'HESTIA' + check_ip_not_banned '1.2.3.4' 'TULIO' } @test "Firewall: Add ip to banlist for ALL" { - run v-add-firewall-ban '1.2.3.4' 'HESTIA' + run v-add-firewall-ban '1.2.3.4' 'TULIO' assert_success refute_output run v-add-firewall-ban '1.2.3.4' 'MAIL' assert_success refute_output - check_ip_banned '1.2.3.4' 'HESTIA' + check_ip_banned '1.2.3.4' 'TULIO' } @test "Firewall: Delete ip to banlist CHAIN = ALL" { run v-delete-firewall-ban '1.2.3.4' 'ALL' assert_success refute_output - check_ip_not_banned '1.2.3.4' 'HESTIA' + check_ip_not_banned '1.2.3.4' 'TULIO' } @test "Test Whitelist Fail2ban" { echo "1.2.3.4" >> $TULIO/data/firewall/excludes.conf - run v-add-firewall-ban '1.2.3.4' 'HESTIA' + run v-add-firewall-ban '1.2.3.4' 'TULIO' rm $TULIO/data/firewall/excludes.conf - check_ip_not_banned '1.2.3.4' 'HESTIA' + check_ip_not_banned '1.2.3.4' 'TULIO' } @test "Test create ipset" { diff --git a/web/add/access-key/index.php b/web/add/access-key/index.php index ddc38d4e5..c928021f1 100644 --- a/web/add/access-key/index.php +++ b/web/add/access-key/index.php @@ -17,7 +17,7 @@ } // APIs available -exec(HESTIA_CMD . "v-list-apis json", $output, $return_var); +exec(TULIO_CMD . "v-list-apis json", $output, $return_var); $apis = json_decode(implode("", $output), true); $apis = array_filter($apis, function ($api) use ($user_plain) { return $user_plain == $_SESSION["ROOT_USER"] || $api["ROLE"] == "user"; @@ -63,7 +63,7 @@ // Add access key if (empty($_SESSION["error_msg"])) { exec( - HESTIA_CMD . "v-add-access-key " . $user . " " . $v_apis . " " . $v_comment . " json", + TULIO_CMD . "v-add-access-key " . $user . " " . $v_apis . " " . $v_comment . " json", $output, $return_var, ); diff --git a/web/add/cron/autoupdate/index.php b/web/add/cron/autoupdate/index.php index 18b13a6f8..b0bc1e22c 100644 --- a/web/add/cron/autoupdate/index.php +++ b/web/add/cron/autoupdate/index.php @@ -9,7 +9,7 @@ ($_SESSION["userContext"] === "admin" && $_SESSION["POLICY_SYSTEM_HIDE_SERVICES"] == "no") || $_SESSION["user"] == $_SESSION["ROOT_USER"] ) { - exec(HESTIA_CMD . "v-add-cron-tulio-autoupdate", $output, $return_var); + exec(TULIO_CMD . "v-add-cron-tulio-autoupdate", $output, $return_var); unset($output); } diff --git a/web/add/cron/index.php b/web/add/cron/index.php index 7e6ade1e8..2972d82f8 100644 --- a/web/add/cron/index.php +++ b/web/add/cron/index.php @@ -53,7 +53,7 @@ // Add cron job if (empty($_SESSION["error_msg"])) { exec( - HESTIA_CMD . + TULIO_CMD . "v-add-cron-job " . $user . " " . @@ -108,7 +108,7 @@ } // Get current system time -exec(HESTIA_CMD . "v-get-sys-timezone", $output, $return_var); +exec(TULIO_CMD . "v-get-sys-timezone", $output, $return_var); date_default_timezone_set($output[0]); $current_timestamp = time(); diff --git a/web/add/cron/reports/index.php b/web/add/cron/reports/index.php index d75e654aa..32fee866a 100644 --- a/web/add/cron/reports/index.php +++ b/web/add/cron/reports/index.php @@ -5,7 +5,7 @@ // Check token verify_csrf($_GET); -exec(HESTIA_CMD . "v-add-cron-reports " . $user, $output, $return_var); +exec(TULIO_CMD . "v-add-cron-reports " . $user, $output, $return_var); unset($output); header("Location: /list/cron/"); diff --git a/web/add/db/index.php b/web/add/db/index.php index 907599316..0557bb5bb 100644 --- a/web/add/db/index.php +++ b/web/add/db/index.php @@ -74,7 +74,7 @@ fwrite($fp, $_POST["v_password"] . "\n"); fclose($fp); exec( - HESTIA_CMD . + TULIO_CMD . "v-add-database " . $user . " " . @@ -229,7 +229,7 @@ $db_types = explode(",", $_SESSION["DB_SYSTEM"]); // List available database servers -exec(HESTIA_CMD . "v-list-database-hosts json", $output, $return_var); +exec(TULIO_CMD . "v-list-database-hosts json", $output, $return_var); $db_hosts_tmp1 = json_decode(implode("", $output), true); $db_hosts_tmp2 = array_map(function ($host) { return $host["HOST"]; diff --git a/web/add/dns/index.php b/web/add/dns/index.php index a7806680b..e68f5cde9 100644 --- a/web/add/dns/index.php +++ b/web/add/dns/index.php @@ -8,7 +8,7 @@ include $_SERVER["DOCUMENT_ROOT"] . "/inc/main.php"; // List ip addresses -exec(HESTIA_CMD . "v-list-user-ips " . $user . " json", $output, $return_var); +exec(TULIO_CMD . "v-list-user-ips " . $user . " json", $output, $return_var); $v_ips = json_decode(implode("", $output), true); unset($output); @@ -81,7 +81,7 @@ // Add dns domain if (empty($_SESSION["error_msg"])) { exec( - HESTIA_CMD . + TULIO_CMD . "v-add-dns-domain " . $user . " " . @@ -112,7 +112,7 @@ check_return_code($return_var, $output); unset($output); } - exec(HESTIA_CMD . "v-list-user " . $user . " json", $output, $return_var); + exec(TULIO_CMD . "v-list-user " . $user . " json", $output, $return_var); $user_config = json_decode(implode("", $output), true); unset($output); $v_template = $user_config[$user_plain]["DNS_TEMPLATE"]; @@ -124,7 +124,7 @@ ) { $v_template = quoteshellarg($_POST["v_template"]); exec( - HESTIA_CMD . + TULIO_CMD . "v-change-dns-domain-tpl " . $user . " " . @@ -144,7 +144,7 @@ if (!empty($_POST["v_exp"]) && $_POST["v_exp"] != date("Y-m-d", strtotime("+1 year"))) { $v_exp = quoteshellarg($_POST["v_exp"]); exec( - HESTIA_CMD . + TULIO_CMD . "v-change-dns-domain-exp " . $user . " " . @@ -169,7 +169,7 @@ ) { $v_ttl = quoteshellarg($_POST["v_ttl"]); exec( - HESTIA_CMD . + TULIO_CMD . "v-change-dns-domain-ttl " . $user . " " . @@ -187,7 +187,7 @@ // Restart dns server if (empty($_SESSION["error_msg"])) { - exec(HESTIA_CMD . "v-restart-dns", $output, $return_var); + exec(TULIO_CMD . "v-restart-dns", $output, $return_var); check_return_code($return_var, $output); unset($output); } @@ -250,7 +250,7 @@ // Add dns record if (empty($_SESSION["error_msg"])) { exec( - HESTIA_CMD . + TULIO_CMD . "v-add-dns-record " . $user . " " . @@ -332,11 +332,11 @@ } // List dns templates -exec(HESTIA_CMD . "v-list-dns-templates json", $output, $return_var); +exec(TULIO_CMD . "v-list-dns-templates json", $output, $return_var); $templates = json_decode(implode("", $output), true); unset($output); -exec(HESTIA_CMD . "v-list-user " . $user . " json", $output, $return_var); +exec(TULIO_CMD . "v-list-user " . $user . " json", $output, $return_var); $user_config = json_decode(implode("", $output), true); unset($output); $v_template = $user_config[$user_plain]["DNS_TEMPLATE"]; @@ -356,7 +356,7 @@ $v_dnssec = ""; } if (empty($v_ns1)) { - exec(HESTIA_CMD . "v-list-user-ns " . $user . " json", $output, $return_var); + exec(TULIO_CMD . "v-list-user-ns " . $user . " json", $output, $return_var); $nameservers = json_decode(implode("", $output), true); for ($i = 0; $i < 8; $i++) { if (empty($nameservers[$i])) { diff --git a/web/add/firewall/banlist/index.php b/web/add/firewall/banlist/index.php index f15a4a947..c1b51447e 100644 --- a/web/add/firewall/banlist/index.php +++ b/web/add/firewall/banlist/index.php @@ -42,7 +42,7 @@ // Add firewall rule if (empty($_SESSION["error_msg"])) { - exec(HESTIA_CMD . "v-add-firewall-ban " . $v_ip . " " . $v_chain, $output, $return_var); + exec(TULIO_CMD . "v-add-firewall-ban " . $v_ip . " " . $v_chain, $output, $return_var); check_return_code($return_var, $output); unset($output); } diff --git a/web/add/firewall/index.php b/web/add/firewall/index.php index 142060483..d069813bf 100644 --- a/web/add/firewall/index.php +++ b/web/add/firewall/index.php @@ -14,7 +14,7 @@ } // Get ipset lists -exec(HESTIA_CMD . "v-list-firewall-ipset 'json'", $output, $return_var); +exec(TULIO_CMD . "v-list-firewall-ipset 'json'", $output, $return_var); check_return_code($return_var, $output); $data = json_decode(implode("", $output), true); unset($output); @@ -74,7 +74,7 @@ // Add firewall rule if (empty($_SESSION["error_msg"])) { exec( - HESTIA_CMD . + TULIO_CMD . "v-add-firewall-rule " . $v_action . " " . diff --git a/web/add/firewall/ipset/index.php b/web/add/firewall/ipset/index.php index 6339f3f8e..1f9500774 100644 --- a/web/add/firewall/ipset/index.php +++ b/web/add/firewall/ipset/index.php @@ -51,7 +51,7 @@ // Add firewall ipset list if (empty($_SESSION["error_msg"])) { exec( - HESTIA_CMD . + TULIO_CMD . "v-add-firewall-ipset " . quoteshellarg($v_ipname) . " " . diff --git a/web/add/ip/index.php b/web/add/ip/index.php index 7c1d93254..154624c4b 100644 --- a/web/add/ip/index.php +++ b/web/add/ip/index.php @@ -62,7 +62,7 @@ // Add IP if (empty($_SESSION["error_msg"])) { exec( - HESTIA_CMD . + TULIO_CMD . "v-add-sys-ip " . $v_ip . " " . @@ -104,12 +104,12 @@ } // List network interfaces -exec(HESTIA_CMD . "v-list-sys-interfaces 'json'", $output, $return_var); +exec(TULIO_CMD . "v-list-sys-interfaces 'json'", $output, $return_var); $interfaces = json_decode(implode("", $output), true); unset($output); // List users -exec(HESTIA_CMD . "v-list-sys-users 'json'", $output, $return_var); +exec(TULIO_CMD . "v-list-sys-users 'json'", $output, $return_var); $users = json_decode(implode("", $output), true); unset($output); diff --git a/web/add/key/index.php b/web/add/key/index.php index 2993a28b1..1953a6ed9 100644 --- a/web/add/key/index.php +++ b/web/add/key/index.php @@ -34,7 +34,7 @@ if (empty($_SESSION["error_msg"])) { if ($_POST) { //key if key already exists - exec(HESTIA_CMD . "v-list-user-ssh-key " . $user . " json", $output, $return_var); + exec(TULIO_CMD . "v-list-user-ssh-key " . $user . " json", $output, $return_var); $data = json_decode(implode("", $output), true); unset($output); $keylist = []; @@ -64,7 +64,7 @@ } if (empty($_SESSION["error_msg"])) { - exec(HESTIA_CMD . "v-add-user-ssh-key " . $user . " " . $v_key, $output, $return_var); + exec(TULIO_CMD . "v-add-user-ssh-key " . $user . " " . $v_key, $output, $return_var); check_return_code($return_var, $output); } unset($output); diff --git a/web/add/mail/index.php b/web/add/mail/index.php index e1f950c2c..7808236f7 100644 --- a/web/add/mail/index.php +++ b/web/add/mail/index.php @@ -7,7 +7,7 @@ // Main include include $_SERVER["DOCUMENT_ROOT"] . "/inc/main.php"; -exec(HESTIA_CMD . "v-list-sys-webmail json", $output, $return_var); +exec(TULIO_CMD . "v-list-sys-webmail json", $output, $return_var); $webmail_clients = json_decode(implode("", $output), true); unset($output); @@ -17,7 +17,7 @@ if (!empty($v_domain)) { // Set webmail alias exec( - HESTIA_CMD . "v-list-mail-domain " . $user . " " . quoteshellarg($v_domain) . " json", + TULIO_CMD . "v-list-mail-domain " . $user . " " . quoteshellarg($v_domain) . " json", $output, $return_var, ); @@ -78,7 +78,7 @@ // Add mail domain if (empty($_SESSION["error_msg"])) { exec( - HESTIA_CMD . + TULIO_CMD . "v-add-mail-domain " . $user . " " . @@ -98,7 +98,7 @@ if (!empty($_POST["v_reject"]) && $v_antispam == "yes") { exec( - HESTIA_CMD . "v-add-mail-domain-reject " . $user . " " . $v_domain . " yes", + TULIO_CMD . "v-add-mail-domain-reject " . $user . " " . $v_domain . " yes", $output, $return_var, ); @@ -111,7 +111,7 @@ if (!empty($_POST["v_webmail"])) { $v_webmail = quoteshellarg($_POST["v_webmail"]); exec( - HESTIA_CMD . + TULIO_CMD . "v-add-mail-domain-webmail " . $user . " " . @@ -132,7 +132,7 @@ if (empty($_POST["v_webmail"])) { if (empty($_SESSION["error_msg"])) { exec( - HESTIA_CMD . "v-delete-mail-domain-webmail " . $user . " " . $v_domain . " yes", + TULIO_CMD . "v-delete-mail-domain-webmail " . $user . " " . $v_domain . " yes", $output, $return_var, ); @@ -160,7 +160,7 @@ $v_smtp_relay_port = "587"; } exec( - HESTIA_CMD . + TULIO_CMD . "v-add-mail-domain-smtp-relay " . $user . " " . @@ -269,7 +269,7 @@ fwrite($fp, $_POST["v_password"] . "\n"); fclose($fp); exec( - HESTIA_CMD . + TULIO_CMD . "v-add-mail-account " . $user . " " . @@ -300,7 +300,7 @@ $alias = quoteshellarg($alias); if (empty($_SESSION["error_msg"])) { exec( - HESTIA_CMD . + TULIO_CMD . "v-add-mail-account-alias " . $user . " " . @@ -320,7 +320,7 @@ if (!empty($_POST["v_blackhole"]) && empty($_SESSION["error_msg"])) { exec( - HESTIA_CMD . + TULIO_CMD . "v-add-mail-account-forward " . $user . " " . @@ -347,7 +347,7 @@ $forward = quoteshellarg($forward); if (empty($_SESSION["error_msg"])) { exec( - HESTIA_CMD . + TULIO_CMD . "v-add-mail-account-forward " . $user . " " . @@ -368,13 +368,7 @@ // Add fwd_only flag if (!empty($_POST["v_fwd_only"]) && empty($_SESSION["error_msg"])) { exec( - HESTIA_CMD . - "v-add-mail-account-fwd-only " . - $user . - " " . - $v_domain . - " " . - $v_account, + TULIO_CMD . "v-add-mail-account-fwd-only " . $user . " " . $v_domain . " " . $v_account, $output, $return_var, ); @@ -390,7 +384,7 @@ ) { $v_rate = quoteshellarg($_POST["v_rate"]); exec( - HESTIA_CMD . + TULIO_CMD . "v-change-mail-account-rate-limit " . $user . " " . diff --git a/web/add/package/index.php b/web/add/package/index.php index e7ce909de..deb5330f5 100644 --- a/web/add/package/index.php +++ b/web/add/package/index.php @@ -221,7 +221,7 @@ $fp = fopen($tmpfile, "w"); fwrite($fp, $pkg); exec( - HESTIA_CMD . "v-add-user-package " . $tmpfile . " " . $v_package, + TULIO_CMD . "v-add-user-package " . $tmpfile . " " . $v_package, $output, $return_var, ); @@ -247,31 +247,31 @@ } // List web temmplates -exec(HESTIA_CMD . "v-list-web-templates json", $output, $return_var); +exec(TULIO_CMD . "v-list-web-templates json", $output, $return_var); $web_templates = json_decode(implode("", $output), true); unset($output); // List web templates for backend if (!empty($_SESSION["WEB_BACKEND"])) { - exec(HESTIA_CMD . "v-list-web-templates-backend json", $output, $return_var); + exec(TULIO_CMD . "v-list-web-templates-backend json", $output, $return_var); $backend_templates = json_decode(implode("", $output), true); unset($output); } // List web templates for proxy if (!empty($_SESSION["PROXY_SYSTEM"])) { - exec(HESTIA_CMD . "v-list-web-templates-proxy json", $output, $return_var); + exec(TULIO_CMD . "v-list-web-templates-proxy json", $output, $return_var); $proxy_templates = json_decode(implode("", $output), true); unset($output); } // List DNS templates -exec(HESTIA_CMD . "v-list-dns-templates json", $output, $return_var); +exec(TULIO_CMD . "v-list-dns-templates json", $output, $return_var); $dns_templates = json_decode(implode("", $output), true); unset($output); // List system shells -exec(HESTIA_CMD . "v-list-sys-shells json", $output, $return_var); +exec(TULIO_CMD . "v-list-sys-shells json", $output, $return_var); $shells = json_decode(implode("", $output), true); unset($output); diff --git a/web/add/user/index.php b/web/add/user/index.php index 727462daf..9d2b0625a 100644 --- a/web/add/user/index.php +++ b/web/add/user/index.php @@ -72,7 +72,7 @@ fwrite($fp, $_POST["v_password"] . "\n"); fclose($fp); exec( - HESTIA_CMD . + TULIO_CMD . "v-add-user " . $v_username . " " . @@ -95,7 +95,7 @@ // Set language if (empty($_SESSION["error_msg"])) { exec( - HESTIA_CMD . "v-change-user-language " . $v_username . " " . $v_language, + TULIO_CMD . "v-change-user-language " . $v_username . " " . $v_language, $output, $return_var, ); @@ -106,11 +106,7 @@ // Set Role if (empty($_SESSION["error_msg"])) { $v_role = quoteshellarg($_POST["v_role"]); - exec( - HESTIA_CMD . "v-change-user-role " . $v_username . " " . $v_role, - $output, - $return_var, - ); + exec(TULIO_CMD . "v-change-user-role " . $v_username . " " . $v_role, $output, $return_var); check_return_code($return_var, $output); unset($output); } @@ -120,7 +116,7 @@ if (!empty($_POST["v_login_disabled"])) { $_POST["v_login_disabled"] = "yes"; exec( - HESTIA_CMD . + TULIO_CMD . "v-change-user-config-value " . $v_username . " LOGIN_DISABLED " . @@ -243,13 +239,13 @@ } // List hosting packages -exec(HESTIA_CMD . "v-list-user-packages json", $output, $return_var); +exec(TULIO_CMD . "v-list-user-packages json", $output, $return_var); check_error($return_var); $data = json_decode(implode("", $output), true); unset($output); // List languages -exec(HESTIA_CMD . "v-list-sys-languages json", $output, $return_var); +exec(TULIO_CMD . "v-list-sys-languages json", $output, $return_var); $language = json_decode(implode("", $output), true); foreach ($language as $lang) { $languages[$lang] = translate_json($lang); diff --git a/web/add/web/index.php b/web/add/web/index.php index f04b2e342..dbff97572 100644 --- a/web/add/web/index.php +++ b/web/add/web/index.php @@ -42,7 +42,7 @@ // Gets public IP from 'v-list-user-ips' command (that reads /tulio/data/ips/ip), precisely from 'NAT' field $v_public_ip = $v_ip; $v_clean_ip = $_POST["v_ip"]; // clean_ip = IP without quotas - exec(HESTIA_CMD . "v-list-user-ips " . $user . " json", $output, $return_var); + exec(TULIO_CMD . "v-list-user-ips " . $user . " json", $output, $return_var); $ips = json_decode(implode("", $output), true); unset($output); if ( @@ -60,7 +60,7 @@ // Define proxy extensions $_POST["v_proxy_ext"] = ""; - exec(HESTIA_CMD . "v-list-user " . $user . " json", $output, $return_var); + exec(TULIO_CMD . "v-list-user " . $user . " json", $output, $return_var); $user_config = json_decode(implode("", $output), true); unset($output); @@ -71,7 +71,7 @@ // Add web domain if (empty($_SESSION["error_msg"])) { exec( - HESTIA_CMD . + TULIO_CMD . "v-add-web-domain " . $user . " " . @@ -96,7 +96,7 @@ // Add DNS domain if ($_POST["v_dns"] == "on" && empty($_SESSION["error_msg"])) { exec( - HESTIA_CMD . + TULIO_CMD . "v-add-dns-domain " . $user . " " . @@ -114,7 +114,7 @@ // Add mail domain if ($_POST["v_mail"] == "on" && empty($_SESSION["error_msg"])) { exec( - HESTIA_CMD . "v-add-mail-domain " . $user . " " . quoteshellarg($v_domain), + TULIO_CMD . "v-add-mail-domain " . $user . " " . quoteshellarg($v_domain), $output, $return_var, ); @@ -137,11 +137,11 @@ $v_aliases = ""; // List user package -exec(HESTIA_CMD . "v-list-user " . $user . " json", $output, $return_var); +exec(TULIO_CMD . "v-list-user " . $user . " json", $output, $return_var); $user_config = json_decode(implode("", $output), true); unset($output); // List web templates and set default values -exec(HESTIA_CMD . "v-list-web-templates json", $output, $return_var); +exec(TULIO_CMD . "v-list-web-templates json", $output, $return_var); $templates = json_decode(implode("", $output), true); unset($output); $v_template = !empty($_POST["v_template"]) @@ -149,7 +149,7 @@ : $user_config[$user_plain]["WEB_TEMPLATE"]; // List backend templates if (!empty($_SESSION["WEB_BACKEND"])) { - exec(HESTIA_CMD . "v-list-web-templates-backend json", $output, $return_var); + exec(TULIO_CMD . "v-list-web-templates-backend json", $output, $return_var); $backend_templates = json_decode(implode("", $output), true); unset($output); $v_backend_template = !empty($_POST["v_backend_template"]) @@ -159,7 +159,7 @@ // List proxy templates if (!empty($_SESSION["PROXY_SYSTEM"])) { - exec(HESTIA_CMD . "v-list-web-templates-proxy json", $output, $return_var); + exec(TULIO_CMD . "v-list-web-templates-proxy json", $output, $return_var); $proxy_templates = json_decode(implode("", $output), true); unset($output); $v_proxy_template = !empty($_POST["v_proxy_template"]) @@ -168,12 +168,12 @@ } // List IP addresses -exec(HESTIA_CMD . "v-list-user-ips " . $user . " json", $output, $return_var); +exec(TULIO_CMD . "v-list-user-ips " . $user . " json", $output, $return_var); $ips = json_decode(implode("", $output), true); unset($output); // Get all user domains -exec(HESTIA_CMD . "v-list-web-domains " . $user . " json", $output, $return_var); +exec(TULIO_CMD . "v-list-web-domains " . $user . " json", $output, $return_var); $user_domains = json_decode(implode("", $output), true); $user_domains = array_keys($user_domains); unset($output); diff --git a/web/add/webapp/index.php b/web/add/webapp/index.php index 6bed29699..dcc4ec8ff 100644 --- a/web/add/webapp/index.php +++ b/web/add/webapp/index.php @@ -22,7 +22,7 @@ // Check if domain belongs to the user $v_domain = $_GET["domain"]; exec( - HESTIA_CMD . "v-list-web-domain " . $user . " " . quoteshellarg($v_domain) . " json", + TULIO_CMD . "v-list-web-domain " . $user . " " . quoteshellarg($v_domain) . " json", $output, $return_var, ); @@ -30,7 +30,7 @@ check_return_code_redirect($return_var, $output, "/list/web/"); } unset($output); -exec(HESTIA_CMD . "v-list-sys-php json", $output, $return_var); +exec(TULIO_CMD . "v-list-sys-php json", $output, $return_var); $php_versions = json_decode(implode("", $output), true); unset($output); @@ -38,7 +38,7 @@ if (!empty($_GET["app"])) { $app = basename($_GET["app"]); - $tulio = new \Tulio\System\TulioApp(); + $tulio = new \Tulio\System\TulioApp(); $app_installer_class = "\Tulio\WebApp\Installers\\" . $app . "\\" . $app . "Setup"; if (class_exists($app_installer_class)) { try { @@ -88,7 +88,7 @@ if (!empty($installer)) { render_page($user, $TAB, "setup_webapp"); } else { - $tulio = new \Tulio\System\TulioApp(); + $tulio = new \Tulio\System\TulioApp(); $appInstallers = glob(__DIR__ . "/../../src/app/WebApp/Installers/*/*.php"); $v_web_apps = []; diff --git a/web/api/index.php b/web/api/index.php index 8dce7d083..1efbcdfa1 100644 --- a/web/api/index.php +++ b/web/api/index.php @@ -13,8 +13,8 @@ } //die("Error: Disabled"); -define("HESTIA_DIR_BIN", "/usr/local/tulio/bin/"); -define("HESTIA_CMD", "/usr/bin/sudo /usr/local/tulio/bin/"); +define("TULIO_DIR_BIN", "/usr/local/tulio/bin/"); +define("TULIO_CMD", "/usr/bin/sudo /usr/local/tulio/bin/"); include $_SERVER["DOCUMENT_ROOT"] . "/inc/helpers.php"; @@ -57,7 +57,7 @@ function api_error($exit_code, $message, $hst_return, bool $add_log = false, $us */ function api_legacy(array $request_data) { $hst_return = ($request_data["returncode"] ?? "no") === "yes" ? "code" : "data"; - exec(HESTIA_CMD . "v-list-sys-config json", $output, $return_var); + exec(TULIO_CMD . "v-list-sys-config json", $output, $return_var); $settings = json_decode(implode("", $output), true); unset($output); @@ -77,7 +77,7 @@ function api_legacy(array $request_data) { //This exists, so native JSON can be used without the repeating the code twice, so future code changes are easier and don't need to be replicated twice // Authentication if (empty($request_data["hash"])) { - exec(HESTIA_CMD . "v-list-sys-config json", $output, $return_var); + exec(TULIO_CMD . "v-list-sys-config json", $output, $return_var); $data = json_decode(implode("", $output), true); $root_user = $data["config"]["ROOT_USER"]; @@ -91,7 +91,7 @@ function api_legacy(array $request_data) { $v_ip = quoteshellarg(get_real_user_ip()); $user = quoteshellarg($root_user); unset($output); - exec(HESTIA_CMD . "v-get-user-salt " . $user . " " . $v_ip . " json", $output, $return_var); + exec(TULIO_CMD . "v-get-user-salt " . $user . " " . $v_ip . " json", $output, $return_var); $pam = json_decode(implode("", $output), true); $salt = $pam[$root_user]["SALT"]; $method = $pam[$root_user]["METHOD"]; @@ -109,7 +109,7 @@ function api_legacy(array $request_data) { fwrite($fp, $password . "\n"); unset($output); exec( - HESTIA_CMD . + TULIO_CMD . "v-check-user-password " . quoteshellarg($root_user) . " " . @@ -136,7 +136,7 @@ function api_legacy(array $request_data) { // Check user hash exec( - HESTIA_CMD . "v-check-user-hash " . $user . " " . $v_hash . " " . $v_ip, + TULIO_CMD . "v-check-user-hash " . $user . " " . $v_hash . " " . $v_ip, $output, $return_var, ); @@ -153,7 +153,7 @@ function api_legacy(array $request_data) { $key = "/usr/local/tulio/data/keys/" . basename($request_data["hash"]); $v_ip = quoteshellarg(get_real_user_ip()); exec( - HESTIA_CMD . "v-check-api-key " . quoteshellarg($key) . " " . $v_ip, + TULIO_CMD . "v-check-api-key " . quoteshellarg($key) . " " . $v_ip, $output, $return_var, ); @@ -187,7 +187,7 @@ function api_legacy(array $request_data) { $return_var = 0; } else { // Prepare command - $cmdquery = HESTIA_CMD . escapeshellcmd($hst_cmd); + $cmdquery = TULIO_CMD . escapeshellcmd($hst_cmd); // Prepare arguments foreach ($hst_cmd_args as $cmd_arg) { @@ -221,7 +221,7 @@ function api_connection(array $request_data) { $hst_return = ($request_data["returncode"] ?? "no") === "yes" ? "code" : "data"; $v_real_user_ip = get_real_user_ip(); - exec(HESTIA_CMD . "v-list-sys-config json", $output, $return_var); + exec(TULIO_CMD . "v-list-sys-config json", $output, $return_var); $settings = json_decode(implode("", $output), true); unset($output, $return_var); $root_user = $settings["config"]["ROOT_USER"]; @@ -267,7 +267,7 @@ function api_connection(array $request_data) { // Authenticates the key and checks permission to run the script exec( - HESTIA_CMD . + TULIO_CMD . "v-check-access-key " . quoteshellarg($hst_access_key_id) . " " . @@ -312,7 +312,7 @@ function api_connection(array $request_data) { } // Prepare command - $cmdquery = HESTIA_CMD . escapeshellcmd($hst_cmd); + $cmdquery = TULIO_CMD . escapeshellcmd($hst_cmd); // Prepare arguments foreach ($hst_cmd_args as $cmd_arg) { diff --git a/web/bulk/access-key/index.php b/web/bulk/access-key/index.php index cc10886e8..dce45ce88 100644 --- a/web/bulk/access-key/index.php +++ b/web/bulk/access-key/index.php @@ -51,12 +51,12 @@ $v_key = quoteshellarg(trim($value)); // Key data - exec(HESTIA_CMD . "v-list-access-key " . $v_key . " json", $output, $return_var); + exec(TULIO_CMD . "v-list-access-key " . $v_key . " json", $output, $return_var); $key_data = json_decode(implode("", $output), true); unset($output); if (!empty($key_data) && $key_data["USER"] == $user_plain) { - exec(HESTIA_CMD . $cmd . " " . $v_key, $output, $return_var); + exec(TULIO_CMD . $cmd . " " . $v_key, $output, $return_var); unset($output); } } diff --git a/web/bulk/backup/incremental/index.php b/web/bulk/backup/incremental/index.php index 8e8182cca..f6abbc896 100644 --- a/web/bulk/backup/incremental/index.php +++ b/web/bulk/backup/incremental/index.php @@ -30,7 +30,7 @@ foreach ($backup as $value) { $value = quoteshellarg($value); - exec(HESTIA_CMD . $cmd . " " . $user . " " . $value, $output, $return_var); + exec(TULIO_CMD . $cmd . " " . $user . " " . $value, $output, $return_var); if ($return_var != 0) { $_SESSION["error_msg"] = implode("
", $output); if (empty($_SESSION["error_msg"])) { diff --git a/web/bulk/backup/index.php b/web/bulk/backup/index.php index 7262e2703..364a3bd1c 100644 --- a/web/bulk/backup/index.php +++ b/web/bulk/backup/index.php @@ -30,7 +30,7 @@ foreach ($backup as $value) { $value = quoteshellarg($value); - exec(HESTIA_CMD . $cmd . " " . $user . " " . $value, $output, $return_var); + exec(TULIO_CMD . $cmd . " " . $user . " " . $value, $output, $return_var); } header("Location: /list/backup/"); diff --git a/web/bulk/cron/index.php b/web/bulk/cron/index.php index ddba99ffe..5be155d6b 100644 --- a/web/bulk/cron/index.php +++ b/web/bulk/cron/index.php @@ -32,7 +32,7 @@ break; case "delete-cron-reports": $cmd = "v-delete-cron-reports"; - exec(HESTIA_CMD . $cmd . " " . $user, $output, $return_var); + exec(TULIO_CMD . $cmd . " " . $user, $output, $return_var); $_SESSION["error_msg"] = _("Cron job email reporting has been successfully disabled."); unset($output); header("Location: /list/cron/"); @@ -40,7 +40,7 @@ break; case "add-cron-reports": $cmd = "v-add-cron-reports"; - exec(HESTIA_CMD . $cmd . " " . $user, $output, $return_var); + exec(TULIO_CMD . $cmd . " " . $user, $output, $return_var); $_SESSION["error_msg"] = _("Cron job email reporting has been successfully enabled."); unset($output); header("Location: /list/cron/"); @@ -57,7 +57,7 @@ break; case "delete-cron-reports": $cmd = "v-delete-cron-reports"; - exec(HESTIA_CMD . $cmd . " " . $user, $output, $return_var); + exec(TULIO_CMD . $cmd . " " . $user, $output, $return_var); $_SESSION["error_msg"] = _("Cron job email reporting has been successfully disabled."); unset($output); header("Location: /list/cron/"); @@ -65,7 +65,7 @@ break; case "add-cron-reports": $cmd = "v-add-cron-reports"; - exec(HESTIA_CMD . $cmd . " " . $user, $output, $return_var); + exec(TULIO_CMD . $cmd . " " . $user, $output, $return_var); $_SESSION["error_msg"] = _("Cron job email reporting has been successfully enabled."); unset($output); header("Location: /list/cron/"); @@ -79,12 +79,12 @@ foreach ($job as $value) { $value = quoteshellarg($value); - exec(HESTIA_CMD . $cmd . " " . $user . " " . $value . " no", $output, $return_var); + exec(TULIO_CMD . $cmd . " " . $user . " " . $value . " no", $output, $return_var); $restart = "yes"; } if (!empty($restart)) { - exec(HESTIA_CMD . "v-restart-cron", $output, $return_var); + exec(TULIO_CMD . "v-restart-cron", $output, $return_var); } header("Location: /list/cron/"); diff --git a/web/bulk/db/index.php b/web/bulk/db/index.php index 0347e61b3..e8c8bcf17 100644 --- a/web/bulk/db/index.php +++ b/web/bulk/db/index.php @@ -57,7 +57,7 @@ foreach ($database as $value) { $value = quoteshellarg($value); - exec(HESTIA_CMD . $cmd . " " . $user . " " . $value, $output, $return_var); + exec(TULIO_CMD . $cmd . " " . $user . " " . $value, $output, $return_var); } header("Location: /list/db/"); diff --git a/web/bulk/dns/index.php b/web/bulk/dns/index.php index 4f2478e2b..61f5dbbbf 100644 --- a/web/bulk/dns/index.php +++ b/web/bulk/dns/index.php @@ -88,7 +88,7 @@ foreach ($domain as $value) { // DNS $value = quoteshellarg($value); - exec(HESTIA_CMD . $cmd . " " . $user . " " . $value . " no", $output, $return_var); + exec(TULIO_CMD . $cmd . " " . $user . " " . $value . " no", $output, $return_var); $restart = "yes"; } } else { @@ -100,7 +100,7 @@ $value = quoteshellarg($value); $dom = quoteshellarg($domain); exec( - HESTIA_CMD . $cmd . " " . $user . " " . $dom . " " . $value . " no", + TULIO_CMD . $cmd . " " . $user . " " . $dom . " " . $value . " no", $output, $return_var, ); @@ -109,7 +109,7 @@ } if (!empty($restart)) { - exec(HESTIA_CMD . "v-restart-dns", $output, $return_var); + exec(TULIO_CMD . "v-restart-dns", $output, $return_var); } if (empty($_POST["record"])) { diff --git a/web/bulk/firewall/banlist/index.php b/web/bulk/firewall/banlist/index.php index 6af334d0a..9598b9270 100644 --- a/web/bulk/firewall/banlist/index.php +++ b/web/bulk/firewall/banlist/index.php @@ -40,7 +40,7 @@ [$ip, $chain] = explode(":", $value); $v_ip = quoteshellarg($ip); $v_chain = quoteshellarg($chain); - exec(HESTIA_CMD . $cmd . " " . $v_ip . " " . $v_chain, $output, $return_var); + exec(TULIO_CMD . $cmd . " " . $v_ip . " " . $v_chain, $output, $return_var); } header("Location: /list/firewall/banlist"); diff --git a/web/bulk/firewall/index.php b/web/bulk/firewall/index.php index 5e27de89b..e11da1115 100644 --- a/web/bulk/firewall/index.php +++ b/web/bulk/firewall/index.php @@ -44,7 +44,7 @@ foreach ($rule as $value) { $value = quoteshellarg($value); - exec(HESTIA_CMD . $cmd . " " . $value, $output, $return_var); + exec(TULIO_CMD . $cmd . " " . $value, $output, $return_var); $restart = "yes"; } diff --git a/web/bulk/firewall/ipset/index.php b/web/bulk/firewall/ipset/index.php index 970e1573f..e6813ab53 100644 --- a/web/bulk/firewall/ipset/index.php +++ b/web/bulk/firewall/ipset/index.php @@ -37,7 +37,7 @@ foreach ($setname as $value) { $v_name = quoteshellarg($value); - exec(HESTIA_CMD . $cmd . " " . $v_name, $output, $return_var); + exec(TULIO_CMD . $cmd . " " . $v_name, $output, $return_var); } header("Location: /list/firewall/ipset/"); diff --git a/web/bulk/ip/index.php b/web/bulk/ip/index.php index dba79601c..e532f7bcf 100644 --- a/web/bulk/ip/index.php +++ b/web/bulk/ip/index.php @@ -23,7 +23,7 @@ if ($_SESSION["userContext"] === "admin") { switch ($action) { case "reread IP": - exec(HESTIA_CMD . "v-update-sys-ip", $output, $return_var); + exec(TULIO_CMD . "v-update-sys-ip", $output, $return_var); header("Location: /list/ip/"); exit(); break; @@ -41,7 +41,7 @@ foreach ($ip as $value) { $value = quoteshellarg($value); - exec(HESTIA_CMD . $cmd . " " . $value, $output, $return_var); + exec(TULIO_CMD . $cmd . " " . $value, $output, $return_var); } header("Location: /list/ip/"); diff --git a/web/bulk/mail/index.php b/web/bulk/mail/index.php index e556b3a4f..536dca14f 100644 --- a/web/bulk/mail/index.php +++ b/web/bulk/mail/index.php @@ -99,7 +99,7 @@ foreach ($domain as $value) { // Mail $value = quoteshellarg($value); - exec(HESTIA_CMD . $cmd . " " . $user . " " . $value, $output, $return_var); + exec(TULIO_CMD . $cmd . " " . $user . " " . $value, $output, $return_var); $restart = "yes"; } } else { @@ -111,7 +111,7 @@ // Mail Account $value = quoteshellarg($value); $dom = quoteshellarg($domain); - exec(HESTIA_CMD . $cmd . " " . $user . " " . $dom . " " . $value, $output, $return_var); + exec(TULIO_CMD . $cmd . " " . $user . " " . $dom . " " . $value, $output, $return_var); $restart = "yes"; } } diff --git a/web/bulk/package/index.php b/web/bulk/package/index.php index 337cd499a..2ad158c09 100644 --- a/web/bulk/package/index.php +++ b/web/bulk/package/index.php @@ -36,7 +36,7 @@ foreach ($package as $value) { $value = quoteshellarg($value); - exec(HESTIA_CMD . $cmd . " " . $value, $output, $return_var); + exec(TULIO_CMD . $cmd . " " . $value, $output, $return_var); $restart = "yes"; } diff --git a/web/bulk/restore/incremental/index.php b/web/bulk/restore/incremental/index.php index 564b3750c..72fbab024 100644 --- a/web/bulk/restore/incremental/index.php +++ b/web/bulk/restore/incremental/index.php @@ -40,7 +40,7 @@ if ($action == "restore") { if (!empty($web)) { exec( - HESTIA_CMD . + TULIO_CMD . "v-schedule-user-restore-restic " . $user . " " . @@ -55,7 +55,7 @@ } if (!empty($dns)) { exec( - HESTIA_CMD . + TULIO_CMD . "v-schedule-user-restore-restic " . $user . " " . @@ -70,7 +70,7 @@ } if (!empty($mail)) { exec( - HESTIA_CMD . + TULIO_CMD . "v-schedule-user-restore-restic " . $user . " " . @@ -84,7 +84,7 @@ ); if (!empty($dns)) { exec( - HESTIA_CMD . + TULIO_CMD . "v-schedule-user-restore-restic " . $user . " " . @@ -100,7 +100,7 @@ } if (!empty($cron)) { exec( - HESTIA_CMD . "v-schedule-user-restore-restic " . $user . " " . $snapshot . " " . "cron", + TULIO_CMD . "v-schedule-user-restore-restic " . $user . " " . $snapshot . " " . "cron", $output, $return_var, ); @@ -108,7 +108,7 @@ if (!empty($file)) { exec( - HESTIA_CMD . + TULIO_CMD . "v-schedule-user-restore-restic " . $user . " " . diff --git a/web/bulk/restore/index.php b/web/bulk/restore/index.php index a7c471bea..16d56a078 100644 --- a/web/bulk/restore/index.php +++ b/web/bulk/restore/index.php @@ -48,7 +48,7 @@ if ($action == "restore") { exec( - HESTIA_CMD . + TULIO_CMD . "v-schedule-user-restore " . $user . " " . diff --git a/web/bulk/service/index.php b/web/bulk/service/index.php index 21f096b1d..5700e2447 100644 --- a/web/bulk/service/index.php +++ b/web/bulk/service/index.php @@ -38,7 +38,7 @@ if (!empty($_POST["system"]) && $action == "restart") { $_SESSION["error_srv"] = _("The system is going down for reboot NOW!"); - exec(HESTIA_CMD . "v-restart-system yes", $output, $return_var); + exec(TULIO_CMD . "v-restart-system yes", $output, $return_var); unset($output); header("Location: /list/server/"); exit(); @@ -46,7 +46,7 @@ foreach ($service as $value) { $value = quoteshellarg($value); - exec(HESTIA_CMD . $cmd . " " . $value, $output, $return_var); + exec(TULIO_CMD . $cmd . " " . $value, $output, $return_var); } } diff --git a/web/bulk/user/index.php b/web/bulk/user/index.php index 4441923f0..afbb3d8d5 100644 --- a/web/bulk/user/index.php +++ b/web/bulk/user/index.php @@ -76,7 +76,7 @@ foreach ($user as $value) { $value = quoteshellarg($value); - exec(HESTIA_CMD . $cmd . " " . $value . " " . $restart, $output, $return_var); + exec(TULIO_CMD . $cmd . " " . $value . " " . $restart, $output, $return_var); $changes = "yes"; } diff --git a/web/bulk/web/index.php b/web/bulk/web/index.php index fc6c5d125..3be8371ad 100644 --- a/web/bulk/web/index.php +++ b/web/bulk/web/index.php @@ -63,15 +63,15 @@ foreach ($domain as $value) { $value = quoteshellarg($value); - exec(HESTIA_CMD . $cmd . " " . $user . " " . $value . " no", $output, $return_var); + exec(TULIO_CMD . $cmd . " " . $user . " " . $value . " no", $output, $return_var); $restart = "yes"; } if (isset($restart)) { - exec(HESTIA_CMD . "v-restart-web", $output, $return_var); - exec(HESTIA_CMD . "v-restart-proxy", $output, $return_var); - exec(HESTIA_CMD . "v-restart-dns", $output, $return_var); - exec(HESTIA_CMD . "v-restart-web-backend", $output, $return_var); + exec(TULIO_CMD . "v-restart-web", $output, $return_var); + exec(TULIO_CMD . "v-restart-proxy", $output, $return_var); + exec(TULIO_CMD . "v-restart-dns", $output, $return_var); + exec(TULIO_CMD . "v-restart-web-backend", $output, $return_var); } header("Location: /list/web/"); diff --git a/web/copy/package/index.php b/web/copy/package/index.php index 032e0c90a..547736812 100644 --- a/web/copy/package/index.php +++ b/web/copy/package/index.php @@ -23,7 +23,7 @@ if (!empty($_GET["package"])) { $v_package = quoteshellarg($_GET["package"]); exec( - HESTIA_CMD . "v-copy-user-package " . $v_package . " " . $v_package . "-copy", + TULIO_CMD . "v-copy-user-package " . $v_package . " " . $v_package . "-copy", $output, $return_var, ); diff --git a/web/delete/access-key/index.php b/web/delete/access-key/index.php index 811155a79..dd6147eca 100644 --- a/web/delete/access-key/index.php +++ b/web/delete/access-key/index.php @@ -30,7 +30,7 @@ $v_key = quoteshellarg(trim($_GET["key"])); // Key data - exec(HESTIA_CMD . "v-list-access-key " . $v_key . " json", $output, $return_var); + exec(TULIO_CMD . "v-list-access-key " . $v_key . " json", $output, $return_var); $key_data = json_decode(implode("", $output), true); unset($output); @@ -39,7 +39,7 @@ exit(); } - exec(HESTIA_CMD . "v-delete-access-key " . $v_key, $output, $return_var); + exec(TULIO_CMD . "v-delete-access-key " . $v_key, $output, $return_var); check_return_code($return_var, $output); unset($output); } diff --git a/web/delete/backup/exclusion/index.php b/web/delete/backup/exclusion/index.php index 27859478c..c5d44eb25 100644 --- a/web/delete/backup/exclusion/index.php +++ b/web/delete/backup/exclusion/index.php @@ -14,7 +14,7 @@ if (!empty($_GET["system"])) { $v_system = quoteshellarg($_GET["system"]); exec( - HESTIA_CMD . "v-delete-user-backup-exclusions " . $user . " " . $v_system, + TULIO_CMD . "v-delete-user-backup-exclusions " . $user . " " . $v_system, $output, $return_var, ); diff --git a/web/delete/backup/index.php b/web/delete/backup/index.php index 3326af6df..c59838f6d 100644 --- a/web/delete/backup/index.php +++ b/web/delete/backup/index.php @@ -13,7 +13,7 @@ if (!empty($_GET["backup"])) { $v_backup = quoteshellarg($_GET["backup"]); - exec(HESTIA_CMD . "v-delete-user-backup " . $user . " " . $v_backup, $output, $return_var); + exec(TULIO_CMD . "v-delete-user-backup " . $user . " " . $v_backup, $output, $return_var); } check_return_code($return_var, $output); unset($output); diff --git a/web/delete/cron/autoupdate/index.php b/web/delete/cron/autoupdate/index.php index 884f829ab..a3cda963e 100644 --- a/web/delete/cron/autoupdate/index.php +++ b/web/delete/cron/autoupdate/index.php @@ -10,7 +10,7 @@ ($_SESSION["userContext"] === "admin" && $_SESSION["POLICY_SYSTEM_HIDE_SERVICES"] == "no") || $_SESSION["user"] == $_SESSION["ROOT_USER"] ) { - exec(HESTIA_CMD . "v-delete-cron-tulio-autoupdate", $output, $return_var); + exec(TULIO_CMD . "v-delete-cron-tulio-autoupdate", $output, $return_var); unset($output); } diff --git a/web/delete/cron/index.php b/web/delete/cron/index.php index 9db65e86e..48bb733a6 100644 --- a/web/delete/cron/index.php +++ b/web/delete/cron/index.php @@ -14,7 +14,7 @@ if (!empty($_GET["job"])) { $v_username = quoteshellarg($user); $v_job = quoteshellarg($_GET["job"]); - exec(HESTIA_CMD . "v-delete-cron-job " . $user . " " . $v_job, $output, $return_var); + exec(TULIO_CMD . "v-delete-cron-job " . $user . " " . $v_job, $output, $return_var); } check_return_code($return_var, $output); unset($output); diff --git a/web/delete/cron/reports/index.php b/web/delete/cron/reports/index.php index d98c28ab9..c17a42ab8 100644 --- a/web/delete/cron/reports/index.php +++ b/web/delete/cron/reports/index.php @@ -6,7 +6,7 @@ // Check token verify_csrf($_GET); -exec(HESTIA_CMD . "v-delete-cron-reports " . $user, $output, $return_var); +exec(TULIO_CMD . "v-delete-cron-reports " . $user, $output, $return_var); unset($output); header("Location: /list/cron/"); diff --git a/web/delete/db/index.php b/web/delete/db/index.php index bb70b6448..a31b157ad 100644 --- a/web/delete/db/index.php +++ b/web/delete/db/index.php @@ -13,7 +13,7 @@ if (!empty($_GET["database"])) { $v_database = quoteshellarg($_GET["database"]); - exec(HESTIA_CMD . "v-delete-database " . $user . " " . $v_database, $output, $return_var); + exec(TULIO_CMD . "v-delete-database " . $user . " " . $v_database, $output, $return_var); } check_return_code($return_var, $output); unset($output); diff --git a/web/delete/dns/index.php b/web/delete/dns/index.php index 351155382..c141027f4 100644 --- a/web/delete/dns/index.php +++ b/web/delete/dns/index.php @@ -15,7 +15,7 @@ // DNS domain if (!empty($_GET["domain"]) && empty($_GET["record_id"])) { $v_domain = quoteshellarg($_GET["domain"]); - exec(HESTIA_CMD . "v-delete-dns-domain " . $user . " " . $v_domain, $output, $return_var); + exec(TULIO_CMD . "v-delete-dns-domain " . $user . " " . $v_domain, $output, $return_var); check_return_code($return_var, $output); unset($output); @@ -33,7 +33,7 @@ $v_domain = quoteshellarg($_GET["domain"]); $v_record_id = quoteshellarg($_GET["record_id"]); exec( - HESTIA_CMD . "v-delete-dns-record " . $user . " " . $v_domain . " " . $v_record_id, + TULIO_CMD . "v-delete-dns-record " . $user . " " . $v_domain . " " . $v_record_id, $output, $return_var, ); diff --git a/web/delete/firewall/banlist/index.php b/web/delete/firewall/banlist/index.php index 425410e26..cf056084d 100644 --- a/web/delete/firewall/banlist/index.php +++ b/web/delete/firewall/banlist/index.php @@ -17,7 +17,7 @@ if (!empty($_GET["ip"]) && !empty($_GET["chain"])) { $v_ip = quoteshellarg($_GET["ip"]); $v_chain = quoteshellarg($_GET["chain"]); - exec(HESTIA_CMD . "v-delete-firewall-ban " . $v_ip . " " . $v_chain, $output, $return_var); + exec(TULIO_CMD . "v-delete-firewall-ban " . $v_ip . " " . $v_chain, $output, $return_var); } check_return_code($return_var, $output); unset($output); diff --git a/web/delete/firewall/index.php b/web/delete/firewall/index.php index dbf5e30f3..022fec6ca 100644 --- a/web/delete/firewall/index.php +++ b/web/delete/firewall/index.php @@ -16,7 +16,7 @@ if (!empty($_GET["rule"])) { $v_rule = quoteshellarg($_GET["rule"]); - exec(HESTIA_CMD . "v-delete-firewall-rule " . $v_rule, $output, $return_var); + exec(TULIO_CMD . "v-delete-firewall-rule " . $v_rule, $output, $return_var); } check_return_code($return_var, $output); unset($output); diff --git a/web/delete/firewall/ipset/index.php b/web/delete/firewall/ipset/index.php index 449a9da32..ccb06f348 100644 --- a/web/delete/firewall/ipset/index.php +++ b/web/delete/firewall/ipset/index.php @@ -16,11 +16,7 @@ if (!empty($_GET["listname"])) { $v_listname = $_GET["listname"]; - exec( - HESTIA_CMD . "v-delete-firewall-ipset " . quoteshellarg($v_listname), - $output, - $return_var, - ); + exec(TULIO_CMD . "v-delete-firewall-ipset " . quoteshellarg($v_listname), $output, $return_var); } check_return_code($return_var, $output); unset($output); diff --git a/web/delete/ip/index.php b/web/delete/ip/index.php index 97860d40e..29decbe83 100644 --- a/web/delete/ip/index.php +++ b/web/delete/ip/index.php @@ -10,7 +10,7 @@ if ($_SESSION["userContext"] === "admin") { if (!empty($_GET["ip"])) { $v_ip = quoteshellarg($_GET["ip"]); - exec(HESTIA_CMD . "v-delete-sys-ip " . $v_ip, $output, $return_var); + exec(TULIO_CMD . "v-delete-sys-ip " . $v_ip, $output, $return_var); } check_return_code($return_var, $output); unset($output); diff --git a/web/delete/key/index.php b/web/delete/key/index.php index 16cf418d2..5a46ac7d5 100644 --- a/web/delete/key/index.php +++ b/web/delete/key/index.php @@ -13,7 +13,7 @@ if (!empty($_GET["key"])) { $v_key = quoteshellarg(trim($_GET["key"])); - exec(HESTIA_CMD . "v-delete-user-ssh-key " . $user . " " . $v_key, $output, $return_var); + exec(TULIO_CMD . "v-delete-user-ssh-key " . $user . " " . $v_key, $output, $return_var); check_return_code($return_var, $output); } diff --git a/web/delete/log/auth/index.php b/web/delete/log/auth/index.php index 94de231a7..9f5726f5c 100644 --- a/web/delete/log/auth/index.php +++ b/web/delete/log/auth/index.php @@ -13,7 +13,7 @@ } // Clear log -exec(HESTIA_CMD . "v-delete-user-auth-log " . $user, $output, $return_var); +exec(TULIO_CMD . "v-delete-user-auth-log " . $user, $output, $return_var); check_return_code($return_var, $output); unset($output); @@ -32,7 +32,7 @@ // Add current user session back to log unless impersonating another user if (!isset($_SESSION["look"])) { exec( - HESTIA_CMD . + TULIO_CMD . "v-log-user-login " . $user . " " . diff --git a/web/delete/log/index.php b/web/delete/log/index.php index bae9863e7..db7edffbc 100644 --- a/web/delete/log/index.php +++ b/web/delete/log/index.php @@ -13,7 +13,7 @@ } // Clear log -exec(HESTIA_CMD . "v-delete-user-log " . $user, $output, $return_var); +exec(TULIO_CMD . "v-delete-user-log " . $user, $output, $return_var); check_return_code($return_var, $output); unset($output); diff --git a/web/delete/mail/index.php b/web/delete/mail/index.php index f342b6eb0..51005ca4a 100644 --- a/web/delete/mail/index.php +++ b/web/delete/mail/index.php @@ -16,7 +16,7 @@ if (!empty($_GET["domain"]) && empty($_GET["account"])) { $v_username = quoteshellarg($user); $v_domain = quoteshellarg($_GET["domain"]); - exec(HESTIA_CMD . "v-delete-mail-domain " . $user . " " . $v_domain, $output, $return_var); + exec(TULIO_CMD . "v-delete-mail-domain " . $user . " " . $v_domain, $output, $return_var); check_return_code($return_var, $output); unset($output); $back = $_SESSION["back"]; @@ -36,7 +36,7 @@ $v_domain = quoteshellarg($_GET["domain"]); $v_account = quoteshellarg($_GET["account"]); exec( - HESTIA_CMD . "v-delete-mail-account " . $user . " " . $v_domain . " " . $v_account, + TULIO_CMD . "v-delete-mail-account " . $user . " " . $v_domain . " " . $v_account, $output, $return_var, ); diff --git a/web/delete/notification/index.php b/web/delete/notification/index.php index f2e76fc18..ecb80cef5 100644 --- a/web/delete/notification/index.php +++ b/web/delete/notification/index.php @@ -8,28 +8,20 @@ if ($_GET["delete"] == 1) { if (empty($_GET["notification_id"])) { - exec(HESTIA_CMD . "v-delete-user-notification " . $user . " all", $output, $return_var); + exec(TULIO_CMD . "v-delete-user-notification " . $user . " all", $output, $return_var); } else { $v_id = quoteshellarg((int) $_GET["notification_id"]); - exec( - HESTIA_CMD . "v-delete-user-notification " . $user . " " . $v_id, - $output, - $return_var, - ); + exec(TULIO_CMD . "v-delete-user-notification " . $user . " " . $v_id, $output, $return_var); } check_return_code($return_var, $output); unset($output); } else { if (empty($_GET["notification_id"])) { - exec( - HESTIA_CMD . "v-acknowledge-user-notification " . $user . " all", - $output, - $return_var, - ); + exec(TULIO_CMD . "v-acknowledge-user-notification " . $user . " all", $output, $return_var); } else { $v_id = quoteshellarg((int) $_GET["notification_id"]); exec( - HESTIA_CMD . "v-acknowledge-user-notification " . $user . " " . $v_id, + TULIO_CMD . "v-acknowledge-user-notification " . $user . " " . $v_id, $output, $return_var, ); diff --git a/web/delete/package/index.php b/web/delete/package/index.php index e954216f0..f0f40491d 100644 --- a/web/delete/package/index.php +++ b/web/delete/package/index.php @@ -16,7 +16,7 @@ if ($_SESSION["userContext"] === "admin") { if (!empty($_GET["package"])) { $v_package = quoteshellarg($_GET["package"]); - exec(HESTIA_CMD . "v-delete-user-package " . $v_package, $output, $return_var); + exec(TULIO_CMD . "v-delete-user-package " . $v_package, $output, $return_var); } check_return_code($return_var, $output); unset($output); diff --git a/web/delete/user/index.php b/web/delete/user/index.php index e133e104d..24f83c596 100644 --- a/web/delete/user/index.php +++ b/web/delete/user/index.php @@ -10,7 +10,7 @@ if ($_SESSION["userContext"] === "admin") { if (!empty($_GET["user"])) { $v_username = quoteshellarg($_GET["user"]); - exec(HESTIA_CMD . "v-delete-user " . $v_username, $output, $return_var); + exec(TULIO_CMD . "v-delete-user " . $v_username, $output, $return_var); } check_return_code($return_var, $output); unset($_SESSION["look"]); diff --git a/web/delete/web/cache/index.php b/web/delete/web/cache/index.php index a871ad925..11d156d39 100644 --- a/web/delete/web/cache/index.php +++ b/web/delete/web/cache/index.php @@ -14,7 +14,7 @@ if (!empty($_GET["domain"])) { $v_domain = quoteshellarg($_GET["domain"]); - exec(HESTIA_CMD . "v-purge-nginx-cache " . $user . " " . $v_domain, $output, $return_var); + exec(TULIO_CMD . "v-purge-nginx-cache " . $user . " " . $v_domain, $output, $return_var); check_return_code($return_var, $output); } $_SESSION["ok_msg"] = _("NGINX cache has been purged successfully."); diff --git a/web/delete/web/index.php b/web/delete/web/index.php index 288a2c710..430bc72a0 100644 --- a/web/delete/web/index.php +++ b/web/delete/web/index.php @@ -15,7 +15,7 @@ if (!empty($_GET["domain"])) { $v_domain = quoteshellarg($_GET["domain"]); exec( - HESTIA_CMD . "v-delete-web-domain " . $user . " " . $v_domain . " 'yes'", + TULIO_CMD . "v-delete-web-domain " . $user . " " . $v_domain . " 'yes'", $output, $return_var, ); diff --git a/web/download/backup/index.php b/web/download/backup/index.php index b6a295fc1..664da8c9e 100644 --- a/web/download/backup/index.php +++ b/web/download/backup/index.php @@ -12,7 +12,7 @@ if (!file_exists("/backup/" . $backup)) { $backup = quoteshellarg($_GET["backup"]); exec( - HESTIA_CMD . "v-schedule-user-backup-download " . $user . " " . $backup, + TULIO_CMD . "v-schedule-user-backup-download " . $user . " " . $backup, $output, $return_var, ); diff --git a/web/download/database/index.php b/web/download/database/index.php index 7cc997768..6a58af34b 100644 --- a/web/download/database/index.php +++ b/web/download/database/index.php @@ -9,11 +9,7 @@ $database = quoteshellarg($_GET["database"]); -exec( - HESTIA_CMD . "v-dump-database " . $user . " " . $database . " file gzip", - $output, - $return_var, -); +exec(TULIO_CMD . "v-dump-database " . $user . " " . $database . " file gzip", $output, $return_var); if ($return_var == 0) { header("Content-type: application/sql"); diff --git a/web/download/site/index.php b/web/download/site/index.php index 7b7db6f54..566a762ce 100644 --- a/web/download/site/index.php +++ b/web/download/site/index.php @@ -9,7 +9,7 @@ $site = quoteshellarg($_GET["site"]); -exec(HESTIA_CMD . "v-dump-site " . $user . " " . $site . " full", $output, $return_var); +exec(TULIO_CMD . "v-dump-site " . $user . " " . $site . " full", $output, $return_var); if ($return_var == 0) { header("Content-type: application/zip"); diff --git a/web/download/web-log/index.php b/web/download/web-log/index.php index 40c5fc919..90f24eac5 100644 --- a/web/download/web-log/index.php +++ b/web/download/web-log/index.php @@ -27,7 +27,7 @@ $type = "error"; } $cmd = implode(" ", [ - "/usr/bin/sudo " . quoteshellarg(HESTIA_DIR_BIN . "v-list-web-domain-" . $type . "log"), + "/usr/bin/sudo " . quoteshellarg(TULIO_DIR_BIN . "v-list-web-domain-" . $type . "log"), // $user is already shell-escaped $user, quoteshellarg($v_domain), diff --git a/web/edit/backup/exclusions/index.php b/web/edit/backup/exclusions/index.php index 6f44ab96f..3e8d58782 100644 --- a/web/edit/backup/exclusions/index.php +++ b/web/edit/backup/exclusions/index.php @@ -12,7 +12,7 @@ } // List backup exclustions -exec(HESTIA_CMD . "v-list-user-backup-exclusions " . $user . " 'json'", $output, $return_var); +exec(TULIO_CMD . "v-list-user-backup-exclusions " . $user . " 'json'", $output, $return_var); check_return_code($return_var, $output); $data = json_decode(implode("", $output), true); unset($output); @@ -111,11 +111,7 @@ unset($mktemp_output); // Save changes - exec( - HESTIA_CMD . "v-update-user-backup-exclusions " . $user . " " . $tmp, - $output, - $return_var, - ); + exec(TULIO_CMD . "v-update-user-backup-exclusions " . $user . " " . $tmp, $output, $return_var); check_return_code($return_var, $output); unset($output); diff --git a/web/edit/cron/index.php b/web/edit/cron/index.php index 208283ef1..c1833c9b9 100644 --- a/web/edit/cron/index.php +++ b/web/edit/cron/index.php @@ -19,7 +19,7 @@ // List cron job $v_job = quoteshellarg($_GET["job"]); -exec(HESTIA_CMD . "v-list-cron-job " . $user . " " . $v_job . " 'json'", $output, $return_var); +exec(TULIO_CMD . "v-list-cron-job " . $user . " " . $v_job . " 'json'", $output, $return_var); check_return_code_redirect($return_var, $output, "/list/cron/"); $data = json_decode(implode("", $output), true); @@ -59,7 +59,7 @@ // Save changes exec( - HESTIA_CMD . + TULIO_CMD . "v-change-cron-job " . $user . " " . @@ -91,7 +91,7 @@ } // Get current system time -exec(HESTIA_CMD . "v-get-sys-timezone", $output, $return_var); +exec(TULIO_CMD . "v-get-sys-timezone", $output, $return_var); date_default_timezone_set($output[0]); $current_timestamp = time(); diff --git a/web/edit/db/index.php b/web/edit/db/index.php index 82c3e5cac..5fe826774 100644 --- a/web/edit/db/index.php +++ b/web/edit/db/index.php @@ -22,7 +22,7 @@ // List datbase $v_database = $_GET["database"]; exec( - HESTIA_CMD . "v-list-database " . $user . " " . quoteshellarg($v_database) . " 'json'", + TULIO_CMD . "v-list-database " . $user . " " . quoteshellarg($v_database) . " 'json'", $output, $return_var, ); @@ -56,7 +56,7 @@ // Change database user if ($v_dbuser != $_POST["v_dbuser"] && empty($_SESSION["error_msg"])) { $cmd = implode(" ", [ - HESTIA_CMD . "v-change-database-user", + TULIO_CMD . "v-change-database-user", // $user is already shell-quoted $user, quoteshellarg($v_database), @@ -78,7 +78,7 @@ fwrite($fp, $_POST["v_password"] . "\n"); fclose($fp); exec( - HESTIA_CMD . + TULIO_CMD . "v-change-database-password " . $user . " " . diff --git a/web/edit/dns/index.php b/web/edit/dns/index.php index 0170da262..8976302ff 100644 --- a/web/edit/dns/index.php +++ b/web/edit/dns/index.php @@ -20,7 +20,7 @@ } // List ip addresses -exec(HESTIA_CMD . "v-list-user-ips " . $user . " json", $output, $return_var); +exec(TULIO_CMD . "v-list-user-ips " . $user . " json", $output, $return_var); $v_ips = json_decode(implode("", $output), true); unset($output); @@ -28,7 +28,7 @@ if (!empty($_GET["domain"]) && empty($_GET["record_id"])) { $v_domain = quoteshellarg($_GET["domain"]); exec( - HESTIA_CMD . "v-list-dns-domain " . $user . " " . $v_domain . " json", + TULIO_CMD . "v-list-dns-domain " . $user . " " . $v_domain . " json", $output, $return_var, ); @@ -55,7 +55,7 @@ } // List dns templates - exec(HESTIA_CMD . "v-list-dns-templates json", $output, $return_var); + exec(TULIO_CMD . "v-list-dns-templates json", $output, $return_var); $templates = json_decode(implode("", $output), true); unset($output); } @@ -65,7 +65,7 @@ $v_domain = quoteshellarg($_GET["domain"]); $v_record_id = quoteshellarg($_GET["record_id"]); exec( - HESTIA_CMD . "v-list-dns-records " . $user . " " . $v_domain . " 'json'", + TULIO_CMD . "v-list-dns-records " . $user . " " . $v_domain . " 'json'", $output, $return_var, ); @@ -102,14 +102,7 @@ if ($v_ip != $_POST["v_ip"] && empty($_SESSION["error_msg"])) { $v_ip = quoteshellarg($_POST["v_ip"]); exec( - HESTIA_CMD . - "v-change-dns-domain-ip " . - $user . - " " . - $v_domain . - " " . - $v_ip . - " 'no'", + TULIO_CMD . "v-change-dns-domain-ip " . $user . " " . $v_domain . " " . $v_ip . " 'no'", $output, $return_var, ); @@ -122,7 +115,7 @@ if ($v_template != $_POST["v_template"] && empty($_SESSION["error_msg"])) { $v_template = quoteshellarg($_POST["v_template"]); exec( - HESTIA_CMD . + TULIO_CMD . "v-change-dns-domain-tpl " . $user . " " . @@ -142,7 +135,7 @@ if ($v_soa != $_POST["v_soa"] && empty($_SESSION["error_msg"])) { $v_soa = quoteshellarg($_POST["v_soa"]); exec( - HESTIA_CMD . + TULIO_CMD . "v-change-dns-domain-soa " . $user . " " . @@ -162,7 +155,7 @@ if ($v_exp != $_POST["v_exp"] && empty($_SESSION["error_msg"])) { $v_exp = quoteshellarg($_POST["v_exp"]); exec( - HESTIA_CMD . + TULIO_CMD . "v-change-dns-domain-exp " . $user . " " . @@ -181,7 +174,7 @@ if ($v_ttl != $_POST["v_ttl"] && empty($_SESSION["error_msg"])) { $v_ttl = quoteshellarg($_POST["v_ttl"]); exec( - HESTIA_CMD . + TULIO_CMD . "v-change-dns-domain-ttl " . $user . " " . @@ -199,7 +192,7 @@ // Change domain dnssec if ($_POST["v_dnssec"] == "" && $v_dnssec == "yes" && empty($_SESSION["error_msg"])) { exec( - HESTIA_CMD . "v-change-dns-domain-dnssec " . $user . " " . $v_domain . " 'no'", + TULIO_CMD . "v-change-dns-domain-dnssec " . $user . " " . $v_domain . " 'no'", $output, $return_var, ); @@ -212,7 +205,7 @@ // Change domain dnssec if ($_POST["v_dnssec"] == "yes" && $v_dnssec !== "yes" && empty($_SESSION["error_msg"])) { exec( - HESTIA_CMD . "v-change-dns-domain-dnssec " . $user . " " . $v_domain . " 'yes'", + TULIO_CMD . "v-change-dns-domain-dnssec " . $user . " " . $v_domain . " 'yes'", $output, $return_var, ); @@ -224,7 +217,7 @@ // Restart dns server if (!empty($restart_dns) && empty($_SESSION["error_msg"])) { - exec(HESTIA_CMD . "v-restart-dns", $output, $return_var); + exec(TULIO_CMD . "v-restart-dns", $output, $return_var); check_return_code($return_var, $output); unset($output); } @@ -235,7 +228,7 @@ } // Restart dns server if (empty($_SESSION["error_msg"])) { - exec(HESTIA_CMD . "v-restart-dns", $output, $return_var); + exec(TULIO_CMD . "v-restart-dns", $output, $return_var); check_return_code($return_var, $output); unset($output); } @@ -264,7 +257,7 @@ $v_priority = quoteshellarg($_POST["v_priority"]); $v_ttl = quoteshellarg($_POST["v_ttl"]); exec( - HESTIA_CMD . + TULIO_CMD . "v-change-dns-record " . $user . " " . @@ -296,7 +289,7 @@ if ($_GET["record_id"] != $_POST["v_record_id"] && empty($_SESSION["error_msg"])) { $v_old_record_id = quoteshellarg($_GET["record_id"]); exec( - HESTIA_CMD . + TULIO_CMD . "v-change-dns-record-id " . $user . " " . @@ -315,7 +308,7 @@ // Restart dns server if (!empty($restart_dns) && empty($_SESSION["error_msg"])) { - exec(HESTIA_CMD . "v-restart-dns", $output, $return_var); + exec(TULIO_CMD . "v-restart-dns", $output, $return_var); check_return_code($return_var, $output); unset($output); } diff --git a/web/edit/firewall/index.php b/web/edit/firewall/index.php index 55b71c7d2..7c91734f9 100644 --- a/web/edit/firewall/index.php +++ b/web/edit/firewall/index.php @@ -21,7 +21,7 @@ // List rule $v_rule = quoteshellarg($_GET["rule"]); -exec(HESTIA_CMD . "v-list-firewall-rule " . $v_rule . " 'json'", $output, $return_var); +exec(TULIO_CMD . "v-list-firewall-rule " . $v_rule . " 'json'", $output, $return_var); check_return_code_redirect($return_var, $output, "/list/firewall"); $data = json_decode(implode("", $output), true); unset($output); @@ -43,7 +43,7 @@ } // Get ipset lists -exec(HESTIA_CMD . "v-list-firewall-ipset 'json'", $output, $return_var); +exec(TULIO_CMD . "v-list-firewall-ipset 'json'", $output, $return_var); check_return_code($return_var, $output); $data = json_decode(implode("", $output), true); unset($output); @@ -101,7 +101,7 @@ // Change Status exec( - HESTIA_CMD . + TULIO_CMD . "v-change-firewall-rule " . $v_rule . " " . diff --git a/web/edit/ip/index.php b/web/edit/ip/index.php index 2df326b0d..4b9a531d9 100644 --- a/web/edit/ip/index.php +++ b/web/edit/ip/index.php @@ -21,7 +21,7 @@ // List ip $v_ip = quoteshellarg($_GET["ip"]); -exec(HESTIA_CMD . "v-list-sys-ip " . $v_ip . " 'json'", $output, $return_var); +exec(TULIO_CMD . "v-list-sys-ip " . $v_ip . " 'json'", $output, $return_var); check_return_code_redirect($return_var, $output, "/list/ip"); $data = json_decode(implode("", $output), true); unset($output); @@ -42,7 +42,7 @@ $v_time = $data[$v_ip]["TIME"]; // List users -exec(HESTIA_CMD . "v-list-sys-users 'json'", $output, $return_var); +exec(TULIO_CMD . "v-list-sys-users 'json'", $output, $return_var); $users = json_decode(implode("", $output), true); unset($output); @@ -55,13 +55,13 @@ // Change Status if ($v_ipstatus == "shared" && empty($_POST["v_shared"]) && empty($_SESSION["error_msg"])) { - exec(HESTIA_CMD . "v-change-sys-ip-status " . $v_ip . " 'dedicated'", $output, $return_var); + exec(TULIO_CMD . "v-change-sys-ip-status " . $v_ip . " 'dedicated'", $output, $return_var); check_return_code($return_var, $output); unset($output); $v_dedicated = "yes"; } if ($v_ipstatus == "dedicated" && !empty($_POST["v_shared"]) && empty($_SESSION["error_msg"])) { - exec(HESTIA_CMD . "v-change-sys-ip-status " . $v_ip . " 'shared'", $output, $return_var); + exec(TULIO_CMD . "v-change-sys-ip-status " . $v_ip . " 'shared'", $output, $return_var); check_return_code($return_var, $output); unset($output); unset($v_dedicated); @@ -70,7 +70,7 @@ // Change owner if ($v_owner != $_POST["v_owner"] && empty($_SESSION["error_msg"])) { $v_owner = quoteshellarg($_POST["v_owner"]); - exec(HESTIA_CMD . "v-change-sys-ip-owner " . $v_ip . " " . $v_owner, $output, $return_var); + exec(TULIO_CMD . "v-change-sys-ip-owner " . $v_ip . " " . $v_owner, $output, $return_var); check_return_code($return_var, $output); $v_owner = $_POST["v_owner"]; unset($output); @@ -79,7 +79,7 @@ // Change associated domain if ($v_name != $_POST["v_name"] && empty($_SESSION["error_msg"])) { $v_name = quoteshellarg($_POST["v_name"]); - exec(HESTIA_CMD . "v-change-sys-ip-name " . $v_ip . " " . $v_name, $output, $return_var); + exec(TULIO_CMD . "v-change-sys-ip-name " . $v_ip . " " . $v_name, $output, $return_var); check_return_code($return_var, $output); unset($output); } @@ -87,7 +87,7 @@ // Change NAT address if ($v_nat != $_POST["v_nat"] && empty($_SESSION["error_msg"])) { $v_nat = quoteshellarg($_POST["v_nat"]); - exec(HESTIA_CMD . "v-change-sys-ip-nat " . $v_ip . " " . $v_nat, $output, $return_var); + exec(TULIO_CMD . "v-change-sys-ip-nat " . $v_ip . " " . $v_nat, $output, $return_var); check_return_code($return_var, $output); unset($output); } diff --git a/web/edit/mail/index.php b/web/edit/mail/index.php index 794af5510..f27a12d23 100644 --- a/web/edit/mail/index.php +++ b/web/edit/mail/index.php @@ -25,12 +25,12 @@ if (!empty($_GET["domain"]) && empty($_GET["account"])) { $v_domain = $_GET["domain"]; - exec(HESTIA_CMD . "v-list-sys-webmail json", $output, $return_var); + exec(TULIO_CMD . "v-list-sys-webmail json", $output, $return_var); $webmail_clients = json_decode(implode("", $output), true); unset($output); exec( - HESTIA_CMD . "v-list-mail-domain " . $user . " " . quoteshellarg($v_domain) . " json", + TULIO_CMD . "v-list-mail-domain " . $user . " " . quoteshellarg($v_domain) . " json", $output, $return_var, ); @@ -64,7 +64,7 @@ $v_ssl = $data[$v_domain]["SSL"]; if (!empty($v_ssl)) { exec( - HESTIA_CMD . + TULIO_CMD . "v-list-mail-domain-ssl " . $user . " " . @@ -98,7 +98,7 @@ $v_account = $_GET["account"]; exec( - HESTIA_CMD . + TULIO_CMD . "v-list-mail-account " . $user . " " . @@ -146,7 +146,7 @@ // Parse autoreply if ($v_autoreply == "yes") { exec( - HESTIA_CMD . + TULIO_CMD . "v-list-mail-account-autoreply " . $user . " " . @@ -172,7 +172,7 @@ verify_csrf($_POST); exec( - HESTIA_CMD . "v-list-mail-domain " . $user . " " . quoteshellarg($v_domain) . " json", + TULIO_CMD . "v-list-mail-domain " . $user . " " . quoteshellarg($v_domain) . " json", $output, $return_var, ); @@ -183,7 +183,7 @@ // Delete antispam if ($v_antispam == "yes" && empty($_POST["v_antispam"]) && empty($_SESSION["error_msg"])) { exec( - HESTIA_CMD . + TULIO_CMD . "v-delete-mail-domain-antispam " . $v_username . " " . @@ -199,7 +199,7 @@ // Add antispam if ($v_antispam == "no" && !empty($_POST["v_antispam"]) && empty($_SESSION["error_msg"])) { exec( - HESTIA_CMD . + TULIO_CMD . "v-add-mail-domain-antispam " . $v_username . " " . @@ -215,7 +215,7 @@ // Delete antivirus if ($v_antivirus == "yes" && empty($_POST["v_antivirus"]) && empty($_SESSION["error_msg"])) { exec( - HESTIA_CMD . + TULIO_CMD . "v-delete-mail-domain-antivirus " . $v_username . " " . @@ -231,7 +231,7 @@ // Add antivirus if ($v_antivirus == "no" && !empty($_POST["v_antivirus"]) && empty($_SESSION["error_msg"])) { exec( - HESTIA_CMD . + TULIO_CMD . "v-add-mail-domain-antivirus " . $v_username . " " . @@ -247,11 +247,7 @@ // Delete DKIM if ($v_dkim == "yes" && empty($_POST["v_dkim"]) && empty($_SESSION["error_msg"])) { exec( - HESTIA_CMD . - "v-delete-mail-domain-dkim " . - $v_username . - " " . - quoteshellarg($v_domain), + TULIO_CMD . "v-delete-mail-domain-dkim " . $v_username . " " . quoteshellarg($v_domain), $output, $return_var, ); @@ -263,7 +259,7 @@ // Add DKIM if ($v_dkim == "no" && !empty($_POST["v_dkim"]) && empty($_SESSION["error_msg"])) { exec( - HESTIA_CMD . "v-add-mail-domain-dkim " . $v_username . " " . quoteshellarg($v_domain), + TULIO_CMD . "v-add-mail-domain-dkim " . $v_username . " " . quoteshellarg($v_domain), $output, $return_var, ); @@ -275,7 +271,7 @@ // Delete catchall if (!empty($v_catchall) && empty($_POST["v_catchall"]) && empty($_SESSION["error_msg"])) { exec( - HESTIA_CMD . + TULIO_CMD . "v-delete-mail-domain-catchall " . $v_username . " " . @@ -300,7 +296,7 @@ $v_rate = quoteshellarg($_POST["v_rate"]); } exec( - HESTIA_CMD . + TULIO_CMD . "v-change-mail-domain-rate-limit " . $v_username . " " . @@ -319,7 +315,7 @@ if (!empty($_POST["v_reject"]) && $v_antispam == "yes" && $v_reject != "yes") { exec( - HESTIA_CMD . "v-add-mail-domain-reject " . $user . " " . $v_domain . " yes", + TULIO_CMD . "v-add-mail-domain-reject " . $user . " " . $v_domain . " yes", $output, $return_var, ); @@ -329,7 +325,7 @@ } if (empty($_POST["v_reject"]) && $v_reject == "yes") { exec( - HESTIA_CMD . "v-delete-mail-domain-reject " . $user . " " . $v_domain . " yes", + TULIO_CMD . "v-delete-mail-domain-reject " . $user . " " . $v_domain . " yes", $output, $return_var, ); @@ -343,7 +339,7 @@ if ($v_catchall != $_POST["v_catchall"]) { $v_catchall = quoteshellarg($_POST["v_catchall"]); exec( - HESTIA_CMD . + TULIO_CMD . "v-change-mail-domain-catchall " . $v_username . " " . @@ -362,7 +358,7 @@ if (empty($v_catchall) && !empty($_POST["v_catchall"]) && empty($_SESSION["error_msg"])) { $v_catchall = quoteshellarg($_POST["v_catchall"]); exec( - HESTIA_CMD . + TULIO_CMD . "v-add-mail-domain-catchall " . $v_username . " " . @@ -381,7 +377,7 @@ if (!empty($_POST["v_webmail"])) { $v_webmail = quoteshellarg($_POST["v_webmail"]); exec( - HESTIA_CMD . + TULIO_CMD . "v-add-mail-domain-webmail " . $user . " " . @@ -402,7 +398,7 @@ if (empty($_POST["v_webmail"])) { if (empty($_SESSION["error_msg"])) { exec( - HESTIA_CMD . "v-delete-mail-domain-webmail " . $user . " " . $v_domain . " yes", + TULIO_CMD . "v-delete-mail-domain-webmail " . $user . " " . $v_domain . " yes", $output, $return_var, ); @@ -454,7 +450,7 @@ } exec( - HESTIA_CMD . + TULIO_CMD . "v-change-mail-domain-sslcert " . $user . " " . @@ -471,7 +467,7 @@ $restart_proxy = "yes"; exec( - HESTIA_CMD . + TULIO_CMD . "v-list-mail-domain-ssl " . $user . " " . @@ -514,7 +510,7 @@ empty($_SESSION["error_msg"]) ) { exec( - HESTIA_CMD . + TULIO_CMD . "v-delete-letsencrypt-domain " . $user . " " . @@ -537,7 +533,7 @@ // Delete SSL certificate if ($v_ssl == "yes" && empty($_POST["v_ssl"]) && empty($_SESSION["error_msg"])) { exec( - HESTIA_CMD . "v-delete-mail-domain-ssl " . $v_username . " " . quoteshellarg($v_domain), + TULIO_CMD . "v-delete-mail-domain-ssl " . $v_username . " " . quoteshellarg($v_domain), $output, $return_var, ); @@ -558,7 +554,7 @@ empty($_SESSION["error_msg"]) ) { exec( - HESTIA_CMD . + TULIO_CMD . "v-add-letsencrypt-domain " . $user . " " . @@ -621,7 +617,7 @@ fclose($fp); } exec( - HESTIA_CMD . + TULIO_CMD . "v-add-mail-domain-ssl " . $user . " " . @@ -639,7 +635,7 @@ $restart_proxy = "yes"; exec( - HESTIA_CMD . + TULIO_CMD . "v-list-mail-domain-ssl " . $user . " " . @@ -694,7 +690,7 @@ $v_smtp_relay_port = "587"; } exec( - HESTIA_CMD . + TULIO_CMD . "v-add-mail-domain-smtp-relay " . $v_username . " " . @@ -718,7 +714,7 @@ $v_smtp_relay = false; $v_smtp_relay_host = $v_smtp_relay_user = $v_smtp_relay_pass = $v_smtp_relay_port = ""; exec( - HESTIA_CMD . + TULIO_CMD . "v-delete-mail-domain-smtp-relay " . $v_username . " " . @@ -753,7 +749,7 @@ $v_send_email = $_POST["v_send_email"]; exec( - HESTIA_CMD . + TULIO_CMD . "v-list-mail-account " . $user . " " . @@ -778,7 +774,7 @@ fwrite($fp, $_POST["v_password"] . "\n"); fclose($fp); exec( - HESTIA_CMD . + TULIO_CMD . "v-change-mail-account-password " . $v_username . " " . @@ -805,7 +801,7 @@ $v_quota = quoteshellarg($_POST["v_quota"]); } exec( - HESTIA_CMD . + TULIO_CMD . "v-change-mail-account-quota " . $v_username . " " . @@ -832,7 +828,7 @@ $v_rate = quoteshellarg($_POST["v_rate"]); } exec( - HESTIA_CMD . + TULIO_CMD . "v-change-mail-account-rate-limit " . $v_username . " " . @@ -863,7 +859,7 @@ foreach ($result as $alias) { if (empty($_SESSION["error_msg"]) && !empty($alias)) { exec( - HESTIA_CMD . + TULIO_CMD . "v-delete-mail-account-alias " . $v_username . " " . @@ -883,7 +879,7 @@ foreach ($result as $alias) { if (empty($_SESSION["error_msg"]) && !empty($alias)) { exec( - HESTIA_CMD . + TULIO_CMD . "v-add-mail-account-alias " . $v_username . " " . @@ -905,7 +901,7 @@ foreach ($vfwd as $forward) { if (empty($_SESSION["error_msg"]) && !empty($forward)) { exec( - HESTIA_CMD . + TULIO_CMD . "v-delete-mail-account-forward " . $v_username . " " . @@ -921,7 +917,7 @@ unset($output); } exec( - HESTIA_CMD . + TULIO_CMD . "v-add-mail-account-forward " . $v_username . " " . @@ -950,7 +946,7 @@ foreach ($result as $forward) { if (empty($_SESSION["error_msg"]) && !empty($forward)) { exec( - HESTIA_CMD . + TULIO_CMD . "v-delete-mail-account-forward " . $v_username . " " . @@ -970,7 +966,7 @@ foreach ($result as $forward) { if (empty($_SESSION["error_msg"]) && !empty($forward)) { exec( - HESTIA_CMD . + TULIO_CMD . "v-add-mail-account-forward " . $v_username . " " . @@ -992,7 +988,7 @@ // Delete FWD_ONLY flag if ($v_fwd_only == "yes" && empty($_POST["v_fwd_only"]) && empty($_SESSION["error_msg"])) { exec( - HESTIA_CMD . + TULIO_CMD . "v-delete-mail-account-fwd-only " . $v_username . " " . @@ -1010,7 +1006,7 @@ // Add FWD_ONLY flag if ($v_fwd_only != "yes" && !empty($_POST["v_fwd_only"]) && empty($_SESSION["error_msg"])) { exec( - HESTIA_CMD . + TULIO_CMD . "v-add-mail-account-fwd-only " . $v_username . " " . @@ -1028,7 +1024,7 @@ // Delete autoreply if ($v_autoreply == "yes" && empty($_POST["v_autoreply"]) && empty($_SESSION["error_msg"])) { exec( - HESTIA_CMD . + TULIO_CMD . "v-delete-mail-account-autoreply " . $v_username . " " . @@ -1050,7 +1046,7 @@ $v_autoreply_message = str_replace("\r\n", "\n", $_POST["v_autoreply_message"]); $v_autoreply_message = quoteshellarg($v_autoreply_message); exec( - HESTIA_CMD . + TULIO_CMD . "v-add-mail-account-autoreply " . $v_username . " " . diff --git a/web/edit/package/index.php b/web/edit/package/index.php index 279a958c6..40d4adf46 100644 --- a/web/edit/package/index.php +++ b/web/edit/package/index.php @@ -27,7 +27,7 @@ // List package $v_package = quoteshellarg($_GET["package"]); -exec(HESTIA_CMD . "v-list-user-package " . $v_package . " 'json'", $output, $return_var); +exec(TULIO_CMD . "v-list-user-package " . $v_package . " 'json'", $output, $return_var); check_return_code_redirect($return_var, $output, "/list/package/"); $data = json_decode(implode("", $output), true); unset($output); @@ -104,31 +104,31 @@ $v_status = "active"; // List web templates -exec(HESTIA_CMD . "v-list-web-templates json", $output, $return_var); +exec(TULIO_CMD . "v-list-web-templates json", $output, $return_var); $web_templates = json_decode(implode("", $output), true); unset($output); // List backend templates if (!empty($_SESSION["WEB_BACKEND"])) { - exec(HESTIA_CMD . "v-list-web-templates-backend json", $output, $return_var); + exec(TULIO_CMD . "v-list-web-templates-backend json", $output, $return_var); $backend_templates = json_decode(implode("", $output), true); unset($output); } // List proxy templates if (!empty($_SESSION["PROXY_SYSTEM"])) { - exec(HESTIA_CMD . "v-list-web-templates-proxy json", $output, $return_var); + exec(TULIO_CMD . "v-list-web-templates-proxy json", $output, $return_var); $proxy_templates = json_decode(implode("", $output), true); unset($output); } // List dns templates -exec(HESTIA_CMD . "v-list-dns-templates json", $output, $return_var); +exec(TULIO_CMD . "v-list-dns-templates json", $output, $return_var); $dns_templates = json_decode(implode("", $output), true); unset($output); // List shels -exec(HESTIA_CMD . "v-list-sys-shells json", $output, $return_var); +exec(TULIO_CMD . "v-list-sys-shells json", $output, $return_var); $shells = json_decode(implode("", $output), true); unset($output); @@ -337,7 +337,7 @@ $fp = fopen($tmpfile, "w"); fwrite($fp, $pkg); exec( - HESTIA_CMD . "v-add-user-package " . $tmpfile . " " . $v_package . " yes", + TULIO_CMD . "v-add-user-package " . $tmpfile . " " . $v_package . " yes", $output, $return_var, ); @@ -348,13 +348,13 @@ unlink($tmpfile); // Propagate new package - exec(HESTIA_CMD . "v-update-user-package " . $v_package . " 'json'", $output, $return_var); + exec(TULIO_CMD . "v-update-user-package " . $v_package . " 'json'", $output, $return_var); check_return_code($return_var, $output); unset($output); if ($v_package_new != $v_package) { exec( - HESTIA_CMD . "v-rename-user-package " . $v_package . " " . $v_package_new, + TULIO_CMD . "v-rename-user-package " . $v_package . " " . $v_package_new, $output, $return_var, ); diff --git a/web/edit/server/apache2/index.php b/web/edit/server/apache2/index.php index 57490e3cb..8b852009d 100644 --- a/web/edit/server/apache2/index.php +++ b/web/edit/server/apache2/index.php @@ -30,7 +30,7 @@ fwrite($fp, str_replace("\r\n", "\n", $_POST["v_config"])); fclose($fp); exec( - HESTIA_CMD . "v-change-sys-service-config " . $new_conf . " apache2 " . $v_restart, + TULIO_CMD . "v-change-sys-service-config " . $new_conf . " apache2 " . $v_restart, $output, $return_var, ); @@ -49,7 +49,7 @@ $v_service_name = strtoupper("apache2"); // Read config -$v_config = shell_exec(HESTIA_CMD . "v-open-fs-config " . $v_config_path); +$v_config = shell_exec(TULIO_CMD . "v-open-fs-config " . $v_config_path); // Render page render_page($user, $TAB, "edit_server_httpd"); diff --git a/web/edit/server/bind9/index.php b/web/edit/server/bind9/index.php index d72f46a3e..888fb166c 100644 --- a/web/edit/server/bind9/index.php +++ b/web/edit/server/bind9/index.php @@ -30,7 +30,7 @@ fwrite($fp, str_replace("\r\n", "\n", $_POST["v_options"])); fclose($fp); exec( - HESTIA_CMD . "v-change-sys-service-config " . $new_conf . " bind9-opt " . $v_restart, + TULIO_CMD . "v-change-sys-service-config " . $new_conf . " bind9-opt " . $v_restart, $output, $return_var, ); @@ -47,7 +47,7 @@ fwrite($fp, str_replace("\r\n", "\n", $_POST["v_config"])); fclose($fp); exec( - HESTIA_CMD . "v-change-sys-service-config " . $new_conf . " bind9 " . $v_restart, + TULIO_CMD . "v-change-sys-service-config " . $new_conf . " bind9 " . $v_restart, $output, $return_var, ); @@ -67,8 +67,8 @@ $v_service_name = strtoupper("bind9"); // Read config -$v_options = shell_exec(HESTIA_CMD . "v-open-fs-config " . $v_options_path); -$v_config = shell_exec(HESTIA_CMD . "v-open-fs-config " . $v_config_path); +$v_options = shell_exec(TULIO_CMD . "v-open-fs-config " . $v_options_path); +$v_config = shell_exec(TULIO_CMD . "v-open-fs-config " . $v_config_path); // Render page render_page($user, $TAB, "edit_server_bind9"); diff --git a/web/edit/server/clamav-daemon/index.php b/web/edit/server/clamav-daemon/index.php index 512a8b795..6465eb0ec 100644 --- a/web/edit/server/clamav-daemon/index.php +++ b/web/edit/server/clamav-daemon/index.php @@ -30,7 +30,7 @@ fwrite($fp, str_replace("\r\n", "\n", $_POST["v_config"])); fclose($fp); exec( - HESTIA_CMD . "v-change-sys-service-config " . $new_conf . " clamd " . $v_restart, + TULIO_CMD . "v-change-sys-service-config " . $new_conf . " clamd " . $v_restart, $output, $return_var, ); @@ -45,11 +45,11 @@ } } -$v_config_path = shell_exec(HESTIA_CMD . "v-list-sys-clamd-config plain"); +$v_config_path = shell_exec(TULIO_CMD . "v-list-sys-clamd-config plain"); $v_service_name = strtoupper("clamav"); // Read config -$v_config = shell_exec(HESTIA_CMD . "v-open-fs-config " . $v_config_path); +$v_config = shell_exec(TULIO_CMD . "v-open-fs-config " . $v_config_path); // Render page render_page($user, $TAB, "edit_server_service"); diff --git a/web/edit/server/cron/index.php b/web/edit/server/cron/index.php index 3370c1bac..b2106ecb6 100644 --- a/web/edit/server/cron/index.php +++ b/web/edit/server/cron/index.php @@ -21,7 +21,7 @@ $v_service_name = strtoupper("cron"); // Read config -$v_config = shell_exec(HESTIA_CMD . "v-open-fs-config " . $v_config_path); +$v_config = shell_exec(TULIO_CMD . "v-open-fs-config " . $v_config_path); // Render page render_page($user, $TAB, "edit_server_service"); diff --git a/web/edit/server/crond/index.php b/web/edit/server/crond/index.php index 3370c1bac..b2106ecb6 100644 --- a/web/edit/server/crond/index.php +++ b/web/edit/server/crond/index.php @@ -21,7 +21,7 @@ $v_service_name = strtoupper("cron"); // Read config -$v_config = shell_exec(HESTIA_CMD . "v-open-fs-config " . $v_config_path); +$v_config = shell_exec(TULIO_CMD . "v-open-fs-config " . $v_config_path); // Render page render_page($user, $TAB, "edit_server_service"); diff --git a/web/edit/server/dovecot/index.php b/web/edit/server/dovecot/index.php index c280ba493..a0737cad0 100644 --- a/web/edit/server/dovecot/index.php +++ b/web/edit/server/dovecot/index.php @@ -30,7 +30,7 @@ fwrite($fp, str_replace("\r\n", "\n", $_POST["v_config"])); fclose($fp); exec( - HESTIA_CMD . "v-change-sys-service-config " . $new_conf . " dovecot " . $v_restart, + TULIO_CMD . "v-change-sys-service-config " . $new_conf . " dovecot " . $v_restart, $output, $return_var, ); @@ -47,7 +47,7 @@ fwrite($fp, str_replace("\r\n", "\n", $_POST["v_config1"])); fclose($fp); exec( - HESTIA_CMD . "v-change-sys-service-config " . $new_conf . " dovecot-1 " . $v_restart, + TULIO_CMD . "v-change-sys-service-config " . $new_conf . " dovecot-1 " . $v_restart, $output, $return_var, ); @@ -64,7 +64,7 @@ fwrite($fp, str_replace("\r\n", "\n", $_POST["v_config2"])); fclose($fp); exec( - HESTIA_CMD . "v-change-sys-service-config " . $new_conf . " dovecot-2 " . $v_restart, + TULIO_CMD . "v-change-sys-service-config " . $new_conf . " dovecot-2 " . $v_restart, $output, $return_var, ); @@ -81,7 +81,7 @@ fwrite($fp, str_replace("\r\n", "\n", $_POST["v_config3"])); fclose($fp); exec( - HESTIA_CMD . "v-change-sys-service-config " . $new_conf . " dovecot-3 " . $v_restart, + TULIO_CMD . "v-change-sys-service-config " . $new_conf . " dovecot-3 " . $v_restart, $output, $return_var, ); @@ -98,7 +98,7 @@ fwrite($fp, str_replace("\r\n", "\n", $_POST["v_config4"])); fclose($fp); exec( - HESTIA_CMD . "v-change-sys-service-config " . $new_conf . " dovecot-4 " . $v_restart, + TULIO_CMD . "v-change-sys-service-config " . $new_conf . " dovecot-4 " . $v_restart, $output, $return_var, ); @@ -115,7 +115,7 @@ fwrite($fp, str_replace("\r\n", "\n", $_POST["v_config5"])); fclose($fp); exec( - HESTIA_CMD . "v-change-sys-service-config " . $new_conf . " dovecot-5 " . $v_restart, + TULIO_CMD . "v-change-sys-service-config " . $new_conf . " dovecot-5 " . $v_restart, $output, $return_var, ); @@ -132,7 +132,7 @@ fwrite($fp, str_replace("\r\n", "\n", $_POST["v_config6"])); fclose($fp); exec( - HESTIA_CMD . "v-change-sys-service-config " . $new_conf . " dovecot-6 " . $v_restart, + TULIO_CMD . "v-change-sys-service-config " . $new_conf . " dovecot-6 " . $v_restart, $output, $return_var, ); @@ -149,7 +149,7 @@ fwrite($fp, str_replace("\r\n", "\n", $_POST["v_config7"])); fclose($fp); exec( - HESTIA_CMD . "v-change-sys-service-config " . $new_conf . " dovecot-7 " . $v_restart, + TULIO_CMD . "v-change-sys-service-config " . $new_conf . " dovecot-7 " . $v_restart, $output, $return_var, ); @@ -166,7 +166,7 @@ fwrite($fp, str_replace("\r\n", "\n", $_POST["v_config8"])); fclose($fp); exec( - HESTIA_CMD . "v-change-sys-service-config " . $new_conf . " dovecot-8 " . $v_restart, + TULIO_CMD . "v-change-sys-service-config " . $new_conf . " dovecot-8 " . $v_restart, $output, $return_var, ); @@ -182,7 +182,7 @@ } // List config -exec(HESTIA_CMD . "v-list-sys-dovecot-config json", $output, $return_var); +exec(TULIO_CMD . "v-list-sys-dovecot-config json", $output, $return_var); $data = json_decode(implode("", $output), true); unset($output); @@ -198,30 +198,30 @@ $v_service_name = strtoupper("dovecot"); // Read config -$v_config = shell_exec(HESTIA_CMD . "v-open-fs-config " . $v_config_path); +$v_config = shell_exec(TULIO_CMD . "v-open-fs-config " . $v_config_path); if (!empty($v_config_path1)) { - $v_config1 = shell_exec(HESTIA_CMD . "v-open-fs-config " . $v_config_path1); + $v_config1 = shell_exec(TULIO_CMD . "v-open-fs-config " . $v_config_path1); } if (!empty($v_config_path2)) { - $v_config2 = shell_exec(HESTIA_CMD . "v-open-fs-config " . $v_config_path2); + $v_config2 = shell_exec(TULIO_CMD . "v-open-fs-config " . $v_config_path2); } if (!empty($v_config_path3)) { - $v_config3 = shell_exec(HESTIA_CMD . "v-open-fs-config " . $v_config_path3); + $v_config3 = shell_exec(TULIO_CMD . "v-open-fs-config " . $v_config_path3); } if (!empty($v_config_path4)) { - $v_config4 = shell_exec(HESTIA_CMD . "v-open-fs-config " . $v_config_path4); + $v_config4 = shell_exec(TULIO_CMD . "v-open-fs-config " . $v_config_path4); } if (!empty($v_config_path5)) { - $v_config5 = shell_exec(HESTIA_CMD . "v-open-fs-config " . $v_config_path5); + $v_config5 = shell_exec(TULIO_CMD . "v-open-fs-config " . $v_config_path5); } if (!empty($v_config_path6)) { - $v_config6 = shell_exec(HESTIA_CMD . "v-open-fs-config " . $v_config_path6); + $v_config6 = shell_exec(TULIO_CMD . "v-open-fs-config " . $v_config_path6); } if (!empty($v_config_path7)) { - $v_config7 = shell_exec(HESTIA_CMD . "v-open-fs-config " . $v_config_path7); + $v_config7 = shell_exec(TULIO_CMD . "v-open-fs-config " . $v_config_path7); } if (!empty($v_config_path8)) { - $v_config8 = shell_exec(HESTIA_CMD . "v-open-fs-config " . $v_config_path8); + $v_config8 = shell_exec(TULIO_CMD . "v-open-fs-config " . $v_config_path8); } // Render page diff --git a/web/edit/server/exim/index.php b/web/edit/server/exim/index.php index 44b08d3a5..98c82ced2 100644 --- a/web/edit/server/exim/index.php +++ b/web/edit/server/exim/index.php @@ -30,7 +30,7 @@ fwrite($fp, str_replace("\r\n", "\n", $_POST["v_config"])); fclose($fp); exec( - HESTIA_CMD . "v-change-sys-service-config " . $new_conf . " exim " . $v_restart, + TULIO_CMD . "v-change-sys-service-config " . $new_conf . " exim " . $v_restart, $output, $return_var, ); @@ -49,7 +49,7 @@ $v_service_name = strtoupper("exim"); // Read config -$v_config = shell_exec(HESTIA_CMD . "v-open-fs-config " . $v_config_path); +$v_config = shell_exec(TULIO_CMD . "v-open-fs-config " . $v_config_path); // Render page render_page($user, $TAB, "edit_server_service"); diff --git a/web/edit/server/exim4/index.php b/web/edit/server/exim4/index.php index 9a88bec36..a72862d7a 100644 --- a/web/edit/server/exim4/index.php +++ b/web/edit/server/exim4/index.php @@ -30,7 +30,7 @@ fwrite($fp, str_replace("\r\n", "\n", $_POST["v_config"])); fclose($fp); exec( - HESTIA_CMD . "v-change-sys-service-config " . $new_conf . " exim4 " . $v_restart, + TULIO_CMD . "v-change-sys-service-config " . $new_conf . " exim4 " . $v_restart, $output, $return_var, ); @@ -49,7 +49,7 @@ $v_service_name = strtoupper("exim"); // Read config -$v_config = shell_exec(HESTIA_CMD . "v-open-fs-config " . $v_config_path); +$v_config = shell_exec(TULIO_CMD . "v-open-fs-config " . $v_config_path); // Render page render_page($user, $TAB, "edit_server_service"); diff --git a/web/edit/server/fail2ban/index.php b/web/edit/server/fail2ban/index.php index ac6affcb0..6340da93a 100644 --- a/web/edit/server/fail2ban/index.php +++ b/web/edit/server/fail2ban/index.php @@ -30,7 +30,7 @@ fwrite($fp, str_replace("\r\n", "\n", $_POST["v_config"])); fclose($fp); exec( - HESTIA_CMD . "v-change-sys-service-config " . $new_conf . " fail2ban " . $v_restart, + TULIO_CMD . "v-change-sys-service-config " . $new_conf . " fail2ban " . $v_restart, $output, $return_var, ); @@ -49,7 +49,7 @@ $v_service_name = strtoupper("fail2ban"); // Read config -$v_config = shell_exec(HESTIA_CMD . "v-open-fs-config " . $v_config_path); +$v_config = shell_exec(TULIO_CMD . "v-open-fs-config " . $v_config_path); // Render page render_page($user, $TAB, "edit_server_service"); diff --git a/web/edit/server/httpd/index.php b/web/edit/server/httpd/index.php index 0322c3e75..681245b12 100644 --- a/web/edit/server/httpd/index.php +++ b/web/edit/server/httpd/index.php @@ -30,7 +30,7 @@ fwrite($fp, str_replace("\r\n", "\n", $_POST["v_config"])); fclose($fp); exec( - HESTIA_CMD . "v-change-sys-service-config " . $new_conf . " httpd " . $v_restart, + TULIO_CMD . "v-change-sys-service-config " . $new_conf . " httpd " . $v_restart, $output, $return_var, ); @@ -49,7 +49,7 @@ $v_service_name = strtoupper("httpd"); // Read config -$v_config = shell_exec(HESTIA_CMD . "v-open-fs-config " . $v_config_path); +$v_config = shell_exec(TULIO_CMD . "v-open-fs-config " . $v_config_path); // Render page render_page($user, $TAB, "edit_server_httpd"); diff --git a/web/edit/server/index.php b/web/edit/server/index.php index 3fbe2ce59..85a90e0b5 100644 --- a/web/edit/server/index.php +++ b/web/edit/server/index.php @@ -16,16 +16,16 @@ $v_hostname = exec("hostname"); // List available timezones and get current one -exec(HESTIA_CMD . "v-get-sys-timezone", $output, $return_var); +exec(TULIO_CMD . "v-get-sys-timezone", $output, $return_var); $v_timezone = $output[0]; unset($output); -exec(HESTIA_CMD . "v-get-sys-timezones json", $output, $return_var); +exec(TULIO_CMD . "v-get-sys-timezones json", $output, $return_var); $v_timezones = json_decode(implode("", $output), true); unset($output); // List supported php versions -exec(HESTIA_CMD . "v-list-web-templates-backend json", $output, $return_var); +exec(TULIO_CMD . "v-list-web-templates-backend json", $output, $return_var); $backend_templates = json_decode(implode("", $output), true); unset($output); @@ -92,7 +92,7 @@ }, $v_php_versions); // List languages -exec(HESTIA_CMD . "v-list-sys-languages json", $output, $return_var); +exec(TULIO_CMD . "v-list-sys-languages json", $output, $return_var); $language = json_decode(implode("", $output), true); foreach ($language as $lang) { $languages[$lang] = translate_json($lang); @@ -101,12 +101,12 @@ unset($output); // List themes -exec(HESTIA_CMD . "v-list-sys-themes json", $output, $return_var); +exec(TULIO_CMD . "v-list-sys-themes json", $output, $return_var); $theme = json_decode(implode("", $output), true); unset($output); // List dns cluster hosts -exec(HESTIA_CMD . "v-list-remote-dns-hosts json", $output, $return_var); +exec(TULIO_CMD . "v-list-remote-dns-hosts json", $output, $return_var); $dns_cluster = json_decode(implode("", $output), true); unset($output); if (is_array($dns_cluster)) { @@ -149,7 +149,7 @@ } // List Database hosts -exec(HESTIA_CMD . "v-list-database-hosts json", $output, $return_var); +exec(TULIO_CMD . "v-list-database-hosts json", $output, $return_var); $db_hosts = json_decode(implode("", $output), true); unset($output); $v_mysql_hosts = array_values( @@ -185,7 +185,7 @@ $v_backup = "yes"; } else { exec( - HESTIA_CMD . "v-list-backup-host " . quoteshellarg($backup_type) . " json", + TULIO_CMD . "v-list-backup-host " . quoteshellarg($backup_type) . " json", $output, $return_var, ); @@ -255,7 +255,7 @@ } if ($_SESSION["BACKUP_INCREMENTAL"] == "yes") { - exec(HESTIA_CMD . "v-list-backup-host-restic json", $output, $return_var); + exec(TULIO_CMD . "v-list-backup-host-restic json", $output, $return_var); $v_backup_incremental = "yes"; $v_incremental_backups = json_decode(implode("", $output), true); unset($output); @@ -277,19 +277,19 @@ } // List ssl certificate info -exec(HESTIA_CMD . "v-list-sys-tulio-ssl json", $output, $return_var); +exec(TULIO_CMD . "v-list-sys-tulio-ssl json", $output, $return_var); $ssl_str = json_decode(implode("", $output), true); unset($output); -$v_ssl_crt = $ssl_str["HESTIA"]["CRT"]; -$v_ssl_key = $ssl_str["HESTIA"]["KEY"]; -$v_ssl_ca = $ssl_str["HESTIA"]["CA"]; -$v_ssl_subject = $ssl_str["HESTIA"]["SUBJECT"]; -$v_ssl_aliases = $ssl_str["HESTIA"]["ALIASES"]; -$v_ssl_not_before = $ssl_str["HESTIA"]["NOT_BEFORE"]; -$v_ssl_not_after = $ssl_str["HESTIA"]["NOT_AFTER"]; -$v_ssl_signature = $ssl_str["HESTIA"]["SIGNATURE"]; -$v_ssl_pub_key = $ssl_str["HESTIA"]["PUB_KEY"]; -$v_ssl_issuer = $ssl_str["HESTIA"]["ISSUER"]; +$v_ssl_crt = $ssl_str["TULIO"]["CRT"]; +$v_ssl_key = $ssl_str["TULIO"]["KEY"]; +$v_ssl_ca = $ssl_str["TULIO"]["CA"]; +$v_ssl_subject = $ssl_str["TULIO"]["SUBJECT"]; +$v_ssl_aliases = $ssl_str["TULIO"]["ALIASES"]; +$v_ssl_not_before = $ssl_str["TULIO"]["NOT_BEFORE"]; +$v_ssl_not_after = $ssl_str["TULIO"]["NOT_AFTER"]; +$v_ssl_signature = $ssl_str["TULIO"]["SIGNATURE"]; +$v_ssl_pub_key = $ssl_str["TULIO"]["PUB_KEY"]; +$v_ssl_issuer = $ssl_str["TULIO"]["ISSUER"]; // Check POST request if (!empty($_POST["save"])) { @@ -300,7 +300,7 @@ // Change hostname if (!empty($_POST["v_hostname"]) && $v_hostname != $_POST["v_hostname"]) { exec( - HESTIA_CMD . "v-change-sys-hostname " . quoteshellarg($_POST["v_hostname"]), + TULIO_CMD . "v-change-sys-hostname " . quoteshellarg($_POST["v_hostname"]), $output, $return_var, ); @@ -323,9 +323,7 @@ if (array_key_exists($php_version->tpl, $post_php)) { if (!$php_version->installed) { exec( - HESTIA_CMD . - "v-add-web-php " . - quoteshellarg($php_version->version), + TULIO_CMD . "v-add-web-php " . quoteshellarg($php_version->version), $output, $return_var, ); @@ -338,7 +336,7 @@ } else { if ($php_version->installed && !$php_version->protected) { exec( - HESTIA_CMD . + TULIO_CMD . "v-delete-web-php " . quoteshellarg($php_version->version), $output, @@ -360,7 +358,7 @@ if (empty($_SESSION["error_msg"])) { if ("php-" . $_POST["v_php_default_version"] != DEFAULT_PHP_VERSION) { exec( - HESTIA_CMD . + TULIO_CMD . "v-change-sys-php " . quoteshellarg($_POST["v_php_default_version"]), $output, @@ -379,7 +377,7 @@ if (!empty($_POST["v_timezone"])) { if ($v_timezone != $_POST["v_timezone"]) { exec( - HESTIA_CMD . "v-change-sys-timezone " . quoteshellarg($_POST["v_timezone"]), + TULIO_CMD . "v-change-sys-timezone " . quoteshellarg($_POST["v_timezone"]), $output, $return_var, ); @@ -397,7 +395,7 @@ if (!empty($_POST["v_language"]) && $_SESSION["LANGUAGE"] != $_POST["v_language"]) { if (isset($_POST["v_language_update"])) { exec( - HESTIA_CMD . + TULIO_CMD . "v-change-sys-language " . quoteshellarg($_POST["v_language"]) . " yes", @@ -409,7 +407,7 @@ } } exec( - HESTIA_CMD . "v-change-sys-language " . quoteshellarg($_POST["v_language"]), + TULIO_CMD . "v-change-sys-language " . quoteshellarg($_POST["v_language"]), $output, $return_var, ); @@ -425,7 +423,7 @@ if (empty($_SESSION["error_msg"])) { if ($_POST["v_theme"] != $_SESSION["THEME"]) { exec( - HESTIA_CMD . "v-change-sys-config-value THEME " . quoteshellarg($_POST["v_theme"]), + TULIO_CMD . "v-change-sys-config-value THEME " . quoteshellarg($_POST["v_theme"]), $output, $return_var, ); @@ -448,7 +446,7 @@ if ($_POST["v_debug_mode"] != $_SESSION["DEBUG_MODE"]) { exec( - HESTIA_CMD . + TULIO_CMD . "v-change-sys-config-value DEBUG_MODE " . quoteshellarg($_POST["v_debug_mode"]), $output, @@ -469,7 +467,7 @@ $_POST["v_plugin_app_installer"] = "false"; } exec( - HESTIA_CMD . + TULIO_CMD . "v-change-sys-config-value PLUGIN_APP_INSTALLER " . quoteshellarg($_POST["v_plugin_app_installer"]), $output, @@ -492,7 +490,7 @@ } if ($_POST["v_experimental_features"] != $_SESSION["POLICY_SYSTEM_ENABLE_BACON"]) { exec( - HESTIA_CMD . + TULIO_CMD . "v-change-sys-config-value POLICY_SYSTEM_ENABLE_BACON " . quoteshellarg($_POST["v_experimental_features"]), $output, @@ -508,7 +506,7 @@ ) { //disable preview mode exec( - HESTIA_CMD . + TULIO_CMD . "v-change-sys-config-value POLICY_USER_VIEW_SUSPENDED " . quoteshellarg($_POST["v_policy_user_view_suspended"]), $output, @@ -526,14 +524,14 @@ $_SESSION["FILE_MANAGER"] != $_POST["v_filemanager"] ) { if ($_POST["v_filemanager"] == "true") { - exec(HESTIA_CMD . "v-add-sys-filemanager", $output, $return_var); + exec(TULIO_CMD . "v-add-sys-filemanager", $output, $return_var); check_return_code($return_var, $output); unset($output); if (empty($_SESSION["error_msg"])) { $_SESSION["FILE_MANAGER"] = "true"; } } else { - exec(HESTIA_CMD . "v-delete-sys-filemanager", $output, $return_var); + exec(TULIO_CMD . "v-delete-sys-filemanager", $output, $return_var); check_return_code($return_var, $output); unset($output); if (empty($_SESSION["error_msg"])) { @@ -549,14 +547,14 @@ $_SESSION["WEB_TERMINAL"] != $_POST["v_web_terminal"] ) { if ($_POST["v_web_terminal"] == "true") { - exec(HESTIA_CMD . "v-add-sys-web-terminal", $output, $return_var); + exec(TULIO_CMD . "v-add-sys-web-terminal", $output, $return_var); check_return_code($return_var, $output); unset($output); if (empty($_SESSION["error_msg"])) { $_SESSION["WEB_TERMINAL"] = "true"; } } else { - exec(HESTIA_CMD . "v-delete-sys-web-terminal", $output, $return_var); + exec(TULIO_CMD . "v-delete-sys-web-terminal", $output, $return_var); check_return_code($return_var, $output); unset($output); if (empty($_SESSION["error_msg"])) { @@ -569,14 +567,14 @@ if (empty($_SESSION["error_msg"])) { if (!empty($_POST["v_phpmyadmin_key"])) { if ($_POST["v_phpmyadmin_key"] == "yes" && $_SESSION["PHPMYADMIN_KEY"] == "") { - exec(HESTIA_CMD . "v-add-sys-pma-sso quiet", $output, $return_var); + exec(TULIO_CMD . "v-add-sys-pma-sso quiet", $output, $return_var); check_return_code($return_var, $output); unset($output); if (empty($_SESSION["error_msg"])) { $_SESSION["PHPMYADMIN_KEY"] != ""; } } elseif ($_POST["v_phpmyadmin_key"] == "no" && $_SESSION["PHPMYADMIN_KEY"] != "") { - exec(HESTIA_CMD . "v-delete-sys-pma-sso quiet", $output, $return_var); + exec(TULIO_CMD . "v-delete-sys-pma-sso quiet", $output, $return_var); check_return_code($return_var, $output); unset($output); if (empty($_SESSION["error_msg"])) { @@ -590,14 +588,14 @@ if (empty($_SESSION["error_msg"])) { if (!empty($_POST["v_quota"]) && $_SESSION["DISK_QUOTA"] != $_POST["v_quota"]) { if ($_POST["v_quota"] == "yes") { - exec(HESTIA_CMD . "v-add-sys-quota", $output, $return_var); + exec(TULIO_CMD . "v-add-sys-quota", $output, $return_var); check_return_code($return_var, $output); unset($output); if (empty($_SESSION["error_msg"])) { $_SESSION["DISK_QUOTA"] = "yes"; } } else { - exec(HESTIA_CMD . "v-delete-sys-quota", $output, $return_var); + exec(TULIO_CMD . "v-delete-sys-quota", $output, $return_var); check_return_code($return_var, $output); unset($output); if (empty($_SESSION["error_msg"])) { @@ -614,14 +612,14 @@ $_SESSION["RESOURCES_LIMIT"] != $_POST["v_resources_limit"] ) { if ($_POST["v_resources_limit"] == "yes") { - exec(HESTIA_CMD . "v-add-sys-cgroups", $output, $return_var); + exec(TULIO_CMD . "v-add-sys-cgroups", $output, $return_var); check_return_code($return_var, $output); unset($output); if (empty($_SESSION["error_msg"])) { $_SESSION["RESOURCES_LIMIT"] = "yes"; } } else { - exec(HESTIA_CMD . "v-delete-sys-cgroups", $output, $return_var); + exec(TULIO_CMD . "v-delete-sys-cgroups", $output, $return_var); check_return_code($return_var, $output); unset($output); if (empty($_SESSION["error_msg"])) { @@ -641,14 +639,14 @@ } if (!empty($_POST["v_firewall"]) && $v_firewall != $_POST["v_firewall"]) { if ($_POST["v_firewall"] == "yes") { - exec(HESTIA_CMD . "v-add-sys-firewall", $output, $return_var); + exec(TULIO_CMD . "v-add-sys-firewall", $output, $return_var); check_return_code($return_var, $output); unset($output); if (empty($_SESSION["error_msg"])) { $_SESSION["FIREWALL_SYSTEM"] = "iptables"; } } else { - exec(HESTIA_CMD . "v-delete-sys-firewall", $output, $return_var); + exec(TULIO_CMD . "v-delete-sys-firewall", $output, $return_var); check_return_code($return_var, $output); unset($output); if (empty($_SESSION["error_msg"])) { @@ -662,7 +660,7 @@ if (empty($_SESSION["error_msg"])) { if (!empty($_POST["v_mysql_password"])) { exec( - HESTIA_CMD . + TULIO_CMD . "v-change-database-host-password mysql localhost root " . quoteshellarg($_POST["v_mysql_password"]), $output, @@ -679,7 +677,7 @@ if ($_SESSION["WEBMAIL_SYSTEM"] != "") { if ($_POST["v_webmail_alias"] != $_SESSION["WEBMAIL_ALIAS"]) { exec( - HESTIA_CMD . + TULIO_CMD . "v-change-sys-webmail " . quoteshellarg($_POST["v_webmail_alias"]), $output, @@ -712,7 +710,7 @@ $v_smtp_relay_port = "587"; } exec( - HESTIA_CMD . + TULIO_CMD . "v-add-sys-smtp-relay " . $v_smtp_relay_host . " " . @@ -731,7 +729,7 @@ if (!isset($_POST["v_smtp_relay"]) && $v_smtp_relay == true) { $v_smtp_relay = false; $v_smtp_relay_host = $v_smtp_relay_user = $v_smtp_relay_pass = $v_smtp_relay_port = ""; - exec(HESTIA_CMD . "v-delete-sys-smtp-relay", $output, $return_var); + exec(TULIO_CMD . "v-delete-sys-smtp-relay", $output, $return_var); check_return_code($return_var, $output); unset($output); } @@ -741,7 +739,7 @@ if (empty($_SESSION["error_msg"])) { if ($_POST["v_mysql_url"] != $_SESSION["DB_PMA_ALIAS"]) { exec( - HESTIA_CMD . "v-change-sys-db-alias pma " . quoteshellarg($_POST["v_mysql_url"]), + TULIO_CMD . "v-change-sys-db-alias pma " . quoteshellarg($_POST["v_mysql_url"]), $output, $return_var, ); @@ -758,7 +756,7 @@ } if ($_POST["v_pgsql_url"] != $_SESSION["DB_PGA_ALIAS"]) { exec( - HESTIA_CMD . "v-change-sys-db-alias pga " . quoteshellarg($_POST["v_pgsql_url"]), + TULIO_CMD . "v-change-sys-db-alias pga " . quoteshellarg($_POST["v_pgsql_url"]), $output, $return_var, ); @@ -786,7 +784,7 @@ $_POST["v_upgrade_send_notification_email"] = "false"; } exec( - HESTIA_CMD . + TULIO_CMD . "v-change-sys-config-value UPGRADE_SEND_EMAIL " . quoteshellarg($_POST["v_upgrade_send_notification_email"]), $output, @@ -815,7 +813,7 @@ $_POST["v_upgrade_send_email_log"] = "false"; } exec( - HESTIA_CMD . + TULIO_CMD . "v-change-sys-config-value UPGRADE_SEND_EMAIL_LOG " . quoteshellarg($_POST["v_upgrade_send_email_log"]), $output, @@ -830,7 +828,7 @@ // Disable local backup if (empty($_SESSION["error_msg"])) { if ($_POST["v_backup"] == "no" && $v_backup == "yes") { - exec(HESTIA_CMD . "v-delete-backup-host local", $output, $return_var); + exec(TULIO_CMD . "v-delete-backup-host local", $output, $return_var); check_return_code($return_var, $output); unset($output); if (empty($_SESSION["error_msg"])) { @@ -843,7 +841,7 @@ // Enable local backups if (empty($_SESSION["error_msg"])) { if ($_POST["v_backup"] == "yes" && $v_backup != "yes") { - exec(HESTIA_CMD . "v-add-backup-host local", $output, $return_var); + exec(TULIO_CMD . "v-add-backup-host local", $output, $return_var); check_return_code($return_var, $output); unset($output); if (empty($_SESSION["error_msg"])) { @@ -860,7 +858,7 @@ $_POST["v_backup_gzip"] = 9; } exec( - HESTIA_CMD . + TULIO_CMD . "v-change-sys-config-value BACKUP_GZIP " . quoteshellarg($_POST["v_backup_gzip"]), $output, @@ -879,7 +877,7 @@ if (empty($_SESSION["error_msg"])) { if ($_POST["v_backup_mode"] != $v_backup_mode) { exec( - HESTIA_CMD . + TULIO_CMD . "v-change-sys-config-value BACKUP_MODE " . quoteshellarg($_POST["v_backup_mode"]), $output, @@ -897,7 +895,7 @@ $v_backup_gzip = $_POST["v_backup_gzip"]; } exec( - HESTIA_CMD . + TULIO_CMD . "v-change-sys-config-value BACKUP_GZIP " . quoteshellarg($_POST["v_backup_gzip"]), $output, @@ -915,7 +913,7 @@ if ($_POST["v_backup_dir"] != $v_backup_dir) { /* See #1655 - exec (HESTIA_CMD."v-change-sys-config-value BACKUP ".quoteshellarg($_POST['v_backup_dir']), $output, $return_var); + exec (TULIO_CMD."v-change-sys-config-value BACKUP ".quoteshellarg($_POST['v_backup_dir']), $output, $return_var); check_return_code($return_var,$output); unset($output); */ @@ -941,7 +939,7 @@ $v_backup_password = quoteshellarg($_POST["v_backup_password"]); $v_backup_bpath = quoteshellarg($_POST["v_backup_bpath"]); exec( - HESTIA_CMD . + TULIO_CMD . "v-add-backup-host " . $v_backup_type . " " . @@ -986,7 +984,7 @@ $v_backup_application_id = quoteshellarg($_POST["v_backup_application_id"]); $v_backup_application_key = quoteshellarg($_POST["v_backup_application_key"]); exec( - HESTIA_CMD . + TULIO_CMD . "v-add-backup-host " . $v_backup_type . " " . @@ -1023,7 +1021,7 @@ $v_backup_type = quoteshellarg($_POST["v_backup_type"]); $v_rclone_path = quoteshellarg($_POST["v_rclone_path"]); exec( - HESTIA_CMD . + TULIO_CMD . "v-add-backup-host " . $v_backup_type . " " . @@ -1049,7 +1047,7 @@ $v_backup_type != "" ) { exec( - HESTIA_CMD . "v-delete-backup-host " . quoteshellarg($v_backup_type), + TULIO_CMD . "v-delete-backup-host " . quoteshellarg($v_backup_type), $output, $return_var, ); @@ -1062,7 +1060,7 @@ $v_backup_password = quoteshellarg($_POST["v_backup_password"]); $v_backup_bpath = quoteshellarg($_POST["v_backup_bpath"]); exec( - HESTIA_CMD . + TULIO_CMD . "v-add-backup-host " . $v_backup_type . " " . @@ -1105,7 +1103,7 @@ $v_backup_application_id = quoteshellarg($_POST["v_backup_application_id"]); $v_backup_application_key = quoteshellarg($_POST["v_backup_application_key"]); exec( - HESTIA_CMD . + TULIO_CMD . "v-add-backup-host " . $v_backup_type . " " . @@ -1153,7 +1151,7 @@ $v_backup_password = quoteshellarg($_POST["v_backup_password"]); $v_backup_bpath = quoteshellarg($_POST["v_backup_bpath"]); exec( - HESTIA_CMD . + TULIO_CMD . "v-add-backup-host " . $v_backup_type . " " . @@ -1203,7 +1201,7 @@ $v_backup_application_id = quoteshellarg($_POST["v_backup_application_id"]); $v_backup_application_key = quoteshellarg($_POST["v_backup_application_key"]); exec( - HESTIA_CMD . + TULIO_CMD . "v-add-backup-host " . $v_backup_type . " " . @@ -1239,7 +1237,7 @@ if (empty($_SESSION["error_msg"])) { if (empty($_POST["v_backup_remote_adv"]) && $v_backup_remote_adv != "") { exec( - HESTIA_CMD . "v-delete-backup-host " . quoteshellarg($v_backup_type), + TULIO_CMD . "v-delete-backup-host " . quoteshellarg($v_backup_type), $output, $return_var, ); @@ -1288,7 +1286,7 @@ $keep_yearly = quoteshellarg($_POST["v_keep_yearly"]); exec( - HESTIA_CMD . + TULIO_CMD . "v-add-backup-host-restic " . $repo . " " . @@ -1318,7 +1316,7 @@ } if (empty($_SESSION["error_msg"])) { if ($_POST["v_backup_incremental"] !== "yes" && $_SESSION["BACKUP_INCREMENTAL"] === "yes") { - exec(HESTIA_CMD . "v-delete-backup-host-restic ", $output, $return); + exec(TULIO_CMD . "v-delete-backup-host-restic ", $output, $return); check_return_code($return_var, $output); unset($output); $v_backup_incremental = ""; @@ -1332,7 +1330,7 @@ } if (empty($_SESSION["error_msg"])) { if ($_POST["v_backup_incremental"] === "yes" && $_SESSION["BACKUP_INCREMENTAL"] === "yes") { - exec(HESTIA_CMD . "v-delete-backup-host-restic ", $output, $return); + exec(TULIO_CMD . "v-delete-backup-host-restic ", $output, $return); check_return_code($return_var, $output); unset($output); $repo = quoteshellarg($_POST["v_repo"]); @@ -1343,7 +1341,7 @@ $keep_yearly = quoteshellarg($_POST["v_keep_yearly"]); exec( - HESTIA_CMD . + TULIO_CMD . "v-add-backup-host-restic " . $repo . " " . @@ -1377,7 +1375,7 @@ $_SESSION["error_msg"] = _("Inactive session timeout can not lower than 1 minute."); } else { exec( - HESTIA_CMD . + TULIO_CMD . "v-change-sys-config-value INACTIVE_SESSION_TIMEOUT " . quoteshellarg($_POST["v_inactive_session_timeout"]), $output, @@ -1397,7 +1395,7 @@ if (empty($_SESSION["error_msg"])) { if ($_POST["v_policy_csrf_strictness"] != $_SESSION["POLICY_CSRF_STRICTNESS"]) { exec( - HESTIA_CMD . + TULIO_CMD . "v-change-sys-config-value POLICY_CSRF_STRICTNESS " . quoteshellarg($_POST["v_policy_csrf_strictness"]), $output, @@ -1416,7 +1414,7 @@ if (empty($_SESSION["error_msg"])) { if ($_POST["v_enforce_subdomain_ownership"] != $_SESSION["ENFORCE_SUBDOMAIN_OWNERSHIP"]) { exec( - HESTIA_CMD . + TULIO_CMD . "v-change-sys-config-value ENFORCE_SUBDOMAIN_OWNERSHIP " . quoteshellarg($_POST["v_enforce_subdomain_ownership"]), $output, @@ -1435,7 +1433,7 @@ if (empty($_SESSION["error_msg"])) { if ($_POST["v_policy_user_edit_details"] != $_SESSION["POLICY_USER_EDIT_DETAILS"]) { exec( - HESTIA_CMD . + TULIO_CMD . "v-change-sys-config-value POLICY_USER_EDIT_DETAILS " . quoteshellarg($_POST["v_policy_user_edit_details"]), $output, @@ -1457,7 +1455,7 @@ $_SESSION["POLICY_USER_EDIT_WEB_TEMPLATES"] ) { exec( - HESTIA_CMD . + TULIO_CMD . "v-change-sys-config-value POLICY_USER_EDIT_WEB_TEMPLATES " . quoteshellarg($_POST["v_policy_user_edit_web_templates"]), $output, @@ -1479,7 +1477,7 @@ $_SESSION["POLICY_USER_EDIT_DNS_TEMPLATES"] ) { exec( - HESTIA_CMD . + TULIO_CMD . "v-change-sys-config-value POLICY_USER_EDIT_DNS_TEMPLATES " . quoteshellarg($_POST["v_policy_user_edit_dns_templates"]), $output, @@ -1501,7 +1499,7 @@ ) { if (empty($_SESSION["error_msg"])) { if ($_POST["v_api"] == "no" && $_POST["v_api_system"] === 0) { - exec(HESTIA_CMD . "v-change-sys-api 'disable'", $output, $return_var); + exec(TULIO_CMD . "v-change-sys-api 'disable'", $output, $return_var); check_return_code($return_var, $output); unset($output); } @@ -1511,7 +1509,7 @@ $_POST["v_api_system"] != $_SESSION["API_SYSTEM"]) || $_POST["v_api"] != $_SESSION["API"] ) { - exec(HESTIA_CMD . "v-change-sys-api 'enable'", $output, $return_var); + exec(TULIO_CMD . "v-change-sys-api 'enable'", $output, $return_var); check_return_code($return_var, $output); unset($output); } @@ -1519,7 +1517,7 @@ if (empty($_SESSION["error_msg"])) { if ($_POST["v_api_system"] != $_SESSION["API_SYSTEM"]) { exec( - HESTIA_CMD . + TULIO_CMD . "v-change-sys-config-value API_SYSTEM " . quoteshellarg($_POST["v_api_system"]), $output, @@ -1542,7 +1540,7 @@ $api_status = "yes"; } exec( - HESTIA_CMD . "v-change-sys-config-value API " . quoteshellarg($api_status), + TULIO_CMD . "v-change-sys-config-value API " . quoteshellarg($api_status), $output, $return_var, ); @@ -1570,7 +1568,7 @@ } if (implode(",", $ips) != $_SESSION["API_ALLOWED_IP"]) { exec( - HESTIA_CMD . + TULIO_CMD . "v-change-sys-config-value API_ALLOWED_IP " . quoteshellarg(implode(",", $ips)), $output, @@ -1591,7 +1589,7 @@ if (empty($_SESSION["error_msg"])) { if ($_POST["v_policy_user_view_logs"] != $_SESSION["POLICY_USER_VIEW_LOGS"]) { exec( - HESTIA_CMD . + TULIO_CMD . "v-change-sys-config-value POLICY_USER_VIEW_LOGS " . quoteshellarg($_POST["v_policy_user_view_logs"]), $output, @@ -1610,7 +1608,7 @@ if (empty($_SESSION["error_msg"])) { if ($_POST["v_policy_user_delete_logs"] != $_SESSION["POLICY_USER_DELETE_LOGS"]) { exec( - HESTIA_CMD . + TULIO_CMD . "v-change-sys-config-value POLICY_USER_DELETE_LOGS " . quoteshellarg($_POST["v_policy_user_delete_logs"]), $output, @@ -1629,7 +1627,7 @@ if (empty($_SESSION["error_msg"])) { if ($_POST["v_policy_system_password_reset"] != $_SESSION["POLICY_SYSTEM_PASSWORD_RESET"]) { exec( - HESTIA_CMD . + TULIO_CMD . "v-change-sys-config-value POLICY_SYSTEM_PASSWORD_RESET " . quoteshellarg($_POST["v_policy_system_password_reset"]), $output, @@ -1652,7 +1650,7 @@ $_SESSION["POLICY_SYSTEM_PROTECTED_ADMIN"] ) { exec( - HESTIA_CMD . + TULIO_CMD . "v-change-sys-config-value POLICY_SYSTEM_PROTECTED_ADMIN " . quoteshellarg($_POST["v_policy_system_protected_admin"]), $output, @@ -1676,7 +1674,7 @@ !empty($_SESSION["POLICY_USER_VIEW_SUSPENDED"]) ) { exec( - HESTIA_CMD . + TULIO_CMD . "v-change-sys-config-value POLICY_USER_VIEW_SUSPENDED " . quoteshellarg($_POST["v_policy_user_view_suspended"]), $output, @@ -1704,7 +1702,7 @@ } if ($_POST["v_policy_user_change_theme"] != $_SESSION["POLICY_USER_CHANGE_THEME"]) { exec( - HESTIA_CMD . + TULIO_CMD . "v-change-sys-config-value POLICY_USER_CHANGE_THEME " . quoteshellarg($_POST["v_policy_user_change_theme"]), $output, @@ -1727,7 +1725,7 @@ if (!empty($_POST["v_policy_system_hide_admin"])) { if ($_POST["v_policy_system_hide_admin"] != $_SESSION["POLICY_SYSTEM_HIDE_ADMIN"]) { exec( - HESTIA_CMD . + TULIO_CMD . "v-change-sys-config-value POLICY_SYSTEM_HIDE_ADMIN " . quoteshellarg($_POST["v_policy_system_hide_admin"]), $output, @@ -1750,7 +1748,7 @@ $_POST["v_policy_system_hide_services"] != $_SESSION["POLICY_SYSTEM_HIDE_SERVICES"] ) { exec( - HESTIA_CMD . + TULIO_CMD . "v-change-sys-config-value POLICY_SYSTEM_HIDE_SERVICES " . quoteshellarg($_POST["v_policy_system_hide_services"]), $output, @@ -1771,7 +1769,7 @@ $_POST["v_policy_backup_suspended_users"] != $_SESSION["POLICY_BACKUP_SUSPENDED_USERS"] ) { exec( - HESTIA_CMD . + TULIO_CMD . "v-change-sys-config-value POLICY_BACKUP_SUSPENDED_USERS " . quoteshellarg($_POST["v_policy_backup_suspended_users"]), $output, @@ -1789,7 +1787,7 @@ if (empty($_SESSION["error_msg"])) { if ($_POST["v_policy_sync_error_documents"] != $_SESSION["POLICY_SYNC_ERROR_DOCUMENTS"]) { exec( - HESTIA_CMD . + TULIO_CMD . "v-change-sys-config-value POLICY_SYNC_ERROR_DOCUMENTS " . quoteshellarg($_POST["v_policy_sync_error_documents"]), $output, @@ -1806,7 +1804,7 @@ if (empty($_SESSION["error_msg"])) { if ($_POST["v_policy_sync_skeleton"] != $_SESSION["POLICY_SYNC_SKELETON"]) { exec( - HESTIA_CMD . + TULIO_CMD . "v-change-sys-config-value POLICY_SYNC_SKELETON " . quoteshellarg($_POST["v_policy_sync_skeleton"]), $output, @@ -1825,7 +1823,7 @@ if (empty($_SESSION["error_msg"])) { if ($_POST["v_login_style"] != $_SESSION["LOGIN_STYLE"]) { exec( - HESTIA_CMD . + TULIO_CMD . "v-change-sys-config-value LOGIN_STYLE " . quoteshellarg($_POST["v_login_style"]), $output, @@ -1865,24 +1863,24 @@ fclose($fp); } - exec(HESTIA_CMD . "v-change-sys-tulio-ssl " . $tmpdir, $output, $return_var); + exec(TULIO_CMD . "v-change-sys-tulio-ssl " . $tmpdir, $output, $return_var); check_return_code($return_var, $output); unset($output); // List ssl certificate info - exec(HESTIA_CMD . "v-list-sys-tulio-ssl json", $output, $return_var); + exec(TULIO_CMD . "v-list-sys-tulio-ssl json", $output, $return_var); $ssl_str = json_decode(implode("", $output), true); unset($output); - $v_ssl_crt = $ssl_str["HESTIA"]["CRT"]; - $v_ssl_key = $ssl_str["HESTIA"]["KEY"]; - $v_ssl_ca = $ssl_str["HESTIA"]["CA"]; - $v_ssl_subject = $ssl_str["HESTIA"]["SUBJECT"]; - $v_ssl_aliases = $ssl_str["HESTIA"]["ALIASES"]; - $v_ssl_not_before = $ssl_str["HESTIA"]["NOT_BEFORE"]; - $v_ssl_not_after = $ssl_str["HESTIA"]["NOT_AFTER"]; - $v_ssl_signature = $ssl_str["HESTIA"]["SIGNATURE"]; - $v_ssl_pub_key = $ssl_str["HESTIA"]["PUB_KEY"]; - $v_ssl_issuer = $ssl_str["HESTIA"]["ISSUER"]; + $v_ssl_crt = $ssl_str["TULIO"]["CRT"]; + $v_ssl_key = $ssl_str["TULIO"]["KEY"]; + $v_ssl_ca = $ssl_str["TULIO"]["CA"]; + $v_ssl_subject = $ssl_str["TULIO"]["SUBJECT"]; + $v_ssl_aliases = $ssl_str["TULIO"]["ALIASES"]; + $v_ssl_not_before = $ssl_str["TULIO"]["NOT_BEFORE"]; + $v_ssl_not_after = $ssl_str["TULIO"]["NOT_AFTER"]; + $v_ssl_signature = $ssl_str["TULIO"]["SIGNATURE"]; + $v_ssl_pub_key = $ssl_str["TULIO"]["PUB_KEY"]; + $v_ssl_issuer = $ssl_str["TULIO"]["ISSUER"]; // Cleanup certificate tempfiles if (file_exists($tmpdir . "/certificate.crt")) { @@ -1908,7 +1906,7 @@ } // Check system configuration -exec(HESTIA_CMD . "v-list-sys-config json", $output, $return_var); +exec(TULIO_CMD . "v-list-sys-config json", $output, $return_var); $data = json_decode(implode("", $output), true); unset($output); diff --git a/web/edit/server/mariadb/index.php b/web/edit/server/mariadb/index.php index fb43900d1..228671ff1 100644 --- a/web/edit/server/mariadb/index.php +++ b/web/edit/server/mariadb/index.php @@ -30,7 +30,7 @@ fwrite($fp, str_replace("\r\n", "\n", $_POST["v_config"])); fclose($fp); exec( - HESTIA_CMD . "v-change-sys-service-config " . $new_conf . " mariadb " . $v_restart, + TULIO_CMD . "v-change-sys-service-config " . $new_conf . " mariadb " . $v_restart, $output, $return_var, ); @@ -46,7 +46,7 @@ } // List config -exec(HESTIA_CMD . "v-list-sys-mysql-config json", $output, $return_var); +exec(TULIO_CMD . "v-list-sys-mysql-config json", $output, $return_var); $data = json_decode(implode("", $output), true); unset($output); $v_max_user_connections = $data["CONFIG"]["max_user_connections"]; @@ -58,7 +58,7 @@ $v_service_name = strtoupper("mariadb"); # Read config -$v_config = shell_exec(HESTIA_CMD . "v-open-fs-config " . $v_config_path); +$v_config = shell_exec(TULIO_CMD . "v-open-fs-config " . $v_config_path); // Render page render_page($user, $TAB, "edit_server_mysql"); diff --git a/web/edit/server/mysql/index.php b/web/edit/server/mysql/index.php index b632f7119..3f77302c5 100644 --- a/web/edit/server/mysql/index.php +++ b/web/edit/server/mysql/index.php @@ -30,7 +30,7 @@ fwrite($fp, str_replace("\r\n", "\n", $_POST["v_config"])); fclose($fp); exec( - HESTIA_CMD . "v-change-sys-service-config " . $new_conf . " mysql " . $v_restart, + TULIO_CMD . "v-change-sys-service-config " . $new_conf . " mysql " . $v_restart, $output, $return_var, ); @@ -46,7 +46,7 @@ } // List config -exec(HESTIA_CMD . "v-list-sys-mysql-config json", $output, $return_var); +exec(TULIO_CMD . "v-list-sys-mysql-config json", $output, $return_var); $data = json_decode(implode("", $output), true); unset($output); $v_max_user_connections = $data["CONFIG"]["max_user_connections"]; @@ -58,7 +58,7 @@ $v_service_name = strtoupper("mysql"); # Read config -$v_config = shell_exec(HESTIA_CMD . "v-open-fs-config " . $v_config_path); +$v_config = shell_exec(TULIO_CMD . "v-open-fs-config " . $v_config_path); // Render page render_page($user, $TAB, "edit_server_mysql"); diff --git a/web/edit/server/mysqld/index.php b/web/edit/server/mysqld/index.php index 98a9fec54..71361ffe4 100644 --- a/web/edit/server/mysqld/index.php +++ b/web/edit/server/mysqld/index.php @@ -30,7 +30,7 @@ fwrite($fp, str_replace("\r\n", "\n", $_POST["v_config"])); fclose($fp); exec( - HESTIA_CMD . "v-change-sys-service-config " . $new_conf . " mysqld " . $v_restart, + TULIO_CMD . "v-change-sys-service-config " . $new_conf . " mysqld " . $v_restart, $output, $return_var, ); @@ -46,7 +46,7 @@ } // List config -exec(HESTIA_CMD . "v-list-sys-mysql-config json", $output, $return_var); +exec(TULIO_CMD . "v-list-sys-mysql-config json", $output, $return_var); $data = json_decode(implode("", $output), true); unset($output); $v_max_user_connections = $data["CONFIG"]["max_user_connections"]; @@ -58,7 +58,7 @@ $v_service_name = strtoupper("mysql"); # Read config -$v_config = shell_exec(HESTIA_CMD . "v-open-fs-config " . $v_config_path); +$v_config = shell_exec(TULIO_CMD . "v-open-fs-config " . $v_config_path); // Render page render_page($user, $TAB, "edit_server_mysql"); diff --git a/web/edit/server/named/index.php b/web/edit/server/named/index.php index 6a5e49248..a5ee3ede4 100644 --- a/web/edit/server/named/index.php +++ b/web/edit/server/named/index.php @@ -30,7 +30,7 @@ fwrite($fp, str_replace("\r\n", "\n", $_POST["v_config"])); fclose($fp); exec( - HESTIA_CMD . "v-change-sys-service-config " . $new_conf . " named " . $v_restart, + TULIO_CMD . "v-change-sys-service-config " . $new_conf . " named " . $v_restart, $output, $return_var, ); @@ -49,7 +49,7 @@ $v_service_name = strtoupper("named"); // Read config -$v_config = shell_exec(HESTIA_CMD . "v-open-fs-config " . $v_config_path); +$v_config = shell_exec(TULIO_CMD . "v-open-fs-config " . $v_config_path); // Render page render_page($user, $TAB, "edit_server_service"); diff --git a/web/edit/server/nginx/index.php b/web/edit/server/nginx/index.php index e6980de47..19bb35692 100644 --- a/web/edit/server/nginx/index.php +++ b/web/edit/server/nginx/index.php @@ -30,7 +30,7 @@ fwrite($fp, str_replace("\r\n", "\n", $_POST["v_config"])); fclose($fp); exec( - HESTIA_CMD . "v-change-sys-service-config " . $new_conf . " nginx " . $v_restart, + TULIO_CMD . "v-change-sys-service-config " . $new_conf . " nginx " . $v_restart, $output, $return_var, ); @@ -46,7 +46,7 @@ } // List config -exec(HESTIA_CMD . "v-list-sys-nginx-config json", $output, $return_var); +exec(TULIO_CMD . "v-list-sys-nginx-config json", $output, $return_var); $data = json_decode(implode("", $output), true); unset($output); $v_worker_processes = $data["CONFIG"]["worker_processes"]; @@ -63,7 +63,7 @@ $v_service_name = strtoupper("nginx"); // Read config -$v_config = shell_exec(HESTIA_CMD . "v-open-fs-config " . $v_config_path); +$v_config = shell_exec(TULIO_CMD . "v-open-fs-config " . $v_config_path); // Render page render_page($user, $TAB, "edit_server_nginx"); diff --git a/web/edit/server/php-fpm/index.php b/web/edit/server/php-fpm/index.php index a9ec18500..7bc709fe7 100644 --- a/web/edit/server/php-fpm/index.php +++ b/web/edit/server/php-fpm/index.php @@ -30,7 +30,7 @@ fwrite($fp, str_replace("\r\n", "\n", $_POST["v_config"])); fclose($fp); exec( - HESTIA_CMD . "v-change-sys-service-config " . $new_conf . " php " . $v_restart, + TULIO_CMD . "v-change-sys-service-config " . $new_conf . " php " . $v_restart, $output, $return_var, ); @@ -46,7 +46,7 @@ } // List config -exec(HESTIA_CMD . "v-list-sys-php-config json", $output, $return_var); +exec(TULIO_CMD . "v-list-sys-php-config json", $output, $return_var); $data = json_decode(implode("", $output), true); unset($output); $v_memory_limit = $data["CONFIG"]["memory_limit"]; @@ -59,7 +59,7 @@ $v_config_path = $data["CONFIG"]["config_path"]; # Read config -$v_config = shell_exec(HESTIA_CMD . "v-open-fs-config " . $v_config_path); +$v_config = shell_exec(TULIO_CMD . "v-open-fs-config " . $v_config_path); // Render page render_page($user, $TAB, "edit_server_php"); diff --git a/web/edit/server/php/index.php b/web/edit/server/php/index.php index a9ec18500..7bc709fe7 100644 --- a/web/edit/server/php/index.php +++ b/web/edit/server/php/index.php @@ -30,7 +30,7 @@ fwrite($fp, str_replace("\r\n", "\n", $_POST["v_config"])); fclose($fp); exec( - HESTIA_CMD . "v-change-sys-service-config " . $new_conf . " php " . $v_restart, + TULIO_CMD . "v-change-sys-service-config " . $new_conf . " php " . $v_restart, $output, $return_var, ); @@ -46,7 +46,7 @@ } // List config -exec(HESTIA_CMD . "v-list-sys-php-config json", $output, $return_var); +exec(TULIO_CMD . "v-list-sys-php-config json", $output, $return_var); $data = json_decode(implode("", $output), true); unset($output); $v_memory_limit = $data["CONFIG"]["memory_limit"]; @@ -59,7 +59,7 @@ $v_config_path = $data["CONFIG"]["config_path"]; # Read config -$v_config = shell_exec(HESTIA_CMD . "v-open-fs-config " . $v_config_path); +$v_config = shell_exec(TULIO_CMD . "v-open-fs-config " . $v_config_path); // Render page render_page($user, $TAB, "edit_server_php"); diff --git a/web/edit/server/php5-fpm/index.php b/web/edit/server/php5-fpm/index.php index a9ec18500..7bc709fe7 100644 --- a/web/edit/server/php5-fpm/index.php +++ b/web/edit/server/php5-fpm/index.php @@ -30,7 +30,7 @@ fwrite($fp, str_replace("\r\n", "\n", $_POST["v_config"])); fclose($fp); exec( - HESTIA_CMD . "v-change-sys-service-config " . $new_conf . " php " . $v_restart, + TULIO_CMD . "v-change-sys-service-config " . $new_conf . " php " . $v_restart, $output, $return_var, ); @@ -46,7 +46,7 @@ } // List config -exec(HESTIA_CMD . "v-list-sys-php-config json", $output, $return_var); +exec(TULIO_CMD . "v-list-sys-php-config json", $output, $return_var); $data = json_decode(implode("", $output), true); unset($output); $v_memory_limit = $data["CONFIG"]["memory_limit"]; @@ -59,7 +59,7 @@ $v_config_path = $data["CONFIG"]["config_path"]; # Read config -$v_config = shell_exec(HESTIA_CMD . "v-open-fs-config " . $v_config_path); +$v_config = shell_exec(TULIO_CMD . "v-open-fs-config " . $v_config_path); // Render page render_page($user, $TAB, "edit_server_php"); diff --git a/web/edit/server/postgresql/index.php b/web/edit/server/postgresql/index.php index 539d6d2c6..feb9cb4c6 100644 --- a/web/edit/server/postgresql/index.php +++ b/web/edit/server/postgresql/index.php @@ -30,7 +30,7 @@ fwrite($fp, str_replace("\r\n", "\n", $_POST["v_options"])); fclose($fp); exec( - HESTIA_CMD . + TULIO_CMD . "v-change-sys-service-config " . $new_conf . " postgresql-hba " . @@ -51,7 +51,7 @@ fwrite($fp, str_replace("\r\n", "\n", $_POST["v_config"])); fclose($fp); exec( - HESTIA_CMD . "v-change-sys-service-config " . $new_conf . " postgresql " . $v_restart, + TULIO_CMD . "v-change-sys-service-config " . $new_conf . " postgresql " . $v_restart, $output, $return_var, ); @@ -67,7 +67,7 @@ } // List config -exec(HESTIA_CMD . "v-list-sys-pgsql-config json", $output, $return_var); +exec(TULIO_CMD . "v-list-sys-pgsql-config json", $output, $return_var); $data = json_decode(implode("", $output), true); unset($output); @@ -76,8 +76,8 @@ $v_service_name = strtoupper("postgresql"); // Read config -$v_options = shell_exec(HESTIA_CMD . "v-open-fs-config " . $v_options_path); -$v_config = shell_exec(HESTIA_CMD . "v-open-fs-config " . $v_config_path); +$v_options = shell_exec(TULIO_CMD . "v-open-fs-config " . $v_options_path); +$v_config = shell_exec(TULIO_CMD . "v-open-fs-config " . $v_config_path); // Render page render_page($user, $TAB, "edit_server_pgsql"); diff --git a/web/edit/server/proftpd/index.php b/web/edit/server/proftpd/index.php index 450be4363..1a7f70891 100644 --- a/web/edit/server/proftpd/index.php +++ b/web/edit/server/proftpd/index.php @@ -30,7 +30,7 @@ fwrite($fp, str_replace("\r\n", "\n", $_POST["v_config"])); fclose($fp); exec( - HESTIA_CMD . "v-change-sys-service-config " . $new_conf . " proftpd " . $v_restart, + TULIO_CMD . "v-change-sys-service-config " . $new_conf . " proftpd " . $v_restart, $output, $return_var, ); @@ -45,11 +45,11 @@ } } -$v_config_path = shell_exec(HESTIA_CMD . "v-list-sys-proftpd-config plain"); +$v_config_path = shell_exec(TULIO_CMD . "v-list-sys-proftpd-config plain"); $v_service_name = strtoupper("proftpd"); // Read config -$v_config = shell_exec(HESTIA_CMD . "v-open-fs-config " . $v_config_path); +$v_config = shell_exec(TULIO_CMD . "v-open-fs-config " . $v_config_path); // Render page render_page($user, $TAB, "edit_server_service"); diff --git a/web/edit/server/spamassassin/index.php b/web/edit/server/spamassassin/index.php index 340192427..e26a31cc7 100644 --- a/web/edit/server/spamassassin/index.php +++ b/web/edit/server/spamassassin/index.php @@ -30,7 +30,7 @@ fwrite($fp, str_replace("\r\n", "\n", $_POST["v_config"])); fclose($fp); exec( - HESTIA_CMD . "v-change-sys-service-config " . $new_conf . " spamassassin " . $v_restart, + TULIO_CMD . "v-change-sys-service-config " . $new_conf . " spamassassin " . $v_restart, $output, $return_var, ); @@ -45,11 +45,11 @@ } } -$v_config_path = shell_exec(HESTIA_CMD . "v-list-sys-spamd-config plain"); +$v_config_path = shell_exec(TULIO_CMD . "v-list-sys-spamd-config plain"); $v_service_name = strtoupper("spamassassin"); // Read config -$v_config = shell_exec(HESTIA_CMD . "v-open-fs-config " . $v_config_path); +$v_config = shell_exec(TULIO_CMD . "v-open-fs-config " . $v_config_path); // Render page render_page($user, $TAB, "edit_server_service"); diff --git a/web/edit/server/spamd/index.php b/web/edit/server/spamd/index.php index 7fbb8b16a..549865a1e 100644 --- a/web/edit/server/spamd/index.php +++ b/web/edit/server/spamd/index.php @@ -30,7 +30,7 @@ fwrite($fp, str_replace("\r\n", "\n", $_POST["v_config"])); fclose($fp); exec( - HESTIA_CMD . "v-change-sys-service-config " . $new_conf . " spamd " . $v_restart, + TULIO_CMD . "v-change-sys-service-config " . $new_conf . " spamd " . $v_restart, $output, $return_var, ); @@ -45,11 +45,11 @@ } } -$v_config_path = shell_exec(HESTIA_CMD . "v-list-sys-spamd-config plain"); +$v_config_path = shell_exec(TULIO_CMD . "v-list-sys-spamd-config plain"); $v_service_name = strtoupper("spamassassin"); // Read config -$v_config = shell_exec(HESTIA_CMD . "v-open-fs-config " . $v_config_path); +$v_config = shell_exec(TULIO_CMD . "v-open-fs-config " . $v_config_path); // Render page render_page($user, $TAB, "edit_server_service"); diff --git a/web/edit/server/ssh/index.php b/web/edit/server/ssh/index.php index 7ab0ab42d..16347a418 100644 --- a/web/edit/server/ssh/index.php +++ b/web/edit/server/ssh/index.php @@ -30,7 +30,7 @@ fwrite($fp, str_replace("\r\n", "\n", $_POST["v_config"])); fclose($fp); exec( - HESTIA_CMD . "v-change-sys-service-config " . $new_conf . " ssh " . $v_restart, + TULIO_CMD . "v-change-sys-service-config " . $new_conf . " ssh " . $v_restart, $output, $return_var, ); @@ -49,7 +49,7 @@ $v_service_name = strtoupper("ssh"); // Read config -$v_config = shell_exec(HESTIA_CMD . "v-open-fs-config " . $v_config_path); +$v_config = shell_exec(TULIO_CMD . "v-open-fs-config " . $v_config_path); // Render page render_page($user, $TAB, "edit_server_service"); diff --git a/web/edit/server/tulioweb/index.php b/web/edit/server/tulioweb/index.php index 0cf0164bd..00621b965 100644 --- a/web/edit/server/tulioweb/index.php +++ b/web/edit/server/tulioweb/index.php @@ -23,10 +23,7 @@ } fwrite($fp, $config); exec( - HESTIA_CMD . - "v-change-sys-service-config " . - quoteshellarg($new_conf) . - " tulioweb yes", + TULIO_CMD . "v-change-sys-service-config " . quoteshellarg($new_conf) . " tulioweb yes", $output, $return_var, ); @@ -40,7 +37,7 @@ $v_service_name = _("Panel Cronjobs"); // Read config -$v_config = shell_exec(HESTIA_CMD . "v-open-fs-config " . $v_config_path); +$v_config = shell_exec(TULIO_CMD . "v-open-fs-config " . $v_config_path); // Render page render_page($user, $TAB, "edit_server_service"); diff --git a/web/edit/server/vsftpd/index.php b/web/edit/server/vsftpd/index.php index 7d0a3154d..c0545c12d 100644 --- a/web/edit/server/vsftpd/index.php +++ b/web/edit/server/vsftpd/index.php @@ -30,7 +30,7 @@ fwrite($fp, str_replace("\r\n", "\n", $_POST["v_config"])); fclose($fp); exec( - HESTIA_CMD . "v-change-sys-service-config " . $new_conf . " vsftpd " . $v_restart, + TULIO_CMD . "v-change-sys-service-config " . $new_conf . " vsftpd " . $v_restart, $output, $return_var, ); @@ -45,11 +45,11 @@ } } -$v_config_path = shell_exec(HESTIA_CMD . "v-list-sys-vsftpd-config plain"); +$v_config_path = shell_exec(TULIO_CMD . "v-list-sys-vsftpd-config plain"); $v_service_name = strtoupper("vsftpd"); // Read config -$v_config = shell_exec(HESTIA_CMD . "v-open-fs-config " . $v_config_path); +$v_config = shell_exec(TULIO_CMD . "v-open-fs-config " . $v_config_path); // Render page render_page($user, $TAB, "edit_server_service"); diff --git a/web/edit/server/whitelabel/index.php b/web/edit/server/whitelabel/index.php index 16a9c343b..e8ffed836 100644 --- a/web/edit/server/whitelabel/index.php +++ b/web/edit/server/whitelabel/index.php @@ -15,16 +15,14 @@ if (!empty($_POST)) { if (!empty($_POST["v_app_name"]) && $_SESSION["APP_NAME"] != $_POST["v_app_name"]) { exec( - HESTIA_CMD . - "v-change-sys-config-value APP_NAME " . - quoteshellarg($_POST["v_app_name"]), + TULIO_CMD . "v-change-sys-config-value APP_NAME " . quoteshellarg($_POST["v_app_name"]), $output, $return_var, ); } if (!empty($_POST["v_title"]) && $_SESSION["TITLE"] != $_POST["v_title"]) { exec( - HESTIA_CMD . "v-change-sys-config-value TITLE " . quoteshellarg($_POST["v_title"]), + TULIO_CMD . "v-change-sys-config-value TITLE " . quoteshellarg($_POST["v_title"]), $output, $return_var, ); @@ -34,7 +32,7 @@ $_SESSION["SUBJECT_EMAIL"] != $_POST["v_subject_email"] ) { exec( - HESTIA_CMD . + TULIO_CMD . "v-change-sys-config-value SUBJECT_EMAIL " . quoteshellarg($_POST["v_subject_email"]), $output, @@ -43,7 +41,7 @@ } if (!empty($_POST["v_hide_docs"]) && $_SESSION["HIDE_DOCS"] != $_POST["v_hide_docs"]) { exec( - HESTIA_CMD . + TULIO_CMD . "v-change-sys-config-value HIDE_DOCS " . quoteshellarg($_POST["v_hide_docs"]), $output, @@ -53,7 +51,7 @@ if (!empty($_POST["v_from_name"]) && $_SESSION["FROM_NAME"] != $_POST["v_from_name"]) { exec( - HESTIA_CMD . + TULIO_CMD . "v-change-sys-config-value FROM_NAME " . quoteshellarg($_POST["v_from_name"]), $output, @@ -62,7 +60,7 @@ } if (!empty($_POST["v_from_email"]) && $_SESSION["FROM_EMAIL"] != $_POST["v_from_email"]) { exec( - HESTIA_CMD . + TULIO_CMD . "v-change-sys-config-value FROM_EMAIL " . quoteshellarg($_POST["v_from_email"]), $output, @@ -71,7 +69,7 @@ } if (!empty($_POST["v_hide_docs"]) && $_SESSION["HIDE_DOCS"] != $_POST["v_hide_docs"]) { exec( - HESTIA_CMD . + TULIO_CMD . "v-change-sys-config-value HIDE_DOCS " . quoteshellarg($_POST["v_hide_docs"]), $output, @@ -79,15 +77,15 @@ ); } if (!empty($_POST["v_update_logo"])) { - exec(HESTIA_CMD . "v-update-white-label-logo"); + exec(TULIO_CMD . "v-update-white-label-logo"); } if (!empty($_POST["v_reset_logo"])) { - exec(HESTIA_CMD . "v-update-white-label-logo yes yes"); + exec(TULIO_CMD . "v-update-white-label-logo yes yes"); } } // Check system configuration -exec(HESTIA_CMD . "v-list-sys-config json", $output, $return_var); +exec(TULIO_CMD . "v-list-sys-config json", $output, $return_var); $data = json_decode(implode("", $output), true); unset($output); diff --git a/web/edit/user/index.php b/web/edit/user/index.php index b3c6c0cd5..39fbafa8c 100644 --- a/web/edit/user/index.php +++ b/web/edit/user/index.php @@ -40,7 +40,7 @@ verify_csrf($_GET); // List user -exec(HESTIA_CMD . "v-list-user " . quoteshellarg($v_username) . " json", $output, $return_var); +exec(TULIO_CMD . "v-list-user " . quoteshellarg($v_username) . " json", $output, $return_var); check_return_code_redirect($return_var, $output, "/list/user/"); $data = json_decode(implode("", $output), true); @@ -119,12 +119,12 @@ } // List packages -exec(HESTIA_CMD . "v-list-user-packages json", $output, $return_var); +exec(TULIO_CMD . "v-list-user-packages json", $output, $return_var); $packages = json_decode(implode("", $output), true); unset($output); // List languages -exec(HESTIA_CMD . "v-list-sys-languages json", $output, $return_var); +exec(TULIO_CMD . "v-list-sys-languages json", $output, $return_var); $language = json_decode(implode("", $output), true); foreach ($language as $lang) { $languages[$lang] = translate_json($lang); @@ -133,18 +133,18 @@ unset($output); // List themes -exec(HESTIA_CMD . "v-list-sys-themes json", $output, $return_var); +exec(TULIO_CMD . "v-list-sys-themes json", $output, $return_var); $themes = json_decode(implode("", $output), true); unset($output); // List shells -exec(HESTIA_CMD . "v-list-sys-shells json", $output, $return_var); +exec(TULIO_CMD . "v-list-sys-shells json", $output, $return_var); $shells = json_decode(implode("", $output), true); unset($output); //List PHP Versions // List supported php versions -exec(HESTIA_CMD . "v-list-sys-php json", $output, $return_var); +exec(TULIO_CMD . "v-list-sys-php json", $output, $return_var); $php_versions = json_decode(implode("", $output), true); unset($output); @@ -166,7 +166,7 @@ fwrite($fp, $_POST["v_password"] . "\n"); fclose($fp); exec( - HESTIA_CMD . + TULIO_CMD . "v-change-user-password " . quoteshellarg($v_username) . " " . @@ -183,13 +183,13 @@ // Enable twofa if (!empty($_POST["v_twofa"]) && empty($v_twofa) && empty($_SESSION["error_msg"])) { - exec(HESTIA_CMD . "v-add-user-2fa " . quoteshellarg($v_username), $output, $return_var); + exec(TULIO_CMD . "v-add-user-2fa " . quoteshellarg($v_username), $output, $return_var); check_return_code($return_var, $output); unset($output); // List user exec( - HESTIA_CMD . "v-list-user " . quoteshellarg($v_username) . " json", + TULIO_CMD . "v-list-user " . quoteshellarg($v_username) . " json", $output, $return_var, ); @@ -204,7 +204,7 @@ // Disable twofa if (empty($_POST["v_twofa"]) && !empty($v_twofa) && empty($_SESSION["error_msg"])) { - exec(HESTIA_CMD . "v-delete-user-2fa " . quoteshellarg($v_username), $output, $return_var); + exec(TULIO_CMD . "v-delete-user-2fa " . quoteshellarg($v_username), $output, $return_var); check_return_code($return_var, $output); unset($output); $v_twofa = ""; @@ -215,7 +215,7 @@ if ($v_sort_order != $_POST["v_sort_order"] && empty($_SESSION["error_msg"])) { $v_sort_order = quoteshellarg($_POST["v_sort_order"]); exec( - HESTIA_CMD . + TULIO_CMD . "v-change-user-sort-order " . quoteshellarg($v_username) . " " . @@ -241,7 +241,7 @@ $_POST["v_login_disabled"] = "no"; } exec( - HESTIA_CMD . + TULIO_CMD . "v-change-user-config-value " . quoteshellarg($v_username) . " LOGIN_DISABLED " . @@ -267,7 +267,7 @@ $_POST["v_login_use_iplist"] = "no"; } exec( - HESTIA_CMD . + TULIO_CMD . "v-change-user-config-value " . quoteshellarg($v_username) . " LOGIN_USE_IPLIST " . @@ -277,7 +277,7 @@ ); if ($_POST["v_login_use_iplist"] === "no") { exec( - HESTIA_CMD . + TULIO_CMD . "v-change-user-config-value " . quoteshellarg($v_username) . " LOGIN_ALLOW_IPS ''", @@ -287,7 +287,7 @@ $v_login_allowed_ips = ""; } else { exec( - HESTIA_CMD . + TULIO_CMD . "v-change-user-config-value " . quoteshellarg($v_username) . " LOGIN_ALLOW_IPS " . @@ -313,7 +313,7 @@ ) { $v_package = quoteshellarg($_POST["v_package"]); exec( - HESTIA_CMD . + TULIO_CMD . "v-change-user-package " . quoteshellarg($v_username) . " " . @@ -333,11 +333,7 @@ ) { $v_phpcli = quoteshellarg($_POST["v_phpcli"]); exec( - HESTIA_CMD . - "v-change-user-php-cli " . - quoteshellarg($v_username) . - " " . - $v_phpcli, + TULIO_CMD . "v-change-user-php-cli " . quoteshellarg($v_username) . " " . $v_phpcli, $output, $return_var, ); @@ -356,7 +352,7 @@ if (!empty($_POST["v_role"])) { $v_role = quoteshellarg($_POST["v_role"]); exec( - HESTIA_CMD . "v-change-user-role " . quoteshellarg($v_username) . " " . $v_role, + TULIO_CMD . "v-change-user-role " . quoteshellarg($v_username) . " " . $v_role, $output, $return_var, ); @@ -375,7 +371,7 @@ $v_shell = quoteshellarg($_POST["v_shell"]); exec( - HESTIA_CMD . + TULIO_CMD . "v-change-user-shell " . quoteshellarg($v_username) . " " . @@ -392,7 +388,7 @@ if ($v_language != $_POST["v_language"] && empty($_SESSION["error_msg"])) { $v_language = quoteshellarg($_POST["v_language"]); exec( - HESTIA_CMD . "v-change-user-language " . quoteshellarg($v_username) . " " . $v_language, + TULIO_CMD . "v-change-user-language " . quoteshellarg($v_username) . " " . $v_language, $output, $return_var, ); @@ -415,7 +411,7 @@ } else { $v_email = quoteshellarg($_POST["v_email"]); exec( - HESTIA_CMD . "v-change-user-contact " . quoteshellarg($v_username) . " " . $v_email, + TULIO_CMD . "v-change-user-contact " . quoteshellarg($v_username) . " " . $v_email, $output, $return_var, ); @@ -431,7 +427,7 @@ } else { $v_name = quoteshellarg($_POST["v_name"]); exec( - HESTIA_CMD . "v-change-user-name " . quoteshellarg($v_username) . " " . $v_name, + TULIO_CMD . "v-change-user-name " . quoteshellarg($v_username) . " " . $v_name, $output, $return_var, ); @@ -448,7 +444,7 @@ } if ($_POST["v_user_theme"] != $_SESSION["userTheme"]) { exec( - HESTIA_CMD . + TULIO_CMD . "v-change-user-theme " . quoteshellarg($v_username) . " " . @@ -515,7 +511,7 @@ $v_ns8 = quoteshellarg($_POST["v_ns8"]); $ns_cmd = - HESTIA_CMD . + TULIO_CMD . "v-change-user-ns " . quoteshellarg($v_username) . " " . diff --git a/web/edit/web/index.php b/web/edit/web/index.php index 38f660697..4bd85478f 100644 --- a/web/edit/web/index.php +++ b/web/edit/web/index.php @@ -21,14 +21,14 @@ } // Get all user domains -exec(HESTIA_CMD . "v-list-web-domains " . $user . " json", $output, $return_var); +exec(TULIO_CMD . "v-list-web-domains " . $user . " json", $output, $return_var); $user_domains = json_decode(implode("", $output), true); $user_domains = array_keys($user_domains); unset($output); $v_domain = $_GET["domain"]; exec( - HESTIA_CMD . "v-list-web-domain " . $user . " " . quoteshellarg($v_domain) . " json", + TULIO_CMD . "v-list-web-domain " . $user . " " . quoteshellarg($v_domain) . " json", $output, $return_var, ); @@ -46,7 +46,7 @@ $v_ssl = $data[$v_domain]["SSL"]; if (!empty($v_ssl)) { exec( - HESTIA_CMD . "v-list-web-domain-ssl " . $user . " " . quoteshellarg($v_domain) . " json", + TULIO_CMD . "v-list-web-domain-ssl " . $user . " " . quoteshellarg($v_domain) . " json", $output, $return_var, ); @@ -154,33 +154,33 @@ $v_date = $data[$v_domain]["DATE"]; // List ip addresses -exec(HESTIA_CMD . "v-list-user-ips " . $user . " json", $output, $return_var); +exec(TULIO_CMD . "v-list-user-ips " . $user . " json", $output, $return_var); $ips = json_decode(implode("", $output), true); unset($output); $v_ip_public = empty($ips[$v_ip]["NAT"]) ? $v_ip : $ips[$v_ip]["NAT"]; // List web templates -exec(HESTIA_CMD . "v-list-web-templates json", $output, $return_var); +exec(TULIO_CMD . "v-list-web-templates json", $output, $return_var); $templates = json_decode(implode("", $output), true); unset($output); // List backend templates if (!empty($_SESSION["WEB_BACKEND"])) { - exec(HESTIA_CMD . "v-list-web-templates-backend json", $output, $return_var); + exec(TULIO_CMD . "v-list-web-templates-backend json", $output, $return_var); $backend_templates = json_decode(implode("", $output), true); unset($output); } // List proxy templates if (!empty($_SESSION["PROXY_SYSTEM"])) { - exec(HESTIA_CMD . "v-list-web-templates-proxy json", $output, $return_var); + exec(TULIO_CMD . "v-list-web-templates-proxy json", $output, $return_var); $proxy_templates = json_decode(implode("", $output), true); unset($output); } // List web stat engines -exec(HESTIA_CMD . "v-list-web-stats json", $output, $return_var); +exec(TULIO_CMD . "v-list-web-stats json", $output, $return_var); $stats = json_decode(implode("", $output), true); unset($output); @@ -204,7 +204,7 @@ if ($v_ip != $_POST["v_ip"] && empty($_SESSION["error_msg"])) { exec( - HESTIA_CMD . + TULIO_CMD . "v-change-web-domain-ip " . $user . " " . @@ -224,14 +224,14 @@ // Change dns domain IP if ($v_ip != $_POST["v_ip"] && empty($_SESSION["error_msg"])) { exec( - HESTIA_CMD . "v-list-dns-domain " . $user . " " . quoteshellarg($v_domain) . " json", + TULIO_CMD . "v-list-dns-domain " . $user . " " . quoteshellarg($v_domain) . " json", $output, $return_var, ); unset($output); if ($return_var == 0) { exec( - HESTIA_CMD . + TULIO_CMD . "v-change-dns-domain-ip " . $user . " " . @@ -252,14 +252,14 @@ if ($v_ip != $_POST["v_ip"] && empty($_SESSION["error_msg"])) { foreach ($valiases as $v_alias) { exec( - HESTIA_CMD . "v-list-dns-domain " . $user . " " . quoteshellarg($v_alias) . " json", + TULIO_CMD . "v-list-dns-domain " . $user . " " . quoteshellarg($v_alias) . " json", $output, $return_var, ); unset($output); if ($return_var == 0) { exec( - HESTIA_CMD . + TULIO_CMD . "v-change-dns-domain-ip " . $user . " " . @@ -279,14 +279,14 @@ // Change mail domain IP if ($v_ip != $_POST["v_ip"] && empty($_SESSION["error_msg"])) { exec( - HESTIA_CMD . "v-list-mail-domain " . $user . " " . quoteshellarg($v_domain) . " json", + TULIO_CMD . "v-list-mail-domain " . $user . " " . quoteshellarg($v_domain) . " json", $output, $return_var, ); unset($output); if ($return_var == 0) { exec( - HESTIA_CMD . "v-rebuild-mail-domain " . $user . " " . quoteshellarg($v_domain), + TULIO_CMD . "v-rebuild-mail-domain " . $user . " " . quoteshellarg($v_domain), $output, $return_var, ); @@ -303,7 +303,7 @@ // Change template if ($v_template != $_POST["v_template"] && empty($_SESSION["error_msg"])) { exec( - HESTIA_CMD . + TULIO_CMD . "v-change-web-domain-tpl " . $user . " " . @@ -327,7 +327,7 @@ ) { $v_backend_template = $_POST["v_backend_template"]; exec( - HESTIA_CMD . + TULIO_CMD . "v-change-web-domain-backend-tpl " . $user . " " . @@ -360,7 +360,7 @@ $_POST["v_nginx_cache_duration"] = "2m"; } exec( - HESTIA_CMD . + TULIO_CMD . "v-add-fastcgi-cache " . $user . " " . @@ -374,7 +374,7 @@ unset($output); } else { exec( - HESTIA_CMD . "v-delete-fastcgi-cache " . $user . " " . quoteshellarg($v_domain), + TULIO_CMD . "v-delete-fastcgi-cache " . $user . " " . quoteshellarg($v_domain), $output, $return_var, ); @@ -392,7 +392,7 @@ empty($_SESSION["error_msg"]) ) { exec( - HESTIA_CMD . + TULIO_CMD . "v-delete-web-domain-proxy " . $user . " " . @@ -425,7 +425,7 @@ $v_proxy_template = $_POST["v_proxy_template"]; } exec( - HESTIA_CMD . + TULIO_CMD . "v-change-web-domain-proxy-tpl " . $user . " " . @@ -462,7 +462,7 @@ $v_proxy_ext = str_replace(",", ", ", $ext); } exec( - HESTIA_CMD . + TULIO_CMD . "v-add-web-domain-proxy " . $user . " " . @@ -494,7 +494,7 @@ $restart_web = "yes"; $restart_proxy = "yes"; exec( - HESTIA_CMD . + TULIO_CMD . "v-delete-web-domain-alias " . $user . " " . @@ -510,14 +510,14 @@ if (empty($_SESSION["error_msg"])) { exec( - HESTIA_CMD . "v-list-dns-domain " . $user . " " . quoteshellarg($v_domain), + TULIO_CMD . "v-list-dns-domain " . $user . " " . quoteshellarg($v_domain), $output, $return_var, ); unset($output); if ($return_var == 0) { exec( - HESTIA_CMD . + TULIO_CMD . "v-delete-dns-on-web-alias " . $user . " " . @@ -542,7 +542,7 @@ $restart_web = "yes"; $restart_proxy = "yes"; exec( - HESTIA_CMD . + TULIO_CMD . "v-add-web-domain-alias " . $user . " " . @@ -557,14 +557,14 @@ unset($output); if (empty($_SESSION["error_msg"])) { exec( - HESTIA_CMD . "v-list-dns-domain " . $user . " " . quoteshellarg($v_domain), + TULIO_CMD . "v-list-dns-domain " . $user . " " . quoteshellarg($v_domain), $output, $return_var, ); unset($output); if ($return_var == 0) { exec( - HESTIA_CMD . + TULIO_CMD . "v-add-dns-on-web-alias " . $user . " " . @@ -595,7 +595,7 @@ // Add certificate with new aliases $l_aliases = str_replace("\n", ",", $v_aliases); exec( - HESTIA_CMD . + TULIO_CMD . "v-add-letsencrypt-domain " . $user . " " . @@ -614,7 +614,7 @@ $restart_proxy = "yes"; exec( - HESTIA_CMD . + TULIO_CMD . "v-list-web-domain-ssl " . $user . " " . @@ -642,7 +642,7 @@ // Update statistics configuration when changing domain aliases $v_stats = quoteshellarg($_POST["v_stats"]); exec( - HESTIA_CMD . + TULIO_CMD . "v-change-web-domain-stats " . $user . " " . @@ -698,7 +698,7 @@ } exec( - HESTIA_CMD . + TULIO_CMD . "v-change-web-domain-sslcert " . $user . " " . @@ -715,7 +715,7 @@ $restart_proxy = "yes"; exec( - HESTIA_CMD . + TULIO_CMD . "v-list-web-domain-ssl " . $user . " " . @@ -758,7 +758,7 @@ empty($_SESSION["error_msg"]) ) { exec( - HESTIA_CMD . + TULIO_CMD . "v-delete-letsencrypt-domain " . $user . " " . @@ -782,7 +782,7 @@ // Delete SSL certificate if ($v_ssl == "yes" && empty($_POST["v_ssl"]) && empty($_SESSION["error_msg"])) { exec( - HESTIA_CMD . + TULIO_CMD . "v-delete-web-domain-ssl " . $user . " " . @@ -812,7 +812,7 @@ ) { $l_aliases = str_replace("\n", ",", $v_aliases); exec( - HESTIA_CMD . + TULIO_CMD . "v-add-letsencrypt-domain " . $user . " " . @@ -889,7 +889,7 @@ } //keep using the original value for v_ssl_home exec( - HESTIA_CMD . + TULIO_CMD . "v-add-web-domain-ssl " . $user . " " . @@ -909,7 +909,7 @@ $restart_proxy = "yes"; exec( - HESTIA_CMD . + TULIO_CMD . "v-list-web-domain-ssl " . $user . " " . @@ -952,7 +952,7 @@ empty($_SESSION["error_msg"]) ) { exec( - HESTIA_CMD . "v-add-web-domain-ssl-force " . $user . " " . quoteshellarg($v_domain), + TULIO_CMD . "v-add-web-domain-ssl-force " . $user . " " . quoteshellarg($v_domain), $output, $return_var, ); @@ -966,7 +966,7 @@ // Add SSL HSTS if (!empty($_POST["v_ssl_hsts"]) && !empty($_POST["v_ssl"]) && empty($_SESSION["error_msg"])) { exec( - HESTIA_CMD . "v-add-web-domain-ssl-hsts " . $user . " " . quoteshellarg($v_domain), + TULIO_CMD . "v-add-web-domain-ssl-hsts " . $user . " " . quoteshellarg($v_domain), $output, $return_var, ); @@ -984,7 +984,7 @@ empty($_SESSION["error_msg"]) ) { exec( - HESTIA_CMD . "v-delete-web-domain-ssl-force " . $user . " " . quoteshellarg($v_domain), + TULIO_CMD . "v-delete-web-domain-ssl-force " . $user . " " . quoteshellarg($v_domain), $output, $return_var, ); @@ -998,7 +998,7 @@ // Delete SSL HSTS if ($v_ssl_hsts == "yes" && empty($_POST["v_ssl_hsts"]) && empty($_SESSION["error_msg"])) { exec( - HESTIA_CMD . "v-delete-web-domain-ssl-hsts " . $user . " " . quoteshellarg($v_domain), + TULIO_CMD . "v-delete-web-domain-ssl-hsts " . $user . " " . quoteshellarg($v_domain), $output, $return_var, ); @@ -1012,7 +1012,7 @@ // Delete web stats if (!empty($v_stats) && $_POST["v_stats"] == "none" && empty($_SESSION["error_msg"])) { exec( - HESTIA_CMD . "v-delete-web-domain-stats " . $user . " " . quoteshellarg($v_domain), + TULIO_CMD . "v-delete-web-domain-stats " . $user . " " . quoteshellarg($v_domain), $output, $return_var, ); @@ -1025,7 +1025,7 @@ if (!empty($v_stats) && $_POST["v_stats"] != $v_stats && empty($_SESSION["error_msg"])) { $v_stats = quoteshellarg($_POST["v_stats"]); exec( - HESTIA_CMD . + TULIO_CMD . "v-change-web-domain-stats " . $user . " " . @@ -1043,7 +1043,7 @@ if (empty($v_stats) && $_POST["v_stats"] != "none" && empty($_SESSION["error_msg"])) { $v_stats = quoteshellarg($_POST["v_stats"]); exec( - HESTIA_CMD . + TULIO_CMD . "v-add-web-domain-stats " . $user . " " . @@ -1060,7 +1060,7 @@ // Delete web stats authorization if (!empty($v_stats_user) && empty($_POST["v_stats_auth"]) && empty($_SESSION["error_msg"])) { exec( - HESTIA_CMD . "v-delete-web-domain-stats-user " . $user . " " . quoteshellarg($v_domain), + TULIO_CMD . "v-delete-web-domain-stats-user " . $user . " " . quoteshellarg($v_domain), $output, $return_var, ); @@ -1091,7 +1091,7 @@ fwrite($fp, $_POST["v_stats_password"] . "\n"); fclose($fp); exec( - HESTIA_CMD . + TULIO_CMD . "v-add-web-domain-stats-user " . $user . " " . @@ -1135,7 +1135,7 @@ fwrite($fp, $_POST["v_stats_password"] . "\n"); fclose($fp); exec( - HESTIA_CMD . + TULIO_CMD . "v-add-web-domain-stats-user " . $user . " " . @@ -1200,7 +1200,7 @@ fwrite($fp, $v_ftp_user_data["v_ftp_password"] . "\n"); fclose($fp); exec( - HESTIA_CMD . + TULIO_CMD . "v-add-web-domain-ftp " . $user . " " . @@ -1312,7 +1312,7 @@ if ($v_ftp_user_data["delete"] == 1) { $v_ftp_username = $user_plain . "_" . $v_ftp_user_data["v_ftp_user"]; exec( - HESTIA_CMD . + TULIO_CMD . "v-delete-web-domain-ftp " . $user . " " . @@ -1350,7 +1350,7 @@ $v_ftp_path = quoteshellarg(trim($v_ftp_user_data["v_ftp_path"])); if (quoteshellarg(trim($v_ftp_user_data["v_ftp_path_prev"])) != $v_ftp_path) { exec( - HESTIA_CMD . + TULIO_CMD . "v-change-web-domain-ftp-path " . $user . " " . @@ -1372,7 +1372,7 @@ fwrite($fp, $v_ftp_user_data["v_ftp_password"] . "\n"); fclose($fp); exec( - HESTIA_CMD . + TULIO_CMD . "v-change-web-domain-ftp-password " . $user . " " . @@ -1467,7 +1467,7 @@ //custom docoot with check box disabled if (!empty($v_custom_doc_root) && empty($_POST["v_custom_doc_root_check"])) { exec( - HESTIA_CMD . + TULIO_CMD . "v-change-web-domain-docroot " . $user . " " . @@ -1491,7 +1491,7 @@ ) { if ($_POST["v-custom-doc-domain"] == $v_domain && empty($_POST["v-custom-doc-folder"])) { exec( - HESTIA_CMD . + TULIO_CMD . "v-change-web-domain-docroot " . $user . " " . @@ -1507,7 +1507,7 @@ $v_custom_doc_domain = quoteshellarg($_POST["v-custom-doc-domain"]); exec( - HESTIA_CMD . + TULIO_CMD . "v-change-web-domain-docroot " . $user . " " . @@ -1532,7 +1532,7 @@ if (!empty($v_redirect) && empty($_POST["v-redirect-checkbox"])) { exec( - HESTIA_CMD . "v-delete-web-domain-redirect " . $user . " " . quoteshellarg($v_domain), + TULIO_CMD . "v-delete-web-domain-redirect " . $user . " " . quoteshellarg($v_domain), $output, $return_var, ); @@ -1551,7 +1551,7 @@ $_POST["v-redirect"] = $_POST["v-redirect-custom"]; } exec( - HESTIA_CMD . + TULIO_CMD . "v-add-web-domain-redirect " . $user . " " . @@ -1577,7 +1577,7 @@ $_POST["v-redirect-code"] != $v_redirect_code ) { exec( - HESTIA_CMD . + TULIO_CMD . "v-add-web-domain-redirect " . $user . " " . @@ -1598,7 +1598,7 @@ } // Restart web server if (!empty($restart_web) && empty($_SESSION["error_msg"])) { - exec(HESTIA_CMD . "v-restart-web", $output, $return_var); + exec(TULIO_CMD . "v-restart-web", $output, $return_var); check_return_code($return_var, $output); unset($output); } @@ -1609,14 +1609,14 @@ !empty($restart_proxy) && empty($_SESSION["error_msg"]) ) { - exec(HESTIA_CMD . "v-restart-proxy", $output, $return_var); + exec(TULIO_CMD . "v-restart-proxy", $output, $return_var); check_return_code($return_var, $output); unset($output); } // Restart dns server if (!empty($restart_dns) && empty($_SESSION["error_msg"])) { - exec(HESTIA_CMD . "v-restart-dns", $output, $return_var); + exec(TULIO_CMD . "v-restart-dns", $output, $return_var); check_return_code($return_var, $output); unset($output); } diff --git a/web/generate/ssl/index.php b/web/generate/ssl/index.php index d2044d79f..fbc39d111 100644 --- a/web/generate/ssl/index.php +++ b/web/generate/ssl/index.php @@ -88,7 +88,7 @@ $v_org = quoteshellarg($_POST["v_org"]); exec( - HESTIA_CMD . + TULIO_CMD . "v-generate-ssl-cert " . $v_domain . " " . diff --git a/web/inc/helpers.php b/web/inc/helpers.php index 5b993b254..c2259a05c 100644 --- a/web/inc/helpers.php +++ b/web/inc/helpers.php @@ -144,7 +144,7 @@ function hst_add_history_log($message, $category = "System", $level = "Info", $u quoteshellarg($category) . " " . quoteshellarg($message); - exec(HESTIA_CMD . "v-log-action " . $command_args, $output, $return_var); + exec(TULIO_CMD . "v-log-action " . $command_args, $output, $return_var); unset($output); return $return_var; diff --git a/web/inc/mail-wrapper.php b/web/inc/mail-wrapper.php index e4b55007e..7f3fddd7f 100755 --- a/web/inc/mail-wrapper.php +++ b/web/inc/mail-wrapper.php @@ -17,7 +17,7 @@ include "/usr/local/tulio/web/inc/main.php"; // Set system language -exec(HESTIA_CMD . "v-list-sys-config json", $output, $return_var); +exec(TULIO_CMD . "v-list-sys-config json", $output, $return_var); $data = json_decode(implode("", $output), true); if (!empty($data["config"]["LANGUAGE"])) { $_SESSION["language"] = $data["config"]["LANGUAGE"]; diff --git a/web/inc/main.php b/web/inc/main.php index 72a97ab5b..2ada0b8f9 100644 --- a/web/inc/main.php +++ b/web/inc/main.php @@ -17,12 +17,12 @@ exit(1); } -define("HESTIA_DIR_BIN", "/usr/local/tulio/bin/"); -define("HESTIA_CMD", "/usr/bin/sudo /usr/local/tulio/bin/"); +define("TULIO_DIR_BIN", "/usr/local/tulio/bin/"); +define("TULIO_CMD", "/usr/bin/sudo /usr/local/tulio/bin/"); define("DEFAULT_PHP_VERSION", "php-" . exec('php -r "echo substr(phpversion(),0,3);"')); // Load Tulio Config directly -load_tulio.config(); +load_tulio_config(); require_once dirname(__FILE__) . "/prevent_csrf.php"; require_once dirname(__FILE__) . "/helpers.php"; $root_directory = dirname(__FILE__) . "/../../"; @@ -74,7 +74,7 @@ function destroy_sessions() { ) { $v_user = quoteshellarg($_SESSION["user"]); $v_session_id = quoteshellarg($_SESSION["token"]); - exec(HESTIA_CMD . "v-log-user-logout " . $v_user . " " . $v_session_id, $output, $return_var); + exec(TULIO_CMD . "v-log-user-logout " . $v_user . " " . $v_session_id, $output, $return_var); destroy_sessions(); header("Location: /login/"); exit(); @@ -105,7 +105,7 @@ function destroy_sessions() { $username = $_SESSION["look"]; } - exec(HESTIA_CMD . "v-list-user " . quoteshellarg($username) . " json", $output, $return_var); + exec(TULIO_CMD . "v-list-user " . quoteshellarg($username) . " json", $output, $return_var); $data = json_decode(implode("", $output), true); unset($output, $return_var); $_SESSION["login_shell"] = $data[$username]["SHELL"]; @@ -127,7 +127,7 @@ function destroy_sessions() { $v_user = quoteshellarg($_SESSION["user"]); $v_session_id = quoteshellarg($_SESSION["token"]); exec( - HESTIA_CMD . "v-log-user-logout " . $v_user . " " . $v_session_id, + TULIO_CMD . "v-log-user-logout " . $v_user . " " . $v_session_id, $output, $return_var, ); @@ -266,7 +266,7 @@ function show_alert_message($data) { } function top_panel($user, $TAB) { - $command = HESTIA_CMD . "v-list-user " . $user . " 'json'"; + $command = TULIO_CMD . "v-list-user " . $user . " 'json'"; exec($command, $output, $return_var); if ($return_var > 0) { destroy_sessions(); @@ -532,7 +532,7 @@ function list_timezones() { * @return string */ function is_it_mysql_or_mariadb() { - exec(HESTIA_CMD . "v-list-sys-services json", $output, $return_var); + exec(TULIO_CMD . "v-list-sys-services json", $output, $return_var); $data = json_decode(implode("", $output), true); unset($output); $mysqltype = "mysql"; @@ -544,7 +544,7 @@ function is_it_mysql_or_mariadb() { function load_tulio_config() { // Check system configuration - exec(HESTIA_CMD . "v-list-sys-config json", $output, $return_var); + exec(TULIO_CMD . "v-list-sys-config json", $output, $return_var); $data = json_decode(implode("", $output), true); $sys_arr = $data["config"]; foreach ($sys_arr as $key => $value) { @@ -558,14 +558,14 @@ function load_tulio_config() { * @return array */ function backendtpl_with_webdomains() { - exec(HESTIA_CMD . "v-list-users json", $output, $return_var); + exec(TULIO_CMD . "v-list-users json", $output, $return_var); $users = json_decode(implode("", $output), true); unset($output); $backend_list = []; foreach ($users as $user => $user_details) { exec( - HESTIA_CMD . "v-list-web-domains " . quoteshellarg($user) . " json", + TULIO_CMD . "v-list-web-domains " . quoteshellarg($user) . " json", $output, $return_var, ); diff --git a/web/list/access-key/index.php b/web/list/access-key/index.php index 583f5ce7b..797ddcf6f 100644 --- a/web/list/access-key/index.php +++ b/web/list/access-key/index.php @@ -25,7 +25,7 @@ $v_key = quoteshellarg(trim($_GET["key"])); // Key data - exec(HESTIA_CMD . "v-list-access-key " . $v_key . " json", $output, $return_var); + exec(TULIO_CMD . "v-list-access-key " . $v_key . " json", $output, $return_var); $key_data = json_decode(implode("", $output), true); unset($output); @@ -35,7 +35,7 @@ } // APIs - exec(HESTIA_CMD . "v-list-apis json", $output, $return_var); + exec(TULIO_CMD . "v-list-apis json", $output, $return_var); $apis = json_decode(implode("", $output), true); $apis = array_filter($apis, function ($api) use ($user_plain) { return $user_plain == "admin" || $api["ROLE"] == "user"; @@ -45,7 +45,7 @@ render_page($user, $TAB, "list_access_key"); } else { - exec(HESTIA_CMD . "v-list-access-keys $user json", $output, $return_var); + exec(TULIO_CMD . "v-list-access-keys $user json", $output, $return_var); $data = json_decode(implode("", $output), true); uasort($data, function ($a, $b) { diff --git a/web/list/backup/exclusions/index.php b/web/list/backup/exclusions/index.php index 69b4ed7e0..196bae370 100644 --- a/web/list/backup/exclusions/index.php +++ b/web/list/backup/exclusions/index.php @@ -6,7 +6,7 @@ include $_SERVER["DOCUMENT_ROOT"] . "/inc/main.php"; // Data -exec(HESTIA_CMD . "v-list-user-backup-exclusions $user json", $output, $return_var); +exec(TULIO_CMD . "v-list-user-backup-exclusions $user json", $output, $return_var); $data = json_decode(implode("", $output), true); unset($output); // Render page diff --git a/web/list/backup/incremental/index.php b/web/list/backup/incremental/index.php index 64609af34..bf2298157 100644 --- a/web/list/backup/incremental/index.php +++ b/web/list/backup/incremental/index.php @@ -23,7 +23,7 @@ function getTransByType($type) { // Data & Render page if (empty($_GET["snapshot"])) { - exec(HESTIA_CMD . "v-list-user-backups-restic $user json", $output, $return_var); + exec(TULIO_CMD . "v-list-user-backups-restic $user json", $output, $return_var); $data = json_decode(implode("", $output), true); if (is_array($data)) { $data = array_reverse($data); @@ -35,7 +35,7 @@ function getTransByType($type) { } else { if (empty($_GET["browse"])) { $snapshot = quoteshellarg($_GET["snapshot"]); - exec(HESTIA_CMD . "v-list-user-backup-restic $user $snapshot json", $output, $return_var); + exec(TULIO_CMD . "v-list-user-backup-restic $user $snapshot json", $output, $return_var); $data = json_decode(implode("", $output), true); render_page($user, $TAB, "list_backup_detail_incremental"); } else { @@ -44,7 +44,7 @@ function getTransByType($type) { } $folder = quoteshellarg($_GET["folder"]); $snapshot = quoteshellarg($_GET["snapshot"]); - exec(HESTIA_CMD . "v-list-user-files-restic $user $snapshot $folder", $output, $return_var); + exec(TULIO_CMD . "v-list-user-files-restic $user $snapshot $folder", $output, $return_var); $info = json_decode($output[0], true); unset($output[0]); $files = []; diff --git a/web/list/backup/index.php b/web/list/backup/index.php index 7b73fd755..9b5f63369 100644 --- a/web/list/backup/index.php +++ b/web/list/backup/index.php @@ -7,7 +7,7 @@ // Data & Render page if (empty($_GET["backup"])) { - exec(HESTIA_CMD . "v-list-user-backups $user json", $output, $return_var); + exec(TULIO_CMD . "v-list-user-backups $user json", $output, $return_var); $data = json_decode(implode("", $output), true); if ($_SESSION["userSortOrder"] == "name") { ksort($data); @@ -18,7 +18,7 @@ render_page($user, $TAB, "list_backup"); } else { exec( - HESTIA_CMD . "v-list-user-backup $user " . quoteshellarg($_GET["backup"]) . " json", + TULIO_CMD . "v-list-user-backup $user " . quoteshellarg($_GET["backup"]) . " json", $output, $return_var, ); diff --git a/web/list/cron/index.php b/web/list/cron/index.php index 8b654e4e8..97f623bca 100644 --- a/web/list/cron/index.php +++ b/web/list/cron/index.php @@ -5,7 +5,7 @@ include $_SERVER["DOCUMENT_ROOT"] . "/inc/main.php"; // Data -exec(HESTIA_CMD . "v-list-cron-jobs $user json", $output, $return_var); +exec(TULIO_CMD . "v-list-cron-jobs $user json", $output, $return_var); $data = json_decode(implode("", $output), true); if ($_SESSION["userSortOrder"] == "name") { ksort($data); diff --git a/web/list/db/index.php b/web/list/db/index.php index 4d845e54e..82f353e41 100644 --- a/web/list/db/index.php +++ b/web/list/db/index.php @@ -5,7 +5,7 @@ include $_SERVER["DOCUMENT_ROOT"] . "/inc/main.php"; // Data -exec(HESTIA_CMD . "v-list-databases $user json", $output, $return_var); +exec(TULIO_CMD . "v-list-databases $user json", $output, $return_var); $data = json_decode(implode("", $output), true); if ($_SESSION["userSortOrder"] == "name") { ksort($data); diff --git a/web/list/dns/index.php b/web/list/dns/index.php index f004d3840..b7843b6f8 100644 --- a/web/list/dns/index.php +++ b/web/list/dns/index.php @@ -8,7 +8,7 @@ // Data & Render page if (empty($_GET["domain"])) { - exec(HESTIA_CMD . "v-list-dns-domains " . $user . " 'json'", $output, $return_var); + exec(TULIO_CMD . "v-list-dns-domains " . $user . " 'json'", $output, $return_var); $data = json_decode(implode("", $output), true); if ($_SESSION["userSortOrder"] == "name") { ksort($data); @@ -20,7 +20,7 @@ render_page($user, $TAB, "list_dns"); } elseif (!empty($_GET["action"])) { exec( - HESTIA_CMD . + TULIO_CMD . "v-list-dnssec-public-key " . $user . " " . @@ -84,7 +84,7 @@ render_page($user, $TAB, "list_dns_public"); } else { exec( - HESTIA_CMD . + TULIO_CMD . "v-list-dns-records " . $user . " " . diff --git a/web/list/firewall/banlist/index.php b/web/list/firewall/banlist/index.php index 948614ff0..f1294502c 100644 --- a/web/list/firewall/banlist/index.php +++ b/web/list/firewall/banlist/index.php @@ -11,7 +11,7 @@ } // Data -exec(HESTIA_CMD . "v-list-firewall-ban json", $output, $return_var); +exec(TULIO_CMD . "v-list-firewall-ban json", $output, $return_var); $data = json_decode(implode("", $output), true); $data = array_reverse($data, true); unset($output); diff --git a/web/list/firewall/index.php b/web/list/firewall/index.php index f85f9eaa9..d88c05b5f 100644 --- a/web/list/firewall/index.php +++ b/web/list/firewall/index.php @@ -11,7 +11,7 @@ } // Data -exec(HESTIA_CMD . "v-list-firewall json", $output, $return_var); +exec(TULIO_CMD . "v-list-firewall json", $output, $return_var); $data = json_decode(implode("", $output), true); if ($_SESSION["userSortOrder"] == "name") { ksort($data); diff --git a/web/list/firewall/ipset/index.php b/web/list/firewall/ipset/index.php index cf4959d03..ddec26c7e 100644 --- a/web/list/firewall/ipset/index.php +++ b/web/list/firewall/ipset/index.php @@ -11,7 +11,7 @@ } // Data -exec(HESTIA_CMD . "v-list-firewall-ipset json", $output, $return_var); +exec(TULIO_CMD . "v-list-firewall-ipset json", $output, $return_var); $data = json_decode(implode("", $output), true); ksort($data); diff --git a/web/list/ip/index.php b/web/list/ip/index.php index 3e236bcb1..dd19a1d3a 100644 --- a/web/list/ip/index.php +++ b/web/list/ip/index.php @@ -12,7 +12,7 @@ } // Data -exec(HESTIA_CMD . "v-list-sys-ips json", $output, $return_var); +exec(TULIO_CMD . "v-list-sys-ips json", $output, $return_var); $data = json_decode(implode("", $output), true); if ($_SESSION["userSortOrder"] == "name") { ksort($data); diff --git a/web/list/key/index.php b/web/list/key/index.php index 3d3b70ca3..a9d1ca128 100644 --- a/web/list/key/index.php +++ b/web/list/key/index.php @@ -9,7 +9,7 @@ $user = quoteshellarg($_GET["user"]); } -exec(HESTIA_CMD . "v-list-user-ssh-key " . $user . " json", $output, $return_var); +exec(TULIO_CMD . "v-list-user-ssh-key " . $user . " json", $output, $return_var); if ($return_var > 0) { check_return_code_redirect($return_var, $output, "/"); } diff --git a/web/list/log/auth/index.php b/web/list/log/auth/index.php index 074e08004..8998ddc60 100644 --- a/web/list/log/auth/index.php +++ b/web/list/log/auth/index.php @@ -14,7 +14,7 @@ $user = quoteshellarg($_GET["user"]); } -exec(HESTIA_CMD . "v-list-user-auth-log " . $user . " json", $output, $return_var); +exec(TULIO_CMD . "v-list-user-auth-log " . $user . " json", $output, $return_var); check_return_code_redirect($return_var, $output, "/"); $data = json_decode(implode("", $output), true); diff --git a/web/list/log/index.php b/web/list/log/index.php index cf25bb29d..b6c2dc9b1 100644 --- a/web/list/log/index.php +++ b/web/list/log/index.php @@ -26,7 +26,7 @@ $user = quoteshellarg($_GET["user"]); } -exec(HESTIA_CMD . "v-list-user-log $user json", $output, $return_var); +exec(TULIO_CMD . "v-list-user-log $user json", $output, $return_var); check_error($return_var); $data = json_decode(implode("", $output), true); if (is_array($data)) { diff --git a/web/list/mail/index.php b/web/list/mail/index.php index 4d2160845..c5bb85fc9 100644 --- a/web/list/mail/index.php +++ b/web/list/mail/index.php @@ -7,7 +7,7 @@ // Data & Render page if (empty($_GET["domain"])) { - exec(HESTIA_CMD . "v-list-mail-domains $user json", $output, $return_var); + exec(TULIO_CMD . "v-list-mail-domains $user json", $output, $return_var); $data = json_decode(implode("", $output), true); if ($_SESSION["userSortOrder"] == "name") { ksort($data); @@ -19,19 +19,19 @@ render_page($user, $TAB, "list_mail"); } elseif (!empty($_GET["dns"])) { exec( - HESTIA_CMD . "v-list-mail-domain " . $user . " " . quoteshellarg($_GET["domain"]) . " json", + TULIO_CMD . "v-list-mail-domain " . $user . " " . quoteshellarg($_GET["domain"]) . " json", $output, $return_var, ); $data = json_decode(implode("", $output), true); $data = array_reverse($data, true); unset($output); - exec(HESTIA_CMD . "v-list-user-ips " . $user . " json", $output, $return_var); + exec(TULIO_CMD . "v-list-user-ips " . $user . " json", $output, $return_var); $ips = json_decode(implode("", $output), true); $ips = array_reverse($ips, true); unset($output); exec( - HESTIA_CMD . + TULIO_CMD . "v-list-mail-domain-dkim-dns " . $user . " " . @@ -47,7 +47,7 @@ render_page($user, $TAB, "list_mail_dns"); } else { exec( - HESTIA_CMD . + TULIO_CMD . "v-list-mail-accounts " . $user . " " . diff --git a/web/list/notifications/index.php b/web/list/notifications/index.php index 5d27ad049..4b0163b90 100644 --- a/web/list/notifications/index.php +++ b/web/list/notifications/index.php @@ -11,7 +11,7 @@ function formatNotificationTimestamps(&$note) { if ($_REQUEST["ajax"] == 1 && $_REQUEST["token"] == $_SESSION["token"]) { // Data - exec(HESTIA_CMD . "v-list-user-notifications $user json", $output, $return_var); + exec(TULIO_CMD . "v-list-user-notifications $user json", $output, $return_var); $data = json_decode(implode("", $output), true); foreach ($data as $key => &$note) { @@ -36,7 +36,7 @@ function sort_priority_id($element1, $element2) { $TAB = "NOTIFICATIONS"; // Data -exec(HESTIA_CMD . "v-list-user-notifications $user json", $output, $return_var); +exec(TULIO_CMD . "v-list-user-notifications $user json", $output, $return_var); $data = json_decode(implode("", $output), true); $data = array_reverse($data, true); diff --git a/web/list/package/index.php b/web/list/package/index.php index 8d13b21cc..b9f721db9 100644 --- a/web/list/package/index.php +++ b/web/list/package/index.php @@ -12,7 +12,7 @@ } // Data -exec(HESTIA_CMD . "v-list-user-packages json", $output, $return_var); +exec(TULIO_CMD . "v-list-user-packages json", $output, $return_var); $data = json_decode(implode("", $output), true); if ($_SESSION["userSortOrder"] == "name") { ksort($data); diff --git a/web/list/rrd/ajax.php b/web/list/rrd/ajax.php index 6c4a524f1..624720274 100644 --- a/web/list/rrd/ajax.php +++ b/web/list/rrd/ajax.php @@ -27,7 +27,7 @@ // Data exec( - HESTIA_CMD . "v-export-rrd " . quoteshellarg($service) . " " . quoteshellarg($period), + TULIO_CMD . "v-export-rrd " . quoteshellarg($service) . " " . quoteshellarg($period), $output, $return_var, ); diff --git a/web/list/rrd/index.php b/web/list/rrd/index.php index ebec42a74..04b2cab6f 100644 --- a/web/list/rrd/index.php +++ b/web/list/rrd/index.php @@ -12,7 +12,7 @@ } // Data -exec(HESTIA_CMD . "v-list-sys-rrd json", $output, $return_var); +exec(TULIO_CMD . "v-list-sys-rrd json", $output, $return_var); $data = json_decode(implode("", $output), true); unset($output); diff --git a/web/list/server/index.php b/web/list/server/index.php index c84b5e9c0..813ef4b55 100644 --- a/web/list/server/index.php +++ b/web/list/server/index.php @@ -22,7 +22,7 @@ function end_html() { if (isset($_GET["cpu"])) { $TAB = "CPU"; include $_SERVER["DOCUMENT_ROOT"] . "/templates/pages/list_server_info.php"; - exec(HESTIA_CMD . "v-list-sys-cpu-status", $output, $return_var); + exec(TULIO_CMD . "v-list-sys-cpu-status", $output, $return_var); foreach ($output as $file) { echo $file . "\n"; } @@ -34,7 +34,7 @@ function end_html() { if (isset($_GET["mem"])) { $TAB = "MEMORY"; include $_SERVER["DOCUMENT_ROOT"] . "/templates/pages/list_server_info.php"; - exec(HESTIA_CMD . "v-list-sys-memory-status", $output, $return_var); + exec(TULIO_CMD . "v-list-sys-memory-status", $output, $return_var); foreach ($output as $file) { echo $file . "\n"; } @@ -46,7 +46,7 @@ function end_html() { if (isset($_GET["disk"])) { $TAB = "DISK"; include $_SERVER["DOCUMENT_ROOT"] . "/templates/pages/list_server_info.php"; - exec(HESTIA_CMD . "v-list-sys-disk-status", $output, $return_var); + exec(TULIO_CMD . "v-list-sys-disk-status", $output, $return_var); foreach ($output as $file) { echo $file . "\n"; } @@ -58,7 +58,7 @@ function end_html() { if (isset($_GET["net"])) { $TAB = "NETWORK"; include $_SERVER["DOCUMENT_ROOT"] . "/templates/pages/list_server_info.php"; - exec(HESTIA_CMD . "v-list-sys-network-status", $output, $return_var); + exec(TULIO_CMD . "v-list-sys-network-status", $output, $return_var); foreach ($output as $file) { echo $file . "\n"; } @@ -70,7 +70,7 @@ function end_html() { if (isset($_GET["web"])) { $TAB = "WEB"; include $_SERVER["DOCUMENT_ROOT"] . "/templates/pages/list_server_info.php"; - exec(HESTIA_CMD . "v-list-sys-web-status", $output, $return_var); + exec(TULIO_CMD . "v-list-sys-web-status", $output, $return_var); foreach ($output as $file) { $file = str_replace('border="0"', 'border="1"', $file); $file = str_replace('bgcolor="#ffffff"', "", $file); @@ -86,7 +86,7 @@ function end_html() { if (isset($_GET["dns"])) { $TAB = "DNS"; include $_SERVER["DOCUMENT_ROOT"] . "/templates/pages/list_server_info.php"; - exec(HESTIA_CMD . "v-list-sys-dns-status", $output, $return_var); + exec(TULIO_CMD . "v-list-sys-dns-status", $output, $return_var); foreach ($output as $file) { echo $file . "\n"; } @@ -98,7 +98,7 @@ function end_html() { if (isset($_GET["mail"])) { $TAB = "MAIL"; include $_SERVER["DOCUMENT_ROOT"] . "/templates/pages/list_server_info.php"; - exec(HESTIA_CMD . "v-list-sys-mail-status", $output, $return_var); + exec(TULIO_CMD . "v-list-sys-mail-status", $output, $return_var); if ($return_var == 0) { foreach ($output as $file) { echo $file . "\n"; @@ -112,7 +112,7 @@ function end_html() { if (isset($_GET["db"])) { $TAB = "DB"; include $_SERVER["DOCUMENT_ROOT"] . "/templates/pages/list_server_info.php"; - exec(HESTIA_CMD . "v-list-sys-db-status", $output, $return_var); + exec(TULIO_CMD . "v-list-sys-db-status", $output, $return_var); if ($return_var == 0) { foreach ($output as $file) { echo $file . "\n"; @@ -123,11 +123,11 @@ function end_html() { } // Data -exec(HESTIA_CMD . "v-list-sys-info json", $output, $return_var); +exec(TULIO_CMD . "v-list-sys-info json", $output, $return_var); $sys = json_decode(implode("", $output), true); unset($output); -exec(HESTIA_CMD . "v-list-sys-php json", $output, $return_var); +exec(TULIO_CMD . "v-list-sys-php json", $output, $return_var); $php = json_decode(implode("", $output), true); unset($output); $phpfpm = []; @@ -135,7 +135,7 @@ function end_html() { $phpfpm[] = "php" . $version . "-fpm"; } -exec(HESTIA_CMD . "v-list-sys-services json", $output, $return_var); +exec(TULIO_CMD . "v-list-sys-services json", $output, $return_var); $data = json_decode(implode("", $output), true); ksort($data); diff --git a/web/list/stats/index.php b/web/list/stats/index.php index 485e7db0d..10acb70a3 100644 --- a/web/list/stats/index.php +++ b/web/list/stats/index.php @@ -8,23 +8,23 @@ // Data if ($_SESSION["userContext"] === "admin" && $_SESSION["look"] == "") { if (empty($_GET["user"])) { - exec(HESTIA_CMD . "v-list-users-stats json", $output, $return_var); + exec(TULIO_CMD . "v-list-users-stats json", $output, $return_var); $data = json_decode(implode("", $output), true); $data = array_reverse($data, true); unset($output); } else { $v_user = quoteshellarg($_GET["user"]); - exec(HESTIA_CMD . "v-list-user-stats $v_user json", $output, $return_var); + exec(TULIO_CMD . "v-list-user-stats $v_user json", $output, $return_var); $data = json_decode(implode("", $output), true); $data = array_reverse($data, true); unset($output); } - exec(HESTIA_CMD . "v-list-sys-users 'json'", $output, $return_var); + exec(TULIO_CMD . "v-list-sys-users 'json'", $output, $return_var); $users = json_decode(implode("", $output), true); unset($output); } else { - exec(HESTIA_CMD . "v-list-user-stats $user json", $output, $return_var); + exec(TULIO_CMD . "v-list-user-stats $user json", $output, $return_var); $data = json_decode(implode("", $output), true); $data = array_reverse($data, true); unset($output); diff --git a/web/list/updates/index.php b/web/list/updates/index.php index 307e5239c..0292c313b 100644 --- a/web/list/updates/index.php +++ b/web/list/updates/index.php @@ -11,10 +11,10 @@ } // Data -exec(HESTIA_CMD . "v-list-sys-tulio-updates json", $output, $return_var); +exec(TULIO_CMD . "v-list-sys-tulio-updates json", $output, $return_var); $data = json_decode(implode("", $output), true); unset($output); -exec(HESTIA_CMD . "v-list-sys-tulio-autoupdate plain", $output, $return_var); +exec(TULIO_CMD . "v-list-sys-tulio-autoupdate plain", $output, $return_var); $autoupdate = $output["0"]; unset($output); diff --git a/web/list/user/index.php b/web/list/user/index.php index 41698dc7a..db4f3faab 100644 --- a/web/list/user/index.php +++ b/web/list/user/index.php @@ -18,9 +18,9 @@ // Data if ($_SESSION["userContext"] === "admin") { - exec(HESTIA_CMD . "v-list-users json", $output, $return_var); + exec(TULIO_CMD . "v-list-users json", $output, $return_var); } else { - exec(HESTIA_CMD . "v-list-user " . $user . " json", $output, $return_var); + exec(TULIO_CMD . "v-list-user " . $user . " json", $output, $return_var); } $data = json_decode(implode("", $output), true); if ($_SESSION["userSortOrder"] == "name") { diff --git a/web/list/web-log/index.php b/web/list/web-log/index.php index 639e26657..60003cb47 100644 --- a/web/list/web-log/index.php +++ b/web/list/web-log/index.php @@ -16,7 +16,7 @@ // Header include $_SERVER["DOCUMENT_ROOT"] . "/templates/pages/list_weblog.php"; -exec(HESTIA_CMD . "v-list-web-domain-" . $type . "log $user " . $v_domain, $output, $return_var); +exec(TULIO_CMD . "v-list-web-domain-" . $type . "log $user " . $v_domain, $output, $return_var); if ($return_var == 0) { foreach ($output as $file) { diff --git a/web/list/web/index.php b/web/list/web/index.php index b5b7155f4..f660431e3 100644 --- a/web/list/web/index.php +++ b/web/list/web/index.php @@ -5,14 +5,14 @@ include $_SERVER["DOCUMENT_ROOT"] . "/inc/main.php"; // Data -exec(HESTIA_CMD . "v-list-web-domains " . $user . " 'json'", $output, $return_var); +exec(TULIO_CMD . "v-list-web-domains " . $user . " 'json'", $output, $return_var); $data = json_decode(implode("", $output), true); if ($_SESSION["userSortOrder"] == "name") { ksort($data); } else { $data = array_reverse($data, true); } -$ips = json_decode(shell_exec(HESTIA_CMD . "v-list-sys-ips json"), true); +$ips = json_decode(shell_exec(TULIO_CMD . "v-list-sys-ips json"), true); // Render page render_page($user, $TAB, "list_web"); diff --git a/web/locale/tuliocp.pot b/web/locale/tuliocp.pot index 89e29aca0..d475683cf 100644 --- a/web/locale/tuliocp.pot +++ b/web/locale/tuliocp.pot @@ -2884,7 +2884,7 @@ msgid "SSH" msgstr "" #: ../../web/templates/pages/add_firewall_banlist.php:42 -msgid "HESTIA" +msgid "TULIO" msgstr "" #: ../../web/templates/pages/list_server_info.php:19 diff --git a/web/login/index.php b/web/login/index.php index 6de34e80a..976250c11 100644 --- a/web/login/index.php +++ b/web/login/index.php @@ -24,14 +24,14 @@ if (verify_csrf($_GET)) { $v_user = quoteshellarg($_GET["loginas"]); $v_impersonator = quoteshellarg($_SESSION["user"]); - exec(HESTIA_CMD . "v-list-user " . $v_user . " json", $output, $return_var); + exec(TULIO_CMD . "v-list-user " . $v_user . " json", $output, $return_var); if ($return_var == 0) { $data = json_decode(implode("", $output), true); reset($data); $_SESSION["look"] = key($data); // Log impersonation events exec( - HESTIA_CMD . + TULIO_CMD . "v-log-action " . $v_impersonator . " 'Info' 'Security' 'Logged in as another user (User: $v_user)'", @@ -39,7 +39,7 @@ $return_var, ); exec( - HESTIA_CMD . + TULIO_CMD . "v-log-action system 'Warning' 'Security' 'User impersonation session started (User: $v_user, Administrator: $v_impersonator)'", $output, $return_var, @@ -77,7 +77,7 @@ ], ); - exec(HESTIA_CMD . "v-list-user " . $v_user . " json", $output, $return_var); + exec(TULIO_CMD . "v-list-user " . $v_user . " json", $output, $return_var); $data = json_decode(implode("", $output), true); unset($output); @@ -138,7 +138,7 @@ function authenticate_user($user, $password, $twofa = "") { // Get user's salt $output = ""; exec( - HESTIA_CMD . "v-get-user-salt " . $v_user . " " . $v_ip . " json", + TULIO_CMD . "v-get-user-salt " . $v_user . " " . $v_ip . " json", $output, $return_var, ); @@ -170,7 +170,7 @@ function authenticate_user($user, $password, $twofa = "") { $v_password = stream_get_meta_data($fp)["uri"]; fwrite($fp, $password . "\n"); exec( - HESTIA_CMD . + TULIO_CMD . "v-check-user-password " . $v_user . " " . @@ -197,7 +197,7 @@ function authenticate_user($user, $password, $twofa = "") { // Check user hash exec( - HESTIA_CMD . "v-check-user-hash " . $v_user . " " . $v_hash . " " . $v_ip, + TULIO_CMD . "v-check-user-hash " . $v_user . " " . $v_hash . " " . $v_ip, $output, $return_var, ); @@ -211,7 +211,7 @@ function authenticate_user($user, $password, $twofa = "") { $error = _("Invalid username or password"); $v_session_id = quoteshellarg($_POST["token"]); exec( - HESTIA_CMD . + TULIO_CMD . "v-log-user-login " . $v_user . " " . @@ -226,7 +226,7 @@ function authenticate_user($user, $password, $twofa = "") { return $error; } else { // Get user specific parameters - exec(HESTIA_CMD . "v-list-user " . $v_user . " json", $output, $return_var); + exec(TULIO_CMD . "v-list-user " . $v_user . " json", $output, $return_var); $data = json_decode(implode("", $output), true); unset($output); if ($data[$user]["LOGIN_DISABLED"] === "yes") { @@ -234,7 +234,7 @@ function authenticate_user($user, $password, $twofa = "") { $error = _("Invalid username or password"); $v_session_id = quoteshellarg($_POST["token"]); exec( - HESTIA_CMD . + TULIO_CMD . "v-log-user-login " . $v_user . " " . @@ -258,7 +258,7 @@ function authenticate_user($user, $password, $twofa = "") { $error = _("Invalid username or password"); $v_session_id = quoteshellarg($_POST["token"]); exec( - HESTIA_CMD . + TULIO_CMD . "v-log-user-login " . $v_user . " " . @@ -283,7 +283,7 @@ function authenticate_user($user, $password, $twofa = "") { } else { $v_twofa = quoteshellarg($twofa); exec( - HESTIA_CMD . "v-check-user-2fa " . $v_user . " " . $v_twofa, + TULIO_CMD . "v-check-user-2fa " . $v_user . " " . $v_twofa, $output, $return_var, ); @@ -298,7 +298,7 @@ function authenticate_user($user, $password, $twofa = "") { //allow a few failed attemps before start of logging. if ($_SESSION["failed_twofa"] > 2) { exec( - HESTIA_CMD . + TULIO_CMD . "v-log-user-login " . $v_user . " " . @@ -328,7 +328,7 @@ function authenticate_user($user, $password, $twofa = "") { //log successfull login attempt $v_session_id = quoteshellarg($_POST["token"]); exec( - HESTIA_CMD . + TULIO_CMD . "v-log-user-login " . $v_user . " " . @@ -358,7 +358,7 @@ function authenticate_user($user, $password, $twofa = "") { // Define language $output = ""; - exec(HESTIA_CMD . "v-list-sys-languages json", $output, $return_var); + exec(TULIO_CMD . "v-list-sys-languages json", $output, $return_var); $languages = json_decode(implode("", $output), true); $_SESSION["language"] = in_array($data[$v_user]["LANGUAGE"], $languages) ? $data[$user]["LANGUAGE"] @@ -433,17 +433,17 @@ function authenticate_user($user, $password, $twofa = "") { unset($_POST); } // Check system configuration -load_tulio.config(); +load_tulio . config(); // Detect language if (empty($_SESSION["language"])) { $output = ""; - exec(HESTIA_CMD . "v-list-sys-config json", $output, $return_var); + exec(TULIO_CMD . "v-list-sys-config json", $output, $return_var); $config = json_decode(implode("", $output), true); $lang = $config["config"]["LANGUAGE"]; $output = ""; - exec(HESTIA_CMD . "v-list-sys-languages json", $output, $return_var); + exec(TULIO_CMD . "v-list-sys-languages json", $output, $return_var); $languages = json_decode(implode("", $output), true); $_SESSION["language"] = in_array($lang, $languages) ? $lang : "en"; } diff --git a/web/logout/index.php b/web/logout/index.php index 9272b3ca3..7995934be 100644 --- a/web/logout/index.php +++ b/web/logout/index.php @@ -9,7 +9,7 @@ $v_user = quoteshellarg($_SESSION["look"]); $v_impersonator = quoteshellarg($_SESSION["user"]); exec( - HESTIA_CMD . + TULIO_CMD . "v-log-action system 'Warning' 'Security' 'User impersonation session ended (User: $v_user, Administrator: $v_impersonator)'", $output, $return_var, @@ -25,7 +25,7 @@ $v_user = quoteshellarg($_SESSION["user"]); $v_session_id = quoteshellarg($_SESSION["token"]); exec( - HESTIA_CMD . "v-log-user-logout " . $v_user . " " . $v_session_id, + TULIO_CMD . "v-log-user-logout " . $v_user . " " . $v_session_id, $output, $return_var, ); diff --git a/web/move/firewall/index.php b/web/move/firewall/index.php index a75dcf9f0..160eaf0dd 100755 --- a/web/move/firewall/index.php +++ b/web/move/firewall/index.php @@ -18,7 +18,7 @@ if (!empty($_GET["rule"])) { $v_rule = quoteshellarg($_GET["rule"]); $v_direction = quoteshellarg($_GET["direction"]); - exec(HESTIA_CMD . "v-move-firewall-rule " . $v_rule . " " . $v_direction, $output, $return_var); + exec(TULIO_CMD . "v-move-firewall-rule " . $v_rule . " " . $v_direction, $output, $return_var); } check_return_code($return_var, $output); unset($output); diff --git a/web/reset/index.php b/web/reset/index.php index 1d1445e10..1c2ee215f 100644 --- a/web/reset/index.php +++ b/web/reset/index.php @@ -27,7 +27,7 @@ if ($return_var == 0) { $data = json_decode(implode("", $output), true); unset($output); - exec(HESTIA_CMD . "v-get-user-value " . $v_user . " RKEYEXP", $output, $return_var); + exec(TULIO_CMD . "v-get-user-value " . $v_user . " RKEYEXP", $output, $return_var); $rkeyexp = json_decode(implode("", $output), true); if ($rkeyexp === null || $rkeyexp < time() - 1) { if ($email == $data[$user]["CONTACT"]) { @@ -38,7 +38,7 @@ fwrite($fp, $hash . "\n"); fclose($fp); exec( - HESTIA_CMD . "v-change-user-rkey " . $v_user . " " . $v_rkey . "", + TULIO_CMD . "v-change-user-rkey " . $v_user . " " . $v_rkey . "", $output, $return_var, ); @@ -164,20 +164,20 @@ if ($_POST["password"] == $_POST["password_confirm"]) { $v_user = quoteshellarg($_POST["user"]); $user = $_POST["user"]; - exec(HESTIA_CMD . "v-list-user " . $v_user . " json", $output, $return_var); + exec(TULIO_CMD . "v-list-user " . $v_user . " json", $output, $return_var); if ($return_var == 0) { $data = json_decode(implode("", $output), true); $rkey = $data[$user]["RKEY"]; if (password_verify($_POST["code"], $rkey)) { unset($output); - exec(HESTIA_CMD . "v-get-user-value " . $v_user . " RKEYEXP", $output, $return_var); + exec(TULIO_CMD . "v-get-user-value " . $v_user . " RKEYEXP", $output, $return_var); if ($output[0] > time() - 900) { $v_password = tempnam("/tmp", "vst"); $fp = fopen($v_password, "w"); fwrite($fp, $_POST["password"] . "\n"); fclose($fp); exec( - HESTIA_CMD . "v-change-user-password " . $v_user . " " . $v_password, + TULIO_CMD . "v-change-user-password " . $v_user . " " . $v_password, $output, $return_var, ); @@ -194,7 +194,7 @@ sleep(5); $error = _("Code has been expired"); exec( - HESTIA_CMD . + TULIO_CMD . "v-log-user-login " . $v_user . " " . @@ -212,7 +212,7 @@ sleep(5); $error = _("Invalid username or code"); exec( - HESTIA_CMD . + TULIO_CMD . "v-log-user-login " . $v_user . " " . diff --git a/web/reset/mail/index.php b/web/reset/mail/index.php index e41cb538d..515a56169 100644 --- a/web/reset/mail/index.php +++ b/web/reset/mail/index.php @@ -11,7 +11,7 @@ $ok = 0; $ip = $_SERVER["REMOTE_ADDR"]; -exec(HESTIA_CMD . "v-list-sys-ips json", $output, $return_var); +exec(TULIO_CMD . "v-list-sys-ips json", $output, $return_var); $output = implode("", $output); $arr = json_decode($output, true); foreach ($arr as $arr_key => $arr_val) { @@ -55,7 +55,7 @@ $v_password = $_POST["password"]; // Get domain owner -exec(HESTIA_CMD . "v-search-domain-owner " . $v_domain . " 'mail'", $output, $return_var); +exec(TULIO_CMD . "v-search-domain-owner " . $v_domain . " 'mail'", $output, $return_var); if ($return_var != 0 || empty($output[0])) { echo "error domain owner not found"; exit(); @@ -65,7 +65,7 @@ // Get current password hash (called "md5" for legacy reasons, it's not guaranteed to be md5) exec( - HESTIA_CMD . + TULIO_CMD . "v-get-mail-account-value " . quoteshellarg($v_user) . " " . @@ -96,7 +96,7 @@ $new_password_file = stream_get_meta_data($fp)["uri"]; fwrite($fp, $_POST["new"] . "\n"); exec( - HESTIA_CMD . + TULIO_CMD . "v-change-mail-account-password " . quoteshellarg($v_user) . " " . diff --git a/web/reset2fa/index.php b/web/reset2fa/index.php index 864fc9871..6e4b35ce3 100644 --- a/web/reset2fa/index.php +++ b/web/reset2fa/index.php @@ -19,16 +19,16 @@ $v_user = quoteshellarg($_POST["user"]); $user = $_POST["user"]; $twofa = $_POST["twofa"]; - exec(HESTIA_CMD . "v-list-user " . $v_user . " json", $output, $return_var); + exec(TULIO_CMD . "v-list-user " . $v_user . " json", $output, $return_var); if ($return_var == 0) { $data = json_decode(implode("", $output), true); if ($data[$user]["TWOFA"] == $twofa) { $success = true; - exec(HESTIA_CMD . "v-delete-user-2fa " . $v_user, $output, $return_var); + exec(TULIO_CMD . "v-delete-user-2fa " . $v_user, $output, $return_var); session_destroy(); } else { exec( - HESTIA_CMD . + TULIO_CMD . "v-log-user-login " . $v_user . " " . @@ -45,7 +45,7 @@ } } else { exec( - HESTIA_CMD . + TULIO_CMD . "v-log-user-login " . $v_user . " " . diff --git a/web/restart/service/index.php b/web/restart/service/index.php index 2f549dc09..1638fe962 100644 --- a/web/restart/service/index.php +++ b/web/restart/service/index.php @@ -11,10 +11,10 @@ if ($_SESSION["userContext"] === "admin") { if (!empty($_GET["srv"])) { if ($_GET["srv"] == "iptables") { - exec(HESTIA_CMD . "v-update-firewall", $output, $return_var); + exec(TULIO_CMD . "v-update-firewall", $output, $return_var); } else { $v_service = quoteshellarg($_GET["srv"]); - exec(HESTIA_CMD . "v-restart-service " . $v_service . " yes", $output, $return_var); + exec(TULIO_CMD . "v-restart-service " . $v_service . " yes", $output, $return_var); } } if ($return_var != 0) { diff --git a/web/restart/system/index.php b/web/restart/system/index.php index 00fe9cbf0..5179a1b42 100644 --- a/web/restart/system/index.php +++ b/web/restart/system/index.php @@ -24,7 +24,7 @@ if (!empty($_GET["hostname"])) { touch($reset_token_file); $_SESSION["error_msg"] = _("The system is going down for reboot NOW!"); - exec(HESTIA_CMD . "v-restart-system yes", $output, $return_var); + exec(TULIO_CMD . "v-restart-system yes", $output, $return_var); } unset($output); } diff --git a/web/schedule/backup/incremental/index.php b/web/schedule/backup/incremental/index.php index 354aeabd5..773eeffa3 100644 --- a/web/schedule/backup/incremental/index.php +++ b/web/schedule/backup/incremental/index.php @@ -11,7 +11,7 @@ $_GET["object"] = ""; } -exec(HESTIA_CMD . "v-schedule-user-backup-restic " . $user, $output, $return_var); +exec(TULIO_CMD . "v-schedule-user-backup-restic " . $user, $output, $return_var); if ($return_var == 0) { $_SESSION["error_msg"] = _("Snapshot has been sheduled"); diff --git a/web/schedule/backup/index.php b/web/schedule/backup/index.php index e82dd5ef9..39b4283f4 100644 --- a/web/schedule/backup/index.php +++ b/web/schedule/backup/index.php @@ -6,7 +6,7 @@ // Check token verify_csrf($_GET); -exec(HESTIA_CMD . "v-schedule-user-backup " . $user, $output, $return_var); +exec(TULIO_CMD . "v-schedule-user-backup " . $user, $output, $return_var); if ($return_var == 0) { $_SESSION["error_msg"] = _( "Task has been added to the queue. You will receive an email notification when your backup is ready for download.", diff --git a/web/schedule/restore/incremental/index.php b/web/schedule/restore/incremental/index.php index b42dfc384..8a5d8879e 100644 --- a/web/schedule/restore/incremental/index.php +++ b/web/schedule/restore/incremental/index.php @@ -15,7 +15,7 @@ if (empty($_GET["type"])) { exec( - HESTIA_CMD . "v-schedule-user-restore-restic " . $user . " " . $snapshot, + TULIO_CMD . "v-schedule-user-restore-restic " . $user . " " . $snapshot, $output, $return_var, ); @@ -36,7 +36,7 @@ } } else { exec( - HESTIA_CMD . + TULIO_CMD . "v-schedule-user-restore-restic " . $user . " " . diff --git a/web/schedule/restore/index.php b/web/schedule/restore/index.php index d5668447f..84add0a10 100644 --- a/web/schedule/restore/index.php +++ b/web/schedule/restore/index.php @@ -38,7 +38,7 @@ if (!empty($_GET["type"])) { $restore_cmd = - HESTIA_CMD . + TULIO_CMD . "v-schedule-user-restore " . $user . " " . @@ -56,7 +56,7 @@ " " . $udir; } else { - $restore_cmd = HESTIA_CMD . "v-schedule-user-restore " . $user . " " . $backup; + $restore_cmd = TULIO_CMD . "v-schedule-user-restore " . $user . " " . $backup; } exec($restore_cmd, $output, $return_var); diff --git a/web/search/index.php b/web/search/index.php index d3b095db3..4cd17beb0 100644 --- a/web/search/index.php +++ b/web/search/index.php @@ -25,15 +25,15 @@ if (!empty($_GET["u"])) { $user = $u; exec( - HESTIA_CMD . "v-search-user-object " . $user . " " . $q . " json", + TULIO_CMD . "v-search-user-object " . $user . " " . $q . " json", $output, $return_var, ); } else { - exec(HESTIA_CMD . "v-search-object " . $q . " json", $output, $return_var); + exec(TULIO_CMD . "v-search-object " . $q . " json", $output, $return_var); } } else { - exec(HESTIA_CMD . "v-search-user-object " . $user . " " . $q . " json", $output, $return_var); + exec(TULIO_CMD . "v-search-user-object " . $user . " " . $q . " json", $output, $return_var); } $data = json_decode(implode("", $output), true); diff --git a/web/src/app/System/TulioApp.php b/web/src/app/System/TulioApp.php index 5dc23b79d..ab57ebc41 100644 --- a/web/src/app/System/TulioApp.php +++ b/web/src/app/System/TulioApp.php @@ -393,7 +393,7 @@ private function runUser(string $cmd, array $arguments): TulioCommandResult private function run(string $cmd, array $arguments): TulioCommandResult { - $cli_script = realpath(HESTIA_DIR_BIN . $cmd); + $cli_script = realpath(TULIO_DIR_BIN . $cmd); $command = ['/usr/bin/sudo', $cli_script, ...$arguments]; diff --git a/web/start/service/index.php b/web/start/service/index.php index e3ef42e83..7e11f220d 100644 --- a/web/start/service/index.php +++ b/web/start/service/index.php @@ -11,10 +11,10 @@ if ($_SESSION["userContext"] === "admin") { if (!empty($_GET["srv"])) { if ($_GET["srv"] == "iptables") { - exec(HESTIA_CMD . "v-update-firewall", $output, $return_var); + exec(TULIO_CMD . "v-update-firewall", $output, $return_var); } else { $v_service = quoteshellarg($_GET["srv"]); - exec(HESTIA_CMD . "v-start-service " . $v_service, $output, $return_var); + exec(TULIO_CMD . "v-start-service " . $v_service, $output, $return_var); } } if ($return_var != 0) { diff --git a/web/stop/service/index.php b/web/stop/service/index.php index cd33c70e6..a8eaa2ee4 100644 --- a/web/stop/service/index.php +++ b/web/stop/service/index.php @@ -11,10 +11,10 @@ if ($_SESSION["userContext"] === "admin") { if (!empty($_GET["srv"])) { if ($_GET["srv"] == "iptables") { - exec(HESTIA_CMD . "v-stop-firewall", $output, $return_var); + exec(TULIO_CMD . "v-stop-firewall", $output, $return_var); } else { $v_service = quoteshellarg($_GET["srv"]); - exec(HESTIA_CMD . "v-stop-service " . $v_service, $output, $return_var); + exec(TULIO_CMD . "v-stop-service " . $v_service, $output, $return_var); } } diff --git a/web/suspend/cron/index.php b/web/suspend/cron/index.php index 477ece116..8231cb370 100644 --- a/web/suspend/cron/index.php +++ b/web/suspend/cron/index.php @@ -8,7 +8,7 @@ if (!empty($_GET["job"])) { $v_job = quoteshellarg($_GET["job"]); - exec(HESTIA_CMD . "v-suspend-cron-job " . $user . " " . $v_job, $output, $return_var); + exec(TULIO_CMD . "v-suspend-cron-job " . $user . " " . $v_job, $output, $return_var); check_return_code($return_var, $output); unset($output); } diff --git a/web/suspend/db/index.php b/web/suspend/db/index.php index 75d94eddc..9c75c6ea8 100644 --- a/web/suspend/db/index.php +++ b/web/suspend/db/index.php @@ -9,7 +9,7 @@ if (!empty($_GET["database"])) { $v_database = quoteshellarg($_GET["database"]); - exec(HESTIA_CMD . "v-suspend-database " . $user . " " . $v_database, $output, $return_var); + exec(TULIO_CMD . "v-suspend-database " . $user . " " . $v_database, $output, $return_var); check_return_code($return_var, $output); unset($output); } diff --git a/web/suspend/dns/index.php b/web/suspend/dns/index.php index 8fa47222c..182aa68f0 100644 --- a/web/suspend/dns/index.php +++ b/web/suspend/dns/index.php @@ -10,7 +10,7 @@ // DNS domain if (!empty($_GET["domain"]) && empty($_GET["record_id"])) { $v_domain = quoteshellarg($_GET["domain"]); - exec(HESTIA_CMD . "v-suspend-dns-domain " . $user . " " . $v_domain, $output, $return_var); + exec(TULIO_CMD . "v-suspend-dns-domain " . $user . " " . $v_domain, $output, $return_var); check_return_code($return_var, $output); unset($output); $back = $_SESSION["back"]; @@ -27,7 +27,7 @@ $v_domain = quoteshellarg($_GET["domain"]); $v_record_id = quoteshellarg($_GET["record_id"]); exec( - HESTIA_CMD . "v-suspend-dns-record " . $user . " " . $v_domain . " " . $v_record_id, + TULIO_CMD . "v-suspend-dns-record " . $user . " " . $v_domain . " " . $v_record_id, $output, $return_var, ); diff --git a/web/suspend/firewall/index.php b/web/suspend/firewall/index.php index 4fc31dfaf..2826b4628 100644 --- a/web/suspend/firewall/index.php +++ b/web/suspend/firewall/index.php @@ -17,7 +17,7 @@ if (!empty($_GET["rule"])) { $v_rule = quoteshellarg($_GET["rule"]); - exec(HESTIA_CMD . "v-suspend-firewall-rule " . $v_rule, $output, $return_var); + exec(TULIO_CMD . "v-suspend-firewall-rule " . $v_rule, $output, $return_var); } check_return_code($return_var, $output); unset($output); diff --git a/web/suspend/mail/index.php b/web/suspend/mail/index.php index a62a72f9e..bb97d1a9e 100644 --- a/web/suspend/mail/index.php +++ b/web/suspend/mail/index.php @@ -10,7 +10,7 @@ // Mail domain if (!empty($_GET["domain"]) && empty($_GET["account"])) { $v_domain = quoteshellarg($_GET["domain"]); - exec(HESTIA_CMD . "v-suspend-mail-domain " . $user . " " . $v_domain, $output, $return_var); + exec(TULIO_CMD . "v-suspend-mail-domain " . $user . " " . $v_domain, $output, $return_var); check_return_code($return_var, $output); unset($output); $back = getenv("HTTP_REFERER"); @@ -28,7 +28,7 @@ $v_domain = quoteshellarg($_GET["domain"]); $v_account = quoteshellarg($_GET["account"]); exec( - HESTIA_CMD . "v-suspend-mail-account " . $user . " " . $v_domain . " " . $v_account, + TULIO_CMD . "v-suspend-mail-account " . $user . " " . $v_domain . " " . $v_account, $output, $return_var, ); diff --git a/web/suspend/user/index.php b/web/suspend/user/index.php index c7d4ad415..ab40fb2da 100644 --- a/web/suspend/user/index.php +++ b/web/suspend/user/index.php @@ -16,7 +16,7 @@ if (!empty($_GET["user"])) { $v_username = quoteshellarg($_GET["user"]); - exec(HESTIA_CMD . "v-suspend-user " . $v_username, $output, $return_var); + exec(TULIO_CMD . "v-suspend-user " . $v_username, $output, $return_var); } check_return_code($return_var, $output); unset($output); diff --git a/web/suspend/web/index.php b/web/suspend/web/index.php index 4b616ea1a..5c76620d4 100644 --- a/web/suspend/web/index.php +++ b/web/suspend/web/index.php @@ -10,7 +10,7 @@ if (!empty($_GET["domain"])) { $v_username = quoteshellarg($user); $v_domain = quoteshellarg($_GET["domain"]); - exec(HESTIA_CMD . "v-suspend-web-domain " . $user . " " . $v_domain, $output, $return_var); + exec(TULIO_CMD . "v-suspend-web-domain " . $user . " " . $v_domain, $output, $return_var); } check_return_code($return_var, $output); unset($output); diff --git a/web/templates/pages/add_firewall_banlist.php b/web/templates/pages/add_firewall_banlist.php index 89cda6acb..67b9f9afa 100644 --- a/web/templates/pages/add_firewall_banlist.php +++ b/web/templates/pages/add_firewall_banlist.php @@ -39,7 +39,7 @@ - + diff --git a/web/templates/pages/debug_panel.php b/web/templates/pages/debug_panel.php index a7b68e5d5..f5e3caf3e 100644 --- a/web/templates/pages/debug_panel.php +++ b/web/templates/pages/debug_panel.php @@ -1,5 +1,5 @@ diff --git a/web/templates/pages/list_services.php b/web/templates/pages/list_services.php index d7e237d26..8f3c07d62 100644 --- a/web/templates/pages/list_services.php +++ b/web/templates/pages/list_services.php @@ -63,7 +63,7 @@ class="button button-secondary button-danger data-controls js-confirm-action" "> - v + v
  • diff --git a/web/unsuspend/cron/index.php b/web/unsuspend/cron/index.php index f898aa819..5080390d5 100644 --- a/web/unsuspend/cron/index.php +++ b/web/unsuspend/cron/index.php @@ -11,7 +11,7 @@ if (!empty($_GET["job"])) { $v_job = quoteshellarg($_GET["job"]); - exec(HESTIA_CMD . "v-unsuspend-cron-job " . $user . " " . $v_job, $output, $return_var); + exec(TULIO_CMD . "v-unsuspend-cron-job " . $user . " " . $v_job, $output, $return_var); check_return_code($return_var, $output); unset($output); } diff --git a/web/unsuspend/db/index.php b/web/unsuspend/db/index.php index f77211381..b45362583 100644 --- a/web/unsuspend/db/index.php +++ b/web/unsuspend/db/index.php @@ -10,7 +10,7 @@ if (!empty($_GET["database"])) { $v_database = quoteshellarg($_GET["database"]); - exec(HESTIA_CMD . "v-unsuspend-database " . $user . " " . $v_database, $output, $return_var); + exec(TULIO_CMD . "v-unsuspend-database " . $user . " " . $v_database, $output, $return_var); check_return_code($return_var, $output); unset($output); } diff --git a/web/unsuspend/dns/index.php b/web/unsuspend/dns/index.php index 5c1771ec7..6af20963c 100644 --- a/web/unsuspend/dns/index.php +++ b/web/unsuspend/dns/index.php @@ -11,7 +11,7 @@ // DNS domain if (!empty($_GET["domain"]) && empty($_GET["record_id"])) { $v_domain = quoteshellarg($_GET["domain"]); - exec(HESTIA_CMD . "v-unsuspend-dns-domain " . $user . " " . $v_domain, $output, $return_var); + exec(TULIO_CMD . "v-unsuspend-dns-domain " . $user . " " . $v_domain, $output, $return_var); if ($return_var != 0) { $error = implode("
    ", $output); if (empty($error)) { @@ -34,7 +34,7 @@ $v_domain = quoteshellarg($_GET["domain"]); $v_record_id = quoteshellarg($_GET["record_id"]); exec( - HESTIA_CMD . "v-unsuspend-dns-record " . $user . " " . $v_domain . " " . $v_record_id, + TULIO_CMD . "v-unsuspend-dns-record " . $user . " " . $v_domain . " " . $v_record_id, $output, $return_var, ); diff --git a/web/unsuspend/firewall/index.php b/web/unsuspend/firewall/index.php index ba08b422a..55b00e36d 100644 --- a/web/unsuspend/firewall/index.php +++ b/web/unsuspend/firewall/index.php @@ -16,7 +16,7 @@ if (!empty($_GET["rule"])) { $v_rule = quoteshellarg($_GET["rule"]); - exec(HESTIA_CMD . "v-unsuspend-firewall-rule " . $v_rule, $output, $return_var); + exec(TULIO_CMD . "v-unsuspend-firewall-rule " . $v_rule, $output, $return_var); } check_return_code($return_var, $output); unset($output); diff --git a/web/unsuspend/mail/index.php b/web/unsuspend/mail/index.php index 08f8635d1..08e56fcbc 100644 --- a/web/unsuspend/mail/index.php +++ b/web/unsuspend/mail/index.php @@ -11,7 +11,7 @@ // Mail domain if (!empty($_GET["domain"]) && empty($_GET["account"])) { $v_domain = quoteshellarg($_GET["domain"]); - exec(HESTIA_CMD . "v-unsuspend-mail-domain " . $user . " " . $v_domain, $output, $return_var); + exec(TULIO_CMD . "v-unsuspend-mail-domain " . $user . " " . $v_domain, $output, $return_var); if ($return_var != 0) { $error = implode("
    ", $output); if (empty($error)) { @@ -35,7 +35,7 @@ $v_domain = quoteshellarg($_GET["domain"]); $v_account = quoteshellarg($_GET["account"]); exec( - HESTIA_CMD . "v-unsuspend-mail-account " . $user . " " . $v_domain . " " . $v_account, + TULIO_CMD . "v-unsuspend-mail-account " . $user . " " . $v_domain . " " . $v_account, $output, $return_var, ); diff --git a/web/unsuspend/user/index.php b/web/unsuspend/user/index.php index 2fe7948b9..854aced24 100644 --- a/web/unsuspend/user/index.php +++ b/web/unsuspend/user/index.php @@ -17,7 +17,7 @@ if (!empty($_GET["user"])) { $v_username = quoteshellarg($_GET["user"]); - exec(HESTIA_CMD . "v-unsuspend-user " . $v_username, $output, $return_var); + exec(TULIO_CMD . "v-unsuspend-user " . $v_username, $output, $return_var); } check_return_code($return_var, $output); unset($output); diff --git a/web/unsuspend/web/index.php b/web/unsuspend/web/index.php index 75e1ed607..70718d223 100644 --- a/web/unsuspend/web/index.php +++ b/web/unsuspend/web/index.php @@ -10,7 +10,7 @@ if (!empty($_GET["domain"])) { $v_domain = quoteshellarg($_GET["domain"]); - exec(HESTIA_CMD . "v-unsuspend-domain " . $user . " " . $v_domain, $output, $return_var); + exec(TULIO_CMD . "v-unsuspend-domain " . $user . " " . $v_domain, $output, $return_var); check_return_code($return_var, $output); unset($output); } diff --git a/web/update/tulio/index.php b/web/update/tulio/index.php index 1b4b00617..6ae7de4e5 100644 --- a/web/update/tulio/index.php +++ b/web/update/tulio/index.php @@ -11,7 +11,7 @@ if ($_SESSION["userContext"] === "admin") { if (!empty($_GET["pkg"])) { $v_pkg = quoteshellarg($_GET["pkg"]); - exec(HESTIA_CMD . "v-update-sys-tulio " . $v_pkg, $output, $return_var); + exec(TULIO_CMD . "v-update-sys-tulio " . $v_pkg, $output, $return_var); } if ($return_var != 0) {