Allow install.sh to use custom git URL and drop gitea installer
This commit is contained in:
@@ -27,6 +27,12 @@ Quick install:
|
||||
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:
|
||||
|
||||
- `JABALI_MINIMAL=1` for core-only install
|
||||
|
||||
44
install.sh
44
install.sh
@@ -3469,6 +3469,9 @@ show_usage() {
|
||||
echo ""
|
||||
echo "Usage: $0 [command] [options]"
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo " --git <url> Use a custom git repository URL"
|
||||
echo ""
|
||||
echo "Commands:"
|
||||
echo " install Install Jabali Panel (default, interactive)"
|
||||
echo " uninstall [--force] Remove Jabali Panel and all components"
|
||||
@@ -3495,6 +3498,12 @@ show_usage() {
|
||||
echo " Minimal install (non-interactive):"
|
||||
echo " SERVER_HOSTNAME=panel.example.com JABALI_MINIMAL=1 curl -fsSL ... | sudo bash"
|
||||
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 " curl -fsSL https://raw.githubusercontent.com/shukiv/jabali-panel/main/install.sh | sudo bash -s -- uninstall"
|
||||
echo ""
|
||||
@@ -3599,18 +3608,47 @@ main() {
|
||||
}
|
||||
|
||||
# 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)
|
||||
main
|
||||
;;
|
||||
uninstall|remove|purge)
|
||||
uninstall "$2"
|
||||
uninstall "$UNINSTALL_FORCE"
|
||||
;;
|
||||
--help|-h|help)
|
||||
show_usage
|
||||
;;
|
||||
*)
|
||||
error "Unknown command: $1"
|
||||
error "Unknown command: $COMMAND"
|
||||
show_usage
|
||||
exit 1
|
||||
;;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user