OSDN Git Service

bubbleupnp-server: fix the restore script. bubbleupnp-server-0.2.2
authorwhitestar <whitestar@users.osdn.me>
Mon, 3 Jan 2022 10:47:59 +0000 (19:47 +0900)
committerwhitestar <whitestar@users.osdn.me>
Mon, 3 Jan 2022 10:49:01 +0000 (19:49 +0900)
cookbooks/bubbleupnp-server/CHANGELOG.md
cookbooks/bubbleupnp-server/templates/default/opt/docker-compose/app/bubbleupnp-server/restore.sh
cookbooks/bubbleupnp-server/version

index 9b2d038..9e61d84 100644 (file)
@@ -1,5 +1,9 @@
 # bubbleupnp-server CHANGELOG
 
+0.2.2
+-----
+- fix the restore script.
+
 0.2.1
 -----
 - fix volume mounting for the official image.
index 58051b2..a3b5439 100755 (executable)
@@ -1,8 +1,12 @@
-#!/bin/sh
+#!/bin/bash
 
 backup_dir=bak
 container_id=`sudo docker-compose ps -q bubbleupnp-server`
 
+# Note: `docker cp` chown root:root
 sudo docker cp ./${backup_dir}/configuration.xml ${container_id}:<%= @workdir %>/
 sudo docker cp ./${backup_dir}/cache ${container_id}:<%= @workdir %>/
 sudo docker cp ./${backup_dir}/Playlists ${container_id}:<%= @workdir %>/
+
+# fix file owner
+sudo docker exec -u root ${container_id} chown -R bubbleupnpserver:users <%= @workdir %>/{configuration.xml,cache,Playlists}