minor changes
This commit is contained in:
parent
80b3ef07ab
commit
ba97731670
@ -54,6 +54,10 @@ and also the default "sites-enabled" Nginx configurarion I use
|
||||
[\[Here\]](https://git.x-files.dk/ubuntu-web-server/nginx-install/src/branch/main/cfg/default)
|
||||
when you start troubleshooting.
|
||||
|
||||
### Q and A
|
||||
Q: Why does the script need the MariaDB root password ?\
|
||||
A: The script need this password in order to be able to create the wordpress database and det the correct permisions.
|
||||
|
||||
### More guides
|
||||
More guides can be found on [\[wiki.x-files.dk\]](https://wiki.x-files.dk)
|
||||
|
||||
|
17
giteainstall
17
giteainstall
@ -31,6 +31,7 @@ printf -- "giteainstall \n\n"
|
||||
printf -- "Usage: \n"
|
||||
printf -- "./giteainstall [-n] <gitea domain> \n"
|
||||
printf -- " [-p] <gitea database password> \n"
|
||||
printf -- " [-r] <mariadb root password> \n"
|
||||
printf -- " [-help] <this screen> \n\n"
|
||||
printf -- "Examples: \n"
|
||||
printf -- "./giteainstall -n git.something.xyz -p giteadatabsepwd\n\n"; }
|
||||
@ -44,7 +45,8 @@ servicedead () { status=$(systemctl is-active $service); if [[ "$status" != "ac
|
||||
#
|
||||
inputcheck () {
|
||||
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 Nginx and MariaDB is not running then die
|
||||
#
|
||||
@ -58,11 +60,11 @@ clear ; title
|
||||
# Configure command line options
|
||||
#
|
||||
|
||||
# Removed due to SC2199 and not really needed start
|
||||
# if [[ ! $@ =~ ^\-.+ ]]; then usage; fi
|
||||
# Removed due to SC2199 and not really needed stop
|
||||
# shellcheck disable=SC2199
|
||||
if [[ ! $@ =~ ^\-.+ ]]; then usage; fi
|
||||
|
||||
while getopts "n:p:h:" option; do
|
||||
# shellcheck disable=SC2086
|
||||
while getopts "n:p:r:h:" option; do
|
||||
case $option in
|
||||
|
||||
n) # hostname
|
||||
@ -71,6 +73,9 @@ while getopts "n:p:h:" option; do
|
||||
p) # database password
|
||||
giteapwd=$OPTARG;;
|
||||
|
||||
r) # mariadb root password
|
||||
mariadbpass=$OPTARG;;
|
||||
|
||||
h) # display help
|
||||
usage ; exit;;
|
||||
|
||||
@ -103,7 +108,7 @@ GRANT ALL PRIVILEGES ON gitea.* TO 'gitea'@'127.0.0.1' IDENTIFIED BY '$giteapwd'
|
||||
FLUSH PRIVILEGES;
|
||||
"
|
||||
printf '%s\n' "${giteasql[@]}" |sed '1d; $d' > giteasql.sql
|
||||
mysql < giteasql.sql
|
||||
mysql -u root -p"$mariadbpass" < giteasql.sql
|
||||
#
|
||||
# Create a Gitea Nginx configuration file
|
||||
#
|
||||
|
Loading…
x
Reference in New Issue
Block a user