Hexallion.com
  1. Installation
Hexallion.com
  • Overview
  • Getting Started
    • Glossary
    • Where to start?
    • What does agent-client mean?
    • Resource monitoring
    • Reseller webhooks
    • Installation
      • Setting up tariffs and groups
      • Setup of the first server and agent installation
      • Installing VPN servers
      • Script Recipes & Macroses
      • Firewalls
      • DNS & Cloudflare Tunnel
      • VPN Servers
        • OpenVPN
        • WireGuard
        • V2Fly
        • XRay
    • Generating VPN accounts
      • Registration of the first reseller
      • Creating the first user and testing the VPN
  • User Guide
    • Using the Admin Panel
      • Dashboard Overview
      • Managing Servers
      • Managing Resellers
      • Managing Users
      • Settings
    • Ordering and Access
      • Choosing a Tariff
      • Naming the Service
      • Payment Process
      • Receiving Admin Panel Access and API Links
  • Best Practices
    • Using NextDns.io and providing DNS filtering
    • Selling accounts through RevenueCat
    • Mobile application and generation of free accounts
    • Selling via telegramBot
  • Integrations
    • RevenueCat
    • PlayIntegrity & DeviceCheck
    • Partitions Servers
    • Geo Limits
    • WHMCS
  • APIs for User
    • Sessions
      • Get session
      • Create sessions
      • Delete session
    • VPN
      • Get vpn servers
      • Get vpn servers config
    • Notify
      • Get user`s notifications
      • Delete notification by Id
    • Get user`s ip address
    • Get user`s servers
    • Get user by revenuecat id
  • APIs for Reseller
    • Users
      • Create a new user
      • GET user by UUID
      • Delete a user by uuid
      • Get user`s token
      • Update user`s token
      • Set user status to on
      • Set user status to off
      • Update user`s number of devices
      • Set user`s expiry date
      • GET users list
    • Notifications
      • Create a notification
      • Get user`s notification
      • Delete all user`s notifications
      • Notify all users
      • Delete a specific notification by id
    • VPN
      • Get vpn servers list
      • Get vpn servers config
      • Delete Sessions
    • GET API-keys info
    • GET news
    • Get servers list
    • Webhook for RevenueCat
  • User Stories and Use Cases
    • Developer Use Cases
    • Reseller Use Cases
    • End-User Scenarios
  • Video Tutorials and Walkthroughs
    • Setting up Tariffs and Groups
    • Installing and Configuring Servers
    • Using the Admin Panel
    • Integrations Setup
    • Generating and Managing VPN Accounts
  • Troubleshooting
    • Common Issues and Solutions
    • FAQ
  • Contact and Support
    • Getting Help
    • Support Channels
  1. Installation

Script Recipes & Macroses

📌
This page still requires rewriting. This is not the final version
Script Recipes and Macroses are powerful tools in Hexallion that enable you to automate various server management tasks, ensuring efficiency and consistency across your VPN infrastructure. These tools allow you to deploy configurations, perform updates, and manage resources dynamically with minimal manual intervention. This guide will explain how to create and use Script Recipes and Macroses, including examples of Dynamic Values.

What are Script Recipes?#

Script Recipes are predefined scripts that automate complex tasks on your servers. They are used to streamline processes such as installing software, configuring settings, and performing routine maintenance. By using Script Recipes, you can ensure that all your servers are configured uniformly and according to best practices.

Creating Script Recipes#

To create a Script Recipe in Hexallion, follow these steps:
1.
Access the Script Recipes Section: Log in to the Hexallion admin panel and navigate to the "Settings" menu. Select "Recipes" to access the Script Recipes section.
2.
Add New Recipe: Click on "Add New Recipe" to create a new script. Provide a descriptive name and version for the recipe.
3.
Write the Script: In the script editor, write the commands and scripts necessary to perform the desired task. For example, you might write a script to install OpenVPN on a server or update firewall rules.
4.
Save the Recipe: Once you have written and reviewed your script, click "Save" to add the recipe to your list of available scripts.
[Image Placeholder: Screenshot of the Script Recipe creation form in the Hexallion admin panel]
Caption: Create new Script Recipes by writing and saving scripts to automate server management tasks.

Using Script Recipes#

Once you have created a Script Recipe, you can apply it to your servers:
1.
Select Server: Navigate to the "Servers" section and select the server you want to manage.
2.
Install Recipe: In the server details page, go to the "Install Recipe" tab. Choose the desired recipe from the list and click "Install."
3.
Monitor Execution: The Hexallion agent will execute the script on the selected server. You can monitor the progress and status of the execution in real-time.

What are Macroses?#

Macroses (or Dynamic Values) are placeholders used within Script Recipes to insert dynamic values. These values are automatically replaced with actual data during script execution, allowing for flexible and reusable scripts. Examples of dynamic values include {{SERVER_IP}}, {{SERVER_PORT}}, and {{USER_NAME}}.

Using Macroses in Scripts#

To use Macroses in your Script Recipes, simply include the placeholders within your script. During execution, Hexallion will replace these placeholders with the appropriate values. Here are some common Macroses and their uses:
{{SERVER_IP}}: The IP address of the server where the script is being executed.
{{SERVER_PORT}}: The port number assigned to the server.
{{USER_NAME}}: The username for accessing the server.
{{VPN_PROTOCOL}}: The VPN protocol being configured, such as OpenVPN or WireGuard.
Example Script Using Macroses:
#!/bin/bash
# Install OpenVPN
apt-get update
apt-get install -y openvpn

# Configure OpenVPN
echo "Configuring OpenVPN for server {{SERVER_IP}} on port {{SERVER_PORT}}"
cat <<EOF > /etc/openvpn/server.conf
port {{SERVER_PORT}}
proto udp
dev tun
server {{VPN_SUBNET}} {{VPN_NETMASK}}
push "route {{SERVER_IP}} 255.255.255.0"
EOF

# Start OpenVPN service
systemctl start openvpn@server
systemctl enable openvpn@server

Benefits of Using Script Recipes and Macroses#

Consistency: Ensure all your servers are configured uniformly by using standardized scripts.
Efficiency: Automate repetitive tasks, reducing manual effort and the potential for errors.
Scalability: Easily apply configurations across multiple servers, allowing your infrastructure to scale seamlessly.
Flexibility: Use Macroses to create dynamic and reusable scripts that adapt to different server environments.

Best Practices#

Test Scripts: Always test your scripts on a staging server before deploying them to production environments.
Version Control: Use versioning for your recipes to keep track of changes and ensure compatibility.
Documentation: Document your recipes and macroses clearly, making it easier for other administrators to understand and use them.
[Image Placeholder: Screenshot of a Script Recipe being applied to a server]
Caption: Apply Script Recipes to servers to automate configuration and management tasks.

Summary#

Script Recipes and Macroses (Dynamic Values) in Hexallion provide a powerful way to automate and streamline server management. By creating and using these tools, you can ensure consistent, efficient, and flexible management of your VPN infrastructure. Embrace the automation capabilities of Hexallion to optimize your operations and focus on delivering exceptional VPN services to your users.
Stay tuned for more updates as we continue to enhance the Hexallion platform with even more automation and management tools.
[Image Placeholder: Diagram showing the workflow of creating and applying Script Recipes with Macroses]
Caption: The workflow involves creating Script Recipes, using Macroses for dynamic values, and applying them to servers for automated management.
Modified at 2024-06-11 17:17:11
Previous
Installing VPN servers
Next
Firewalls
Built with