Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add usage to script #1

Open
kodmanyagha opened this issue Jul 8, 2022 · 0 comments
Open

Add usage to script #1

kodmanyagha opened this issue Jul 8, 2022 · 0 comments

Comments

@kodmanyagha
Copy link

I think this proxy.sh's feature should be inside of Cpanel but they didn't add this feature still. But no problem, I'm using your script well. But I want to add a small change in this script. Please can you add an "usage" message to script? For example:

#!/bin/bash
echo "========================================================="
echo "==!! cPanel Apache Reverse Proxy !!=="
echo "==!! Usage: proxy.sh {account_username} {subdomain/domain} {local_proxy_path}"
echo "========================================================="
echo ""
DOMAIN=$2
USER=$1
LOCAL=$3

if [[ -z "$USER" ]]; then
    echo "Usage: proxy.sh {account_username} {subdomain/domain} {local_proxy_path}"
    echo "Set a valid cPanel User "
    exit 1
fi

if [[ -z "$DOMAIN" ]]; then
    echo "Usage: proxy.sh {account_username} {subdomain/domain} {local_proxy_path}"
    echo "Set a valid Domain Name"
    exit 1
fi

if [[ -z "$LOCAL" ]]; then
    echo "Usage: proxy.sh {account_username} {subdomain/domain} {local_proxy_path}"
    echo "Set a valid Local Proy Path"
    exit 1
fi

Something like that. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant