Commit ec33b12f authored by Jens Langhammer's avatar Jens Langhammer

enable services post install, fix secret_key

parent c95b42f9
Pipeline #3335 passed with stages
in 14 minutes and 54 seconds
......@@ -25,12 +25,14 @@ echo " * Updating pillow install"
/usr/share/pyazo/env/bin/pip install --no-cache-dir --upgrade --force-reinstall pillow
if [ ! -f '/etc/pyazo/secret_key' ]; then
echo " * Generating Secret Key"
/usr/share/pyazo/ generate_secret_key > /etc/pyazo/secret_key 2> /dev/null
python -c 'import random; result = "".join([random.choice("abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)") for i in range(50)]); print(result)' > /etc/pyazo/secret_key 2> /dev/null
chmod 440 /etc/pyazo/secret_key
echo " * Running Database Migration"
/usr/share/pyazo/ migrate
echo " * Restarting services..."
systemctl enable pyazo.service
systemctl enable pyazo-worker.service
systemctl restart pyazo.service
systemctl restart pyazo-worker.service
echo " * A superuser can be created with this command '/usr/share/pyazo/ createsuperuser'"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment