make gitea executable before starting the service

This commit is contained in:
Clément 2018-05-15 10:59:56 +02:00
parent def8630950
commit a3bb83127f
2 changed files with 4 additions and 3 deletions

View File

@ -74,6 +74,7 @@ set_permission() {
chown -R $app:$app "/home/$app"
chown -R $app:$app "/var/log/$app"
chmod u=rwX,g=rX,o= "$final_path"
chmod u=rwx,g=rx,o= "$final_path/gitea"
chmod u=rwX,g=rX,o= "/home/$app"
chmod u=rwX,g=rX,o= "/var/log/$app"
}

View File

@ -78,12 +78,12 @@ config_gitea
# Install gitea
wget https://github.com/go-gitea/gitea/releases/download/v1.3.3/gitea-1.3.3-linux-amd64 -O $final_path/gitea
# Start gitea for building mysql tables
systemctl start "$app".service
# Set permissions
set_permission
# Start gitea for building mysql tables
systemctl start "$app".service
# Wait till login_source mysql table is created
while ! $(ynh_mysql_connect_as "$dbuser" "$dbpass" "$dbname" <<< "SELECT * FROM login_source;" &>/dev/null)
do