blob: 3ef1234f38652d41bd4b2333ac8b156065b94a4c [file] [log] [blame]
#!/bin/sh
#
# Prepare Storage Box for prod use:
# $ prod-init
#
# Prepare TV Box for prod use:
# $ prod-init [<Storage Box serial number>]
is-storage-box || is-tv-box || (echo "$0 failed"; exit 1)
/etc/init.d/S95sageserver stop
rm -rf /rw/sage/*
if is-storage-box; then
FILE="/rw/sage/Sage.properties"
echo "zzz=true" >>$FILE
chmod 644 $FILE
chown video.video $FILE
fi
if is-tv-box; then
FILE="/rw/sage/SageClient.properties"
if [ -n "$1" ]; then
echo "forced_server_serial=$1" >>$FILE
fi
echo "zzz=true" >>$FILE
chmod 644 $FILE
chown video.video $FILE
fi
sync