mirror of
https://github.com/derf/travelynx
synced 2024-12-13 06:22:33 +00:00
25 lines
548 B
Bash
Executable file
25 lines
548 B
Bash
Executable file
#!/bin/sh
|
|
#
|
|
# Updates a travelynx instance deployed via git. Performs database migrations
|
|
# as necessary.
|
|
|
|
git pull
|
|
|
|
if [ "$1" = "with-deps" ]; then
|
|
mkdir local.new
|
|
cd local.new
|
|
cp ../cpanfile* .
|
|
carton install
|
|
cd ..
|
|
sudo systemctl stop travelynx
|
|
mv local local.old
|
|
mv local.new/local .
|
|
perl index.pl database migrate
|
|
sudo systemctl start travelynx
|
|
elif perl index.pl database has-current-schema; then
|
|
sudo systemctl reload travelynx
|
|
else
|
|
sudo systemctl stop travelynx
|
|
perl index.pl database migrate
|
|
sudo systemctl start travelynx
|
|
fi
|