jdormit-infra/prod/wallabag/packer/scripts/wallabag.sh

21 lines
641 B
Bash
Raw Normal View History

#!/usr/bin/env bash
set -xe
sudo usermod --shell /bin/bash www-data
git clone https://github.com/wallabag/wallabag.git /var/www/wallabag
mv /tmp/wallabag-params.yml /var/www/wallabag/app/config/parameters.yml
chown -R www-data:www-data /var/www/wallabag
chown www-data:www-data /tmp/entries.json
sudo -i -u www-data bash << EOF
set -xe
cd /var/www/wallabag
make install
php bin/console --env=prod fos:user:create jdormit jeremy.dormitzer@gmail.com "$ADMIN_PASSWORD" --super-admin
php bin/console --env=prod wallabag:import --importer=v2 jdormit /tmp/entries.json
2021-01-07 15:48:14 +00:00
sqlite3 /var/www/wallabag/data/db/wallabag.sqlite < /tmp/clients.sql
EOF