{"action":"closed","issue":{"url":"https://api.github.com/repos/xibosignage/xibo/issues/816","repository_url":"https://api.github.com/repos/xibosignage/xibo","labels_url":"https://api.github.com/repos/xibosignage/xibo/issues/816/labels{/name}","comments_url":"https://api.github.com/repos/xibosignage/xibo/issues/816/comments","events_url":"https://api.github.com/repos/xibosignage/xibo/issues/816/events","html_url":"https://github.com/xibosignage/xibo/issues/816","id":161006535,"number":816,"title":"Errors in docker entrypoint script","user":{"login":"brodkin","id":236564,"avatar_url":"https://avatars.githubusercontent.com/u/236564?v=3","gravatar_id":"","url":"https://api.github.com/users/brodkin","html_url":"https://github.com/brodkin","followers_url":"https://api.github.com/users/brodkin/followers","following_url":"https://api.github.com/users/brodkin/following{/other_user}","gists_url":"https://api.github.com/users/brodkin/gists{/gist_id}","starred_url":"https://api.github.com/users/brodkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brodkin/subscriptions","organizations_url":"https://api.github.com/users/brodkin/orgs","repos_url":"https://api.github.com/users/brodkin/repos","events_url":"https://api.github.com/users/brodkin/events{/privacy}","received_events_url":"https://api.github.com/users/brodkin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/xibosignage/xibo/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"alexharrington","id":10450518,"avatar_url":"https://avatars.githubusercontent.com/u/10450518?v=3","gravatar_id":"","url":"https://api.github.com/users/alexharrington","html_url":"https://github.com/alexharrington","followers_url":"https://api.github.com/users/alexharrington/followers","following_url":"https://api.github.com/users/alexharrington/following{/other_user}","gists_url":"https://api.github.com/users/alexharrington/gists{/gist_id}","starred_url":"https://api.github.com/users/alexharrington/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexharrington/subscriptions","organizations_url":"https://api.github.com/users/alexharrington/orgs","repos_url":"https://api.github.com/users/alexharrington/repos","events_url":"https://api.github.com/users/alexharrington/events{/privacy}","received_events_url":"https://api.github.com/users/alexharrington/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2016-06-18T04:40:12Z","updated_at":"2016-06-18T08:14:26Z","closed_at":"2016-06-18T08:14:26Z","body":"I'm consistently seeing the following errors when starting the container:\r\n```\r\nJun 18 02:58:09 coreos-thin-1 docker[17200]: awk: cannot open /tmp/settings.php (No such file or directory)\r\nJun 18 02:58:09 coreos-thin-1 docker[17200]: awk: cannot open /tmp/settings.php (No such file or directory)\r\nJun 18 02:58:09 coreos-thin-1 docker[17200]: awk: cannot open /tmp/settings.php (No such file or directory)\r\nJun 18 02:58:09 coreos-thin-1 docker[17200]: find: missing argument to `-exec'\r\nJun 18 02:58:09 coreos-thin-1 docker[17200]: find: unknown predicate `--max-depth=1'\r\n```\r\nThe issue here may be that I simply do not understand what the intended function of the script, but it occurs to me that the order of events is currently incorrect.\r\n\r\nThe script currently looks like this on an existing install:\r\n```\r\n    # Run a database backup\r\n    dbuser=$(awk -F \"'\" '/\\$dbuser/ {print $2}' /tmp/settings.php)\r\n    dbpass=$(awk -F \"'\" '/\\$dbpass/ {print $2}' /tmp/settings.php)\r\n    dbname=$(awk -F \"'\" '/\\$dbpass/ {print $2}' /tmp/settings.php)\r\n    \r\n    mysqldump -h mysql -u $dbuser -p$dbpass $dbname | gzip > /var/www/backup/$(date +\"%Y-%m-%d_%H-%M-%S\").sql.gz\r\n\r\n    # Backup the settings.php file\r\n    mv /var/www/xibo/web/settings.php /tmp/settings.php\r\n    \r\n    # Delete the old install EXCEPT the library directory\r\n    find /var/www/xibo ! -name library -type d -exec rm -rf {};\r\n    find /var/www/xibo -type f --max-depth=1 -exec rm -f {};\r\n\r\n    # Replace settings\r\n    mv /tmp/settings.php /var/www/xibo/web/settings.php\r\n```\r\n\r\nWe're currently trying to awk `/tmp/settings.php` even though we do not create that file until after the DB dump.\r\n\r\nA little further down both finds have syntax errors. The first one can be explained by a [bad termination](http://stackoverflow.com/questions/2961673/find-missing-argument-to-exec) and the second is an extra hyphen since it should just be `-maxdepth`."}}
{"actor":{"display_login":"alexharrington"}}