Skip to content

Commit

Permalink
Merge pull request linuxserver-archive#3 from sparklyballs/master
Browse files Browse the repository at this point in the history
update redis to ppa version.
  • Loading branch information
lonix committed Feb 8, 2016
2 parents 81105cd + 5da3daa commit 793ff54
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 11 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/create
apt-get clean && rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/*

# install packages
RUN apt-get update -q && \
RUN add-apt-repository ppa:chris-lea/redis-server && \
apt-get update -q && \
apt-get install $APTLIST -qy && \
# ln -s /usr/bin/nodejs /usr/bin/node && \

Expand Down
15 changes: 10 additions & 5 deletions defaults/update-script.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
#!/bin/bash

export X=X

UPDATER_LOG_DIR=/config/log/musicbrainz
mkdir -p $UPDATER_LOG_DIR
touch $UPDATER_LOG_DIR/slave.log
chown -R abc:abc $UPDATER_LOG_DIR
cd /app/musicbrainz
eval `./admin/ShowDBDefs`
cd /app/musicbrainz || exit
eval "$(./admin/ShowDBDefs)"

X=${SLAVE_LOG:=$UPDATER_LOG_DIR/slave.log}
X=${LOGROTATE:=/usr/sbin/logrotate --state $UPDATER_LOG_DIR/.logrotate-state}
./admin/replication/LoadReplicationChanges >> $SLAVE_LOG 2>&1 || {
./admin/replication/LoadReplicationChanges >> "$SLAVE_LOG" 2>&1 || {
RC=$?
echo `date`" : LoadReplicationChanges failed (rc=$RC) - see $SLAVE_LOG"
echo "$(date)"" : LoadReplicationChanges failed (rc=$RC) - see $SLAVE_LOG"
}
$LOGROTATE /dev/stdin <<EOF
$SLAVE_LOG {
daily
rotate 30
}
EOF
# eof
#eof

2 changes: 1 addition & 1 deletion init/005_set_time.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
if [[ $(cat /etc/timezone) != $TZ ]] ; then
if [[ $(cat /etc/timezone) != "$TZ" ]] ; then
echo "$TZ" > /etc/timezone
exec dpkg-reconfigure -f noninteractive tzdata
fi
Expand Down
10 changes: 6 additions & 4 deletions init/40_initialise.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ set_listen_addresses() {
if [ ! -s "$PGDATA/PG_VERSION" ]; then
chown -R abc:abc "$DATA_ROOT"

dumpver=$(curl -s $URL_ROOT/LATEST)
dumpver=$(curl -s "$URL_ROOT"/LATEST)
DUMP_URL="$URL_ROOT"/"$dumpver"
DUMP_DEST="$MBDATA"/"$dumpver"
mkdir -p "$DUMP_DEST"
chown abc:abc "$DUMP_DEST"
echo "fetching latest dump from musicbrainz, if this section fails try again later as musicbrainz dump may not be fully uploaded to their site"
echo "fetching latest dump from musicbrainz, if this section fails try again later as musicbrainz dump may not be fully uploaded
to their site"

# /sbin/setuser abc curl -o "$DUMP_DEST"/MD5SUMS -L -C - "$DUMP_URL"/MD5SUMS
/sbin/setuser abc curl -o "$DUMP_DEST"/mbdump-cdstubs.tar.bz2 -L -C - "$DUMP_URL"/mbdump-cdstubs.tar.bz2
Expand All @@ -35,7 +36,7 @@ echo "fetching latest dump from musicbrainz, if this section fails try again lat
/sbin/setuser abc curl -o "$DUMP_DEST"/mbdump-wikidocs.tar.bz2 -L -C - "$DUMP_URL"/mbdump-wikidocs.tar.bz2
/sbin/setuser abc curl -o "$DUMP_DEST"/mbdump.tar.bz2 -L -C - "$DUMP_URL"/mbdump.tar.bz2
# /sbin/setuser abc curl -o "$DUMP_DEST"/mbdump-sitemaps.tar.bz2 -L -C - "$DUMP_URL"/mbdump-sitemaps.tar.bz2
# /sbin/setuser abc curl -o "$DUMP_DEST"/mbdump-edit.tar.bz2 -L -C - "$DUMP_URL"/mbdump-edit.tar.bz2
# /sbin/setuser abc curl -o "$DUMP_DEST"/mbdump-edit.tar.bz2 -L -C - "$DUMP_URL"/mbdump-edit.tar.bz2

echo "initialising empty databases"
/sbin/setuser abc initdb >/dev/null 2>&1
Expand All @@ -54,7 +55,7 @@ sleep 5s
echo "BEGINNING INITIAL DATABASE IMPORT ROUTINE, THIS COULD TAKE SEVERAL HOURS AND THE DOCKER MAY LOOK UNRESPONSIVE"
echo "DO NOT STOP DOCKER UNTIL IT IS COMPLETED"

cd /app/musicbrainz
cd /app/musicbrainz || exit
/sbin/setuser abc ./admin/InitDb.pl --createdb --import "$DUMP_DEST"/mbdump*.tar.bz2 --tmp-dir "$DUMP_DEST" --echo
echo "INITIAL IMPORT IS COMPLETE, MOVING TO NEXT PHASE"

Expand All @@ -70,3 +71,4 @@ chown abc:abc "$PGCONF"/postgresql.conf
chmod 666 "$PGCONF"/postgresql.conf

crontab /defaults/musicbrainz

0 comments on commit 793ff54

Please sign in to comment.