Browse Source

updated gitea db-load to automatically restart service if necessary

feature/startup-from-labels
Mario Alegre 5 years ago
parent
commit
267ca891d6
  1. 7
      src/gitea/assets/bin/db-load

7
src/gitea/assets/bin/db-load

@ -1,3 +1,10 @@
#!/bin/bash #!/bin/bash
status=$(systemctl show gitea -p ActiveState --value)
if [[ $status == active]]; then
systemctl stop gitea
fi
db-make db-make
psql -U $DBUSER -d $DBNAME -f $1 psql -U $DBUSER -d $DBNAME -f $1
if [[ $status == active]]; then
systemctl start gitea
fi

Loading…
Cancel
Save