minor changes
This commit is contained in:
parent
ba97731670
commit
c9f3d76076
@ -46,7 +46,7 @@ servicedead () { status=$(systemctl is-active $service); if [[ "$status" != "ac
|
|||||||
inputcheck () {
|
inputcheck () {
|
||||||
if [[ -z "$hostname" ]]; then usage ; printf "Error! Hostname Empty...\n\n" ; exit; fi
|
if [[ -z "$hostname" ]]; then usage ; printf "Error! Hostname Empty...\n\n" ; exit; fi
|
||||||
if [[ -z "$giteapwd" ]]; then usage ; printf "Error! Database Password Empty...\n\n" ; exit; fi
|
if [[ -z "$giteapwd" ]]; then usage ; printf "Error! Database Password Empty...\n\n" ; exit; fi
|
||||||
if [[ -z "$mariadbpass" ]]; then usage ; printf "Error! Database Password Empty...\n\n" ; exit; fi; }
|
if [[ -z "$mariadbpwd" ]]; then usage ; printf "Error! Database Password Empty...\n\n" ; exit; fi; }
|
||||||
#
|
#
|
||||||
# If Nginx and MariaDB is not running then die
|
# If Nginx and MariaDB is not running then die
|
||||||
#
|
#
|
||||||
@ -74,7 +74,7 @@ while getopts "n:p:r:h:" option; do
|
|||||||
giteapwd=$OPTARG;;
|
giteapwd=$OPTARG;;
|
||||||
|
|
||||||
r) # mariadb root password
|
r) # mariadb root password
|
||||||
mariadbpass=$OPTARG;;
|
mariadbpwd=$OPTARG;;
|
||||||
|
|
||||||
h) # display help
|
h) # display help
|
||||||
usage ; exit;;
|
usage ; exit;;
|
||||||
@ -86,7 +86,7 @@ done
|
|||||||
#
|
#
|
||||||
# Check if input conditions are met
|
# Check if input conditions are met
|
||||||
#
|
#
|
||||||
inputcheck "$hostname" "$giteapwd"
|
inputcheck "$hostname" "$giteapwd" "$mariadbpwd"
|
||||||
#
|
#
|
||||||
# Download and install Gitea
|
# Download and install Gitea
|
||||||
#
|
#
|
||||||
@ -108,7 +108,7 @@ GRANT ALL PRIVILEGES ON gitea.* TO 'gitea'@'127.0.0.1' IDENTIFIED BY '$giteapwd'
|
|||||||
FLUSH PRIVILEGES;
|
FLUSH PRIVILEGES;
|
||||||
"
|
"
|
||||||
printf '%s\n' "${giteasql[@]}" |sed '1d; $d' > giteasql.sql
|
printf '%s\n' "${giteasql[@]}" |sed '1d; $d' > giteasql.sql
|
||||||
mysql -u root -p"$mariadbpass" < giteasql.sql
|
mysql -u root -p"$mariadbpwd" < giteasql.sql
|
||||||
#
|
#
|
||||||
# Create a Gitea Nginx configuration file
|
# Create a Gitea Nginx configuration file
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user