feature/verified (#61)
* add store methods for verification * add verify rest and auth * lint: fix double conversion of userID key * test for middleware, fix log without auth info * make all scripts with -e
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
# this scrips makes a backup file to /srv/var/userbackup-<site>-<timestamp>.gz
|
||||
|
||||
set -e
|
||||
BACKUP_PATH=${BACKUP_PATH:-./var}
|
||||
backup_file=${BACKUP_PATH}/userbackup-${1}-$(date +%s).gz
|
||||
echo "make backup file for site $1 to $backup_file"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
echo "import disqus file $1 to site $2"
|
||||
curl -X POST -H "Content-Type: application/json" -d @/srv/var/$1 "http://127.0.0.1:8081/api/v1/admin/import?site=${2}&provider=disqus&secret=${SECRET}"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
# this scrips making a backup file to /tmp/export-remark.gz and loading it back
|
||||
# useful to migrate data schema in case if new version of data store incomaptible with the stored comments.
|
||||
|
||||
set -e
|
||||
echo "make backup file for site $1"
|
||||
curl "http://127.0.0.1:8081/api/v1/admin/export?site=${1}&secret=${SECRET}" > /tmp/export-remark.gz
|
||||
|
||||
@@ -19,5 +19,5 @@ ls -laH /tmp/backup.remark
|
||||
echo "export to site $1"
|
||||
curl -X POST -H "Content-Type: application/json" --data-binary @/tmp/backup.remark "http://127.0.0.1:8081/api/v1/admin/import?site=${1}&provider=native&secret=${SECRET}"
|
||||
|
||||
rm -f /tmp/backup.remark
|
||||
rm -f /tmp/export-remark.gz
|
||||
rm /tmp/backup.remark
|
||||
rm /tmp/export-remark.gz
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
echo "import backup file $1 to site $2"
|
||||
|
||||
echo "unpack $1"
|
||||
@@ -8,4 +9,4 @@ size=`stat -c "%s" /tmp/backup.remark`
|
||||
echo "source file size ${size}"
|
||||
|
||||
curl -X POST -H "Content-Type: application/json" --data-binary @/tmp/backup.remark "http://127.0.0.1:8081/api/v1/admin/import?site=${2}&provider=native&secret=${SECRET}"
|
||||
rm -fq /tmp/backup.remark
|
||||
rm /tmp/backup.remark
|
||||
|
||||
Reference in New Issue
Block a user