Allow install.sh to use custom git URL and drop gitea installer

This commit is contained in:
root
2026-01-30 16:54:28 +02:00
parent 2399e96970
commit ff4e07996f
3 changed files with 47 additions and 3582 deletions

View File

@@ -27,6 +27,12 @@ Quick install:
curl -fsSL https://raw.githubusercontent.com/shukiv/jabali-panel/main/install.sh | sudo bash curl -fsSL https://raw.githubusercontent.com/shukiv/jabali-panel/main/install.sh | sudo bash
``` ```
Gitea install (self-hosted):
```
curl -fsSL http://192.168.100.100:3001/shukivaknin/jabali-panel/raw/branch/main/install.sh | sudo bash
```
Optional flags: Optional flags:
- `JABALI_MINIMAL=1` for core-only install - `JABALI_MINIMAL=1` for core-only install

View File

@@ -3469,6 +3469,9 @@ show_usage() {
echo "" echo ""
echo "Usage: $0 [command] [options]" echo "Usage: $0 [command] [options]"
echo "" echo ""
echo "Options:"
echo " --git <url> Use a custom git repository URL"
echo ""
echo "Commands:" echo "Commands:"
echo " install Install Jabali Panel (default, interactive)" echo " install Install Jabali Panel (default, interactive)"
echo " uninstall [--force] Remove Jabali Panel and all components" echo " uninstall [--force] Remove Jabali Panel and all components"
@@ -3495,6 +3498,12 @@ show_usage() {
echo " Minimal install (non-interactive):" echo " Minimal install (non-interactive):"
echo " SERVER_HOSTNAME=panel.example.com JABALI_MINIMAL=1 curl -fsSL ... | sudo bash" echo " SERVER_HOSTNAME=panel.example.com JABALI_MINIMAL=1 curl -fsSL ... | sudo bash"
echo "" echo ""
echo " Install from custom git repository:"
echo " curl -fsSL https://raw.githubusercontent.com/shukiv/jabali-panel/main/install.sh | sudo bash -s -- install --git http://git.example.com/org/repo.git"
echo ""
echo " Install using Gitea-hosted installer:"
echo " curl -fsSL http://192.168.100.100:3001/shukivaknin/jabali-panel/raw/branch/main/install.sh | sudo bash"
echo ""
echo " Uninstall:" echo " Uninstall:"
echo " curl -fsSL https://raw.githubusercontent.com/shukiv/jabali-panel/main/install.sh | sudo bash -s -- uninstall" echo " curl -fsSL https://raw.githubusercontent.com/shukiv/jabali-panel/main/install.sh | sudo bash -s -- uninstall"
echo "" echo ""
@@ -3599,18 +3608,47 @@ main() {
} }
# Parse command line arguments # Parse command line arguments
case "${1:-install}" in COMMAND="install"
UNINSTALL_FORCE=""
while [[ $# -gt 0 ]]; do
case "$1" in
install|uninstall|remove|purge|--help|-h|help)
COMMAND="$1"
shift
;;
--git)
if [[ -z "${2:-}" ]]; then
error "Missing value for --git"
show_usage
exit 1
fi
JABALI_REPO="$2"
shift 2
;;
--force|-f)
UNINSTALL_FORCE="--force"
shift
;;
*)
error "Unknown option: $1"
show_usage
exit 1
;;
esac
done
case "$COMMAND" in
install) install)
main main
;; ;;
uninstall|remove|purge) uninstall|remove|purge)
uninstall "$2" uninstall "$UNINSTALL_FORCE"
;; ;;
--help|-h|help) --help|-h|help)
show_usage show_usage
;; ;;
*) *)
error "Unknown command: $1" error "Unknown command: $COMMAND"
show_usage show_usage
exit 1 exit 1
;; ;;

File diff suppressed because it is too large Load Diff