Additions to mayan sequence

file permission update
This commit is contained in:
2019-05-16 19:31:33 +00:00
parent 50e4bf01c4
commit 34966ddf79
3 changed files with 16 additions and 2 deletions

0
seqs/gitea.sh Normal file → Executable file
View File

0
seqs/kodi.sh Normal file → Executable file
View File

18
seqs/mayan-edms.sh Normal file → Executable file
View File

@@ -10,7 +10,7 @@ step_1() {
exe apt --no-install-recommends install libreoffice -y exe apt --no-install-recommends install libreoffice -y
} }
step_2_info() { echo "Get $toolName binary dependcies"; } step_2_info() { echo "Get $toolName binary dependencies"; }
step_2() { step_2() {
exe apt install g++ gcc ghostscript gnupg1 graphviz libfuse2 \ exe apt install g++ gcc ghostscript gnupg1 graphviz libfuse2 \
libjpeg-dev libmagic1 libpq-dev libpng-dev libtiff-dev \ libjpeg-dev libmagic1 libpq-dev libpng-dev libtiff-dev \
@@ -34,7 +34,6 @@ postgresPass=""
step_4_info() { echo "Create postgres database for $toolName"; } step_4_info() { echo "Create postgres database for $toolName"; }
step_4_alias() { ALIAS="createdb"; } step_4_alias() { ALIAS="createdb"; }
step_4() { step_4() {
{
exe read -p "Enter postgres database name: " postgresDb exe read -p "Enter postgres database name: " postgresDb
endCheckEmpty postgresDb "database" endCheckEmpty postgresDb "database"
exe read -p "Enter postgres user name: " postgresUser exe read -p "Enter postgres user name: " postgresUser
@@ -146,4 +145,19 @@ startsecs = 10
stopwaitsecs = 1 stopwaitsecs = 1
user = mayan" user = mayan"
step_20_info() { echo "Backup postgres database to media folder"; }
step_20_alias() { ALIAS=backupdb; }
step_20() {
echo "Backup with standard user / database: mayan / mayan"
exe pg_dump -h 127.0.0.1 -U mayan -c mayan -W > ${toolMediaFolder}/`date +%Y-%m-%d"_"%H-%M-%S`.sql
}
step_22_info() { echo "Postgres database restore"; }
step_22() {
echo "1. Create a empty postgres database first (step 4)"
echo "2. psql -h <host> -U <database user> -d <database name> -W -f <sql dump file>"
echo " e.g. psql -h 127.0.0.1 -U mayan -d mayan -W -f 2018-06-07_18-10-56.sql"
}
VERSION_SEQREV=2
. sequencer.sh . sequencer.sh