diff options
author | RaindropsSys <raindrops@equestria.dev> | 2024-06-13 15:46:03 +0200 |
---|---|---|
committer | RaindropsSys <raindrops@equestria.dev> | 2024-06-13 15:46:03 +0200 |
commit | e44e2fe070484e06d384a31ef2699c3a2d5d474e (patch) | |
tree | 2d5eb5d1b01646270d18cf1f2d94519966d6e7de /updater/sql/doall.sh | |
download | faunerie-e44e2fe070484e06d384a31ef2699c3a2d5d474e.tar.gz faunerie-e44e2fe070484e06d384a31ef2699c3a2d5d474e.tar.bz2 faunerie-e44e2fe070484e06d384a31ef2699c3a2d5d474e.zip |
GitHub migration
Diffstat (limited to 'updater/sql/doall.sh')
-rwxr-xr-x | updater/sql/doall.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/updater/sql/doall.sh b/updater/sql/doall.sh new file mode 100755 index 0000000..89594f8 --- /dev/null +++ b/updater/sql/doall.sh @@ -0,0 +1,15 @@ +#!/bin/bash +PATH=/opt/homebrew/Cellar/postgresql@16/16.2_1/bin:$PATH +brew services start postgresql@16 +rm -f $HOME/.db.pgdump +wget $1 -O $HOME/.db.pgdump +dropdb --if-exists derpibooru +#sudo -u postgres dropdb --if-exists derpibooru +createdb derpibooru +#sudo -u postgres createdb derpibooru +pg_restore -v -O -d derpibooru $HOME/.db.pgdump +#sudo -u postgres pg_restore -v -O -d derpibooru $HOME/.db.pgdump +python3 main.py +#sudo -u postgres bash -c "cd $PATH && python3 main.py" +brew services stop postgresql@16 +rm -f $HOME/.db.pgdump |