Use Pandora provided ctl wrapper for service handling.
This commit is contained in:
parent
ddf8498896
commit
aec12063cc
@ -49,21 +49,13 @@ chown -R pandora:pandora /srv/pandora
|
|||||||
# Populate database
|
# Populate database
|
||||||
sudo -u pandora /srv/pandora/pandora/manage.py init_db
|
sudo -u pandora /srv/pandora/pandora/manage.py init_db
|
||||||
|
|
||||||
# Install systemd services
|
|
||||||
cp /srv/pandora/etc/systemd/system/*.service /etc/systemd/system/
|
|
||||||
cp /srv/pandora/etc/tmpfiles.d/pandora.conf /etc/tmpfiles.d/
|
|
||||||
systemd-tmpfiles --create /etc/tmpfiles.d/pandora.conf
|
|
||||||
systemctl daemon-reload
|
|
||||||
|
|
||||||
# Create nginx site definition
|
# Create nginx site definition
|
||||||
cp ${SOURCE_DIR}/pandora/etc/nginx/sites-available/pandora /etc/nginx/sites-available/pandora
|
cp ${SOURCE_DIR}/pandora/etc/nginx/sites-available/pandora /etc/nginx/sites-available/pandora
|
||||||
ln -s /etc/nginx/sites-available/pandora /etc/nginx/sites-enabled/pandora
|
ln -s /etc/nginx/sites-available/pandora /etc/nginx/sites-enabled/pandora
|
||||||
|
|
||||||
# Start services
|
# Install and start services
|
||||||
for SERVICE in "pandora pandora-tasks pandora-encoding pandora-cron pandora-websocketd"; do
|
/srv/pandora/ctl install
|
||||||
systemctl enable ${SERVICE}
|
/srv/pandora/ctl start
|
||||||
systemctl start ${SERVICE}
|
|
||||||
done
|
|
||||||
systemctl restart nginx
|
systemctl restart nginx
|
||||||
|
|
||||||
# Add portal application definition
|
# Add portal application definition
|
||||||
|
Loading…
Reference in New Issue
Block a user