fix: nginx deployment syntax errors
Some checks failed
poll-upstream / check (push) Failing after 1s
Some checks failed
poll-upstream / check (push) Failing after 1s
This commit is contained in:
@@ -15,6 +15,8 @@ if rsync \
|
||||
--archive \
|
||||
--compress \
|
||||
--verbose \
|
||||
--rsync-path 'sudo rsync' \
|
||||
--chown root:root \
|
||||
${nginx_conf_local_path} \
|
||||
${nginx_host}:${nginx_conf_remote_path}; then
|
||||
echo "sync'd ${nginx_conf_local_path} to ${nginx_host}:${nginx_conf_remote_path}"
|
||||
@@ -24,7 +26,7 @@ else
|
||||
fi
|
||||
if ssh ${nginx_host} "id gitea_ci &> /dev/null || sudo useradd --system --create-home --home-dir /var/lib/gitea_ci gitea_ci"; then
|
||||
echo "gitea_ci user created or observed on ${nginx_host}"
|
||||
if ssh ${nginx_host} "sudo --user gitea_ci install --directory --mode 0700 /var/lib/gitea_ci/.ssh && echo '${gitea_ssh_key}' | sudo --user gitea_ci install --mode 0600 /dev/stdin /var/lib/gitea_ci/.ssh/authorized_keys"; then
|
||||
if ssh ${nginx_host} "sudo install --directory --owner gitea_ci --group gitea_ci --mode 0700 /var/lib/gitea_ci/.ssh && echo '${gitea_ssh_key}' | sudo sh -c 'install --owner gitea_ci --group gitea_ci --mode 0600 /dev/stdin /var/lib/gitea_ci/.ssh/authorized_keys'"; then
|
||||
echo "gitea_ci ssh key installed on ${nginx_host}"
|
||||
else
|
||||
echo "failed to install gitea_ci ssh key on ${nginx_host}"
|
||||
@@ -40,7 +42,7 @@ else
|
||||
echo "failed to create rpm repo directory on ${nginx_host}"
|
||||
exit 1
|
||||
fi
|
||||
if ssh ${nginx_host} "sudo ln -sf ${nginx_conf_remote_path} ${nginx_conf_remote_path/available/enabled} && sudo nginx -t ${nginx_conf_remote_path} && sudo systemctl reload nginx"; then
|
||||
if ssh ${nginx_host} "sudo ln -sf ${nginx_conf_remote_path} ${nginx_conf_remote_path/available/enabled} && sudo nginx -t && sudo systemctl reload nginx"; then
|
||||
echo "nginx config reload on ${nginx_host} successful"
|
||||
else
|
||||
echo "nginx config reload on ${nginx_host} failed"
|
||||
|
||||
Reference in New Issue
Block a user