diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 00000000..4a484913
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,11 @@
+# editorconfig.org
+
+root = true
+
+[*]
+indent_style = space
+indent_size = 4
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
diff --git a/.gitattributes b/.gitattributes
index a175aa0e..f5b72bd3 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,51 +1,51 @@
-# Set default behaviour, in case users don't have core.autocrlf set.
-#* text=input
-
-# Explicitly declare text files we want to always be normalized and converted
-# to native line endings on checkout.
-*.php text
-*.txt text
-*.ini text
-*.dist text
-*.twig text
-*.html text
-*.htm text
-*.json text
-*.log text
-*.yml text
-*.rb text
-*.csv text
-*.xml text
-*.ci text
-*.js text
-*.css text
-*.cache text
-*.meta text
-*.phar text
-app/console text
-console text
-vendors text
-.gitignore text
-behat text
-Capfile text
-deps text
-*.lock text
-*.md text
-*.markdown text
-.htaccess text
-*.sh text
-*.pl text
-*.cgi text
-
-# Denote all files that are truly binary and should not be modified.
-*.png binary
-*.gif binary
-*.jpg binary
-*.db binary
-*.jar binary
-*.ico binary
-.gitkeep binary
-*.gz binary
-*.zip binary
-*.7z binary
+# Set default behaviour, in case users don't have core.autocrlf set.
+#* text=input
+
+# Explicitly declare text files we want to always be normalized and converted
+# to native line endings on checkout.
+*.php text
+*.txt text
+*.ini text
+*.dist text
+*.twig text
+*.html text
+*.htm text
+*.json text
+*.log text
+*.yml text
+*.rb text
+*.csv text
+*.xml text
+*.ci text
+*.js text
+*.css text
+*.cache text
+*.meta text
+*.phar text
+app/console text
+console text
+vendors text
+.gitignore text
+behat text
+Capfile text
+deps text
+*.lock text
+*.md text
+*.markdown text
+.htaccess text
+*.sh text
+*.pl text
+*.cgi text
+
+# Denote all files that are truly binary and should not be modified.
+*.png binary
+*.gif binary
+*.jpg binary
+*.db binary
+*.jar binary
+*.ico binary
+.gitkeep binary
+*.gz binary
+*.zip binary
+*.7z binary
*.ttf binary
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index b1746bcd..0758dd7e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,6 @@
test/
sync.ffs_db
-node_modules
\ No newline at end of file
+node_modules
+_Test/
+app/api/test.php
+/.project
\ No newline at end of file
diff --git a/.jshintrc b/.jshintrc
index 136eae53..4b1146cf 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -1,16 +1,16 @@
-{
- "bitwise": true,
- "browser": true,
- "curly": true,
- "eqeqeq": true,
- "eqnull": true,
- "esnext": true,
- "immed": true,
- "jquery": true,
- "latedef": true,
- "newcap": true,
- "noarg": true,
- "node": true,
- "strict": false,
- "trailing": true
-}
+{
+ "bitwise": true,
+ "browser": true,
+ "curly": true,
+ "eqeqeq": true,
+ "eqnull": true,
+ "esnext": true,
+ "immed": true,
+ "jquery": true,
+ "latedef": true,
+ "newcap": true,
+ "noarg": true,
+ "node": true,
+ "strict": false,
+ "trailing": true
+}
diff --git a/Gruntfile.js b/Gruntfile.js
index 25f939a3..9ea1d32a 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -22,6 +22,9 @@ module.exports = function(grunt) {
files: {
'assets/css/runeui.css': [
'assets/less/runeui.less'
+ ],
+ 'assets/css/musicapristina.css': [
+ 'assets/less/musicapristina.less'
]
}
}
diff --git a/LICENSE b/LICENSE
index 425179c4..a8014105 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,674 +1,674 @@
-GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. {http://fsf.org/}
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- {one line to give the program's name and a brief idea of what it does.}
- Copyright (C) {year} {name of author}
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see {http://www.gnu.org/licenses/}.
-
-Also add information on how to contact you by electronic and paper mail.
-
- If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
- RuneAudio Copyright (C) 2013-2014 RuneAudio Team
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-{http://www.gnu.org/licenses/}.
-
- The GNU General Public License does not permit incorporating your program
-into proprietary programs. If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License. But first, please read
-{http://www.gnu.org/philosophy/why-not-lgpl.html}.
+GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. {http://fsf.org/}
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ {one line to give the program's name and a brief idea of what it does.}
+ Copyright (C) {year} {name of author}
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see {http://www.gnu.org/licenses/}.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ RuneAudio Copyright (C) 2013-2014 RuneAudio Team
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+{http://www.gnu.org/licenses/}.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+{http://www.gnu.org/philosophy/why-not-lgpl.html}.
diff --git a/_TEST/index.html b/_TEST/index.html
new file mode 100644
index 00000000..b5394da7
--- /dev/null
+++ b/_TEST/index.html
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/api/audio_ctl.php b/app/api/audio_ctl.php
new file mode 100644
index 00000000..17213317
--- /dev/null
+++ b/app/api/audio_ctl.php
@@ -0,0 +1,103 @@
+.
+ *
+ * file: audio_ctl.php
+ * version: 1.3
+ * coder: Simone De Gregori
+ *
+ */
+
+// Check for POST
+if ($_SERVER['REQUEST_METHOD'] === 'POST') {
+ // get the data that was POSTed
+ $postData = file_get_contents("php://input");
+ // convert to an associative array
+ $json = json_decode($postData, true);
+
+ // switch audio output
+ if (isset($json['ao'])) {
+ $jobID = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'mpdcfg', 'action' => 'switchao', 'args' => $json['ao']));
+ $template->XXX = "ao";
+ }
+
+ // update MPD configuration
+ if (isset($json['conf'])) {
+ $jobID = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'mpdcfg', 'action' => 'update', 'args' => $json['conf']));
+ $template->YYY = "conf";
+ }
+
+ if (isset($json['orionprofile'])) {
+ // submit worker job
+ $redis->get('orionprofile') == $json['orionprofile'] || $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'orionprofile', 'args' => $json['orionprofile']));
+ $template->ZZZ = "orion";
+ }
+
+ // waitSyWrk($redis, $jobID);
+
+} else {
+
+ $template->conf = $redis->hGetAll('mpdconf');
+ $template->orionprofile = $redis->get('orionprofile');
+
+ $i2smodule = $redis->get('i2smodule');
+ $acards = $redis->hGetAll('acards');
+ foreach ($acards as $card => $data) {
+ $acard_data = json_decode($data);
+ // debug
+ // echo $card."\n";
+ // print_r($acard_data);
+ if ($i2smodule !== 'none') {
+ $acards_details = $redis->hGet('acards_details', $i2smodule);
+ } else {
+ $acards_details = $redis->hGet('acards_details', $card);
+ }
+ if (!empty($acards_details)) {
+ $details = json_decode($acards_details);
+ // debug
+ // echo "acards_details\n";
+ // print_r($details);
+ if ($details->sysname === $card) {
+ if ($details->type === 'integrated_sub') {
+ $sub_interfaces = $redis->sMembers($card);
+ foreach ($sub_interfaces as $int) {
+ $sub_int_details = json_decode($int);
+ // TODO !!! check
+ $audio_cards[] = $sub_int_details;
+ }
+ }
+ if ($details->extlabel !== 'none') {
+ $acard_data->extlabel = $details->extlabel;
+ }
+ }
+ }
+ $audio_cards[] = $acard_data;
+ }
+ osort($audio_cards, 'extlabel');
+ $template->acards = $audio_cards;
+ $template->ao = $redis->get('ao');
+}
\ No newline at end of file
diff --git a/app/api/coverart_ctl.php b/app/api/coverart_ctl.php
new file mode 100644
index 00000000..f844057c
--- /dev/null
+++ b/app/api/coverart_ctl.php
@@ -0,0 +1,208 @@
+.
+ *
+ * file: file: app/coverart_ctl.php
+ * version: 1.3
+ * coder: Simone De Gregori
+ *
+ */
+// direct output bypass template system
+$tplfile = 0;
+runelog("\n--------------------- coverart (start) ---------------------");
+// turn off output buffering
+ob_implicit_flush(0);
+// --------------------- MPD ---------------------
+if ($activePlayer === 'MPD') {
+ // output switch
+ $output = 0;
+ include('getid3/audioinfo.class.php');
+ // get Last.FM api-key
+ $lastfm_apikey = $redis->get('lastfm_apikey');
+ // get HTTP proxy settings
+ $proxy = $redis->hGetall('proxy');
+ // connect to MPD daemon
+ $mpd2 = openMpdSocket('/run/mpd.sock', 0);
+ // fetch MPD status
+ $status = _parseStatusResponse(MpdStatus($mpd2));
+ $curTrack = getTrackInfo($mpd2, $status['song']);
+ $mpdRoot = "/mnt/MPD/";
+ $trackMpdPath = findPLposPath($status['song'], $mpd2);
+ $currentpath = $mpdRoot.$trackMpdPath;
+ closeMpdSocket($mpd2);
+ // debug
+ runelog("MPD current path", $currentpath);
+ $request_uri = urldecode($_SERVER['REQUEST_URI']);
+ runelog("HTTP GET request_uri (urldecoded)", $request_uri);
+ $request_folder = substr(substr($request_uri, 0, strrpos($request_uri, "/")), 10);
+ runelog("HTTP GET (request_folder)", $request_folder);
+ $request_coverfile = substr($request_uri, strrpos($request_uri, "/") + 1);
+ runelog("HTTP GET (request_coverfile)", $request_coverfile);
+ $current_mpd_folder = substr(substr($currentpath, 0, strrpos($currentpath, "/")), 9);
+ runelog("MPD (current_mpd_folder)", $current_mpd_folder);
+// --------------------- Spotify ---------------------
+} elseif ($redis->get('activePlayer') === 'Spotify') {
+ runelog('rune_PL_wrk: open SPOP socket');
+ $spop = openSpopSocket('localhost', 6602, 1);
+}
+if ((substr($request_coverfile, 0, 2) === '?v' OR $current_mpd_folder === $request_folder) && $activePlayer === 'MPD') {
+ // extact song details
+ if (isset($curTrack[0]['Title'])) {
+ $status['currentartist'] = $curTrack[0]['Artist'];
+ $status['currentsong'] = $curTrack[0]['Title'];
+ $status['currentalbum'] = $curTrack[0]['Album'];
+ $status['fileext'] = parseFileStr($curTrack[0]['file'], '.');
+ }
+ //Extract info from current audio file (using ZendMedia library)
+ /* if ($status['fileext'] === 'flac') {
+ require_once('Zend/Media/Flac.php');
+ $flac = new Zend_Media_Flac($currentpath);
+ if ($flac->hasMetadataBlock(Zend_Media_Flac::PICTURE)) {
+ // debug
+ runelog("coverart match: embedded (ZendMedia lib)");
+ header('Cache-Control: no-cache, no-store, must-revalidate'); // HTTP 1.1.
+ header('Pragma: no-cache'); // HTTP 1.0.
+ header('Expires: 0'); // Proxies.
+ header('Content-Type: '.$flac->getPicture()->getMimeType());
+ echo $flac->getPicture()->getData();
+ $output = 1;
+ }
+ } */
+ //Extract info from current audio file (using GetID3 library)
+ if ($output === 0) {
+ $au = new AudioInfo();
+ $auinfo = $au->Info($currentpath);
+ // 1. try to find embedded coverart
+ if (!empty($auinfo['comments']['picture'][0]['data'])) {
+ // debug
+ runelog("coverart match: embedded (GetID3 lib)");
+ header('Cache-Control: no-cache, no-store, must-revalidate'); // HTTP 1.1.
+ header('Pragma: no-cache'); // HTTP 1.0.
+ header('Expires: 0'); // Proxies.
+ header('Content-Type: ' .$auinfo['comments']['picture'][0]['image_mime']);
+ echo $auinfo['comments']['picture'][0]['data'];
+ $output = 1;
+ }
+ }
+ // 2. try to find local coverart
+ if ($output === 0) {
+ $local_cover_root = substr($currentpath, 0, strrpos($currentpath, "/"));
+ $local_cover_path[] = $local_cover_root.'/folder.jpg';
+ $local_cover_path[] = $local_cover_root.'/cover.jpg';
+ $local_cover_path[] = $local_cover_root.'/folder.png';
+ $local_cover_path[] = $local_cover_root.'/cover.png';
+ foreach ($local_cover_path as $path) {
+ if (file_exists($path)) {
+ $local_cover_path = $path;
+ $output = 1;
+ break;
+ }
+ }
+ // debug
+ runelog("coverart: local (path): ", $local_cover_path);
+ if ($output === 1) {
+ // debug
+ runelog("coverart match: cover-local");
+ header('Cache-Control: no-cache, no-store, must-revalidate'); // HTTP 1.1.
+ header('Pragma: no-cache'); // HTTP 1.0.
+ header('Expires: 0'); // Proxies.
+ header('Content-Type: ' .mime_content_type($local_cover_path));
+ readfile($local_cover_path);
+ }
+ }
+ // 3.0 try to find coverart on Last.FM (Album)
+ if ($output === 0) {
+ $cover_url = ui_lastFM_coverart($status['currentartist'], $status['currentalbum'], $lastfm_apikey, $proxy);
+ if (!empty($cover_url)) {
+ // debug
+ runelog("coverart match: lastfm (query 1) coverURL=", $cover_url);
+ $lastfm_img = curlGet($cover_url, $proxy);
+ $bufferinfo = new finfo(FILEINFO_MIME);
+ $lastfm_img_mime = $bufferinfo->buffer($lastfm_img);
+ } else {
+ // 3.1 try to find coverart on Last.FM (Artist)
+ $cover_url = ui_lastFM_coverart($status['currentartist'], '', $lastfm_apikey, $proxy);
+ if (!empty($cover_url)) {
+ // debug
+ runelog("coverart match: lastfm (query 2) coverURL=", $cover_url);
+ if (!empty($cover_url)) {
+ $lastfm_img = curlGet($cover_url, $proxy);
+ $lastfm_img_mime = $bufferinfo->buffer($lastfm_img);
+ }
+ }
+ }
+ if (!empty($lastfm_img)) {
+ header('Cache-Control: no-cache, no-store, must-revalidate'); // HTTP 1.1.
+ header('Pragma: no-cache'); // HTTP 1.0.
+ header('Expires: 0'); // Proxies.
+ header('Content-Type: '.$lastfm_img_mime);
+ echo $lastfm_img;
+ $output = 1;
+ }
+ }
+ // 4. serve DEFAULT rune-cover image
+ if ($output === 0) {
+ // debug
+ runelog("coverart match: cover-default");
+ header('Cache-Control: no-cache, no-store, must-revalidate'); // HTTP 1.1.
+ header('Pragma: no-cache'); // HTTP 1.0.
+ header('Expires: 0'); // Proxies.
+ header('Content-Type: ' .mime_content_type($_SERVER['HOME'].'/assets/img/cover-default.png'));
+ readfile($_SERVER['HOME'].'/assets/img/cover-default.png');
+ $output = 1;
+ }
+} else {
+ if ($activePlayer === 'Spotify') {
+ $count = 1;
+ do {
+ sendSpopCommand($spop, 'image');
+ unset($spotify_cover);
+ $spotify_cover = readSpopResponse($spop);
+ $spotify_cover = json_decode($spotify_cover);
+ usleep(500000);
+ runelog('coverart (spotify): retry n: '.$count, $spotify_cover->status);
+ if ($spotify_cover->status === 'ok') {
+ $spotify_cover = base64_decode($spotify_cover->data);
+ break;
+ }
+ $count++;
+ } while ($count !== 10);
+ $bufferinfo = new finfo(FILEINFO_MIME);
+ $spotify_cover_mime = $bufferinfo->buffer($spotify_cover);
+ header('Cache-Control: no-cache, no-store, must-revalidate'); // HTTP 1.1.
+ header('Pragma: no-cache'); // HTTP 1.0.
+ header('Expires: 0'); // Proxies.
+ header('Content-Type: '.$spotify_cover_mime);
+ echo $spotify_cover;
+ } else {
+ // redirect to /covers NGiNX location
+ $local_cover_url = 'http://'.$_SERVER["SERVER_ADDR"].'/covers/'.$request_folder.'/'.$request_coverfile;
+ runelog("coverart: redirect to local-coverart (url): ", $local_cover_url);
+ header('Location: '.$local_cover_url, true, 301);
+ }
+}
+runelog("\n--------------------- coverart (end) ---------------------");
diff --git a/app/api/credits_ctl.php b/app/api/credits_ctl.php
new file mode 100644
index 00000000..87eeddb6
--- /dev/null
+++ b/app/api/credits_ctl.php
@@ -0,0 +1,37 @@
+.
+ *
+ * file: app/credits_ctl.php
+ * version: 1.3
+ * coder: Simone De Gregori
+ *
+ */
+
+ $template->buildversion = $redis->get('buildversion');
+ $template->release = $redis->get('release');
+
\ No newline at end of file
diff --git a/app/api/debug_ctl.php b/app/api/debug_ctl.php
new file mode 100644
index 00000000..8b254114
--- /dev/null
+++ b/app/api/debug_ctl.php
@@ -0,0 +1,43 @@
+.
+ *
+ * file: app/debug_ctl.php
+ * version: 1.3
+ *
+ */
+// ob_start();
+// echo debug_data($redis);
+// $debugdata = ob_get_clean();
+
+if ($_SERVER['REQUEST_METHOD'] === 'POST') {
+
+} else {
+ $jobID = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'debug'));
+ waitSyWrk($redis, $jobID);
+ $template->debug = $redis->get('debugdata');
+}
\ No newline at end of file
diff --git a/app/api/dev_ctl.php b/app/api/dev_ctl.php
new file mode 100644
index 00000000..b361e581
--- /dev/null
+++ b/app/api/dev_ctl.php
@@ -0,0 +1,94 @@
+.
+ *
+ * file: app/dev_ctl.php
+ * version: 1.3
+ * coder: Simone De Gregori
+ *
+ */
+// inspect POST
+if (isset($_POST)) {
+ // ----- DEV MODE -----
+ if (isset($_POST['mode'])) {
+ if ($_POST['mode']['dev']['enable'] == 1) {
+ // create worker job (start udevil)
+ $redis->get('dev') == 1 || $redis->set('dev', 1);
+ $redis->get('debug') == 1 || $redis->set('debug', 1);
+ } else {
+ // create worker job (stop udevil)
+ $redis->get('dev') == 0 || $redis->set('dev', 0);
+ }
+ // ----- DEBUG -----
+ if ($_POST['mode']['debug']['enable'] == 1) {
+ // create worker job (start udevil)
+ $redis->get('debug') == 1 || $redis->set('debug', 1);
+ } else {
+ // create worker job (stop udevil)
+ $redis->get('debug') == 0 || $redis->set('debug', 0);
+ }
+ }
+ // ----- OPCACHE -----
+ if (isset($_POST['opcache'])) {
+ if ($_POST['opcache']['enable'] == 1) {
+ // create worker job (enable php opcache)
+ $redis->get('opcache') == 1 || $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'opcache', 'action' => 'enable'));
+ } else {
+ // create worker job (disable php opcache)
+ $redis->get('opcache') == 0 || $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'opcache', 'action' => 'disable'));
+ }
+ }
+ if (isset($_POST['syscmd'])) {
+ // ----- BLANK PLAYERID -----
+ if ($_POST['syscmd'] === 'blankplayerid') $redis->set('playerid','');
+ // ----- CLEARIMG -----
+ if ($_POST['syscmd'] === 'clearimg') $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'clearimg'));
+ // ----- CHECK FS PERMISSIONS -----
+ if ($_POST['syscmd'] === 'syschmod') $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'sysAcl'));
+ // ----- RESTART MPD -----
+ if ($_POST['syscmd'] === 'mpdrestart') $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'mpdrestart'));
+ // ----- RESET NET CONFIG -----
+ if ($_POST['syscmd'] === 'netconfreset') $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'netcfg', 'action' => 'reset'));
+ // ----- RESET MPD CONFIG -----
+ if ($_POST['syscmd'] === 'mpdconfreset') $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'mpdcfg', 'action' => 'reset'));
+ // ----- RESTART PHP-FPM -----
+ if ($_POST['syscmd'] === 'phprestart') $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'phprestart'));
+ // ----- GIT PULL -----
+ if ($_POST['syscmd'] === 'gitpull') $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'gitpull'));
+ // ----- RESTART WORKERS -----
+ if (isset($_POST['syscmd']['wrkrestart'])) $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'wrkrestart', 'args' => $_POST['syscmd']['wrkrestart']));
+ }
+}
+waitSyWrk($redis, $jobID);
+$template->debug = $redis->get('debug');
+$template->playerid = $redis->get('playerid');
+$template->opcache = $redis->get('opcache');
+$template->gitbranch = $redis->hGet('git', 'branch');
+// debug
+// var_dump($template->dev);
+// var_dump($template->debug);
+// var_dump($template->opcache);
diff --git a/app/api/login_ctl.php b/app/api/login_ctl.php
new file mode 100644
index 00000000..3f9377c0
--- /dev/null
+++ b/app/api/login_ctl.php
@@ -0,0 +1,34 @@
+.
+ *
+ * file: app/login_ctl.php
+ * version: 1.3
+ * coder: Simone De Gregori
+ *
+ */
+
\ No newline at end of file
diff --git a/app/api/mpd_ctl.php b/app/api/mpd_ctl.php
new file mode 100644
index 00000000..8bc42733
--- /dev/null
+++ b/app/api/mpd_ctl.php
@@ -0,0 +1,146 @@
+.
+ *
+ * file: mpd_ctl.php
+ * version: 1.3
+ * coder: Simone De Gregori
+ *
+ */
+if ($_SERVER['REQUEST_METHOD'] === 'POST') {
+
+
+ // get the data that was POSTed
+ $postData = file_get_contents("php://input");
+ // convert to an associative array
+ $json = json_decode($postData, true);
+
+ // switch audio output
+ //if (isset($json['ao'])) {
+ // $jobID = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'mpdcfg', 'action' => 'switchao', 'args' => $json['ao']));
+ // $template->AAA = "ao";
+ //}
+ // reset MPD configuration
+ if (isset($json['reset'])) {
+ $jobID = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'mpdcfg', 'action' => 'reset'));
+ $template->BBB = "reset";
+ }
+ // update MPD configuration
+ if (isset($json['conf'])) {
+ foreach ($json['conf'] as $mpdfield => $data) {
+ if ($data === TRUE) {
+ $json['conf'][$mpdfield] = 'yes';
+ } else if ($data === FALSE) {
+ $json['conf'][$mpdfield] = 'no';
+ }
+ }
+ $jobID = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'mpdcfg', 'action' => 'update', 'args' => $json['conf']));
+ $template->CCC = "conf";
+ }
+ // manual MPD configuration
+ if (isset($json['mpdconf'])) {
+ $jobID = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'mpdcfgman', 'args' => $json['mpdconf']));
+ $template->DDD = "mpd conf";
+ }
+ // waitSyWrk($redis, $jobID);
+} else {
+ $ao = '';
+ $aoValue = $redis->get('ao');
+
+
+ // check integrity of /etc/network/interfaces
+ if(!hashCFG('check_mpd', $redis)) {
+ $template->mpdconf = file_get_contents('/etc/mpd.conf');
+ // set manual config template
+ $template->content = "mpd_manual";
+ } else {
+ // At the moment, the UI needs to convert the
+ // file name being present to a 'yes'
+ $mpdconf = $redis->hGetAll('mpdconf');
+ if (isset($mpdconf['state_file'])) {
+ $mpdconf['state_file'] = TRUE;
+ } else {
+ $mpdconf['state_file'] = FALSE;
+ }
+ foreach ($mpdconf as $mpdfield => $data) {
+ if ($data === 'yes') {
+ $mpdconf[$mpdfield] = TRUE;
+ } else if ($data === 'no') {
+ $mpdconf[$mpdfield] = FALSE;
+ }
+ }
+ $template->conf = $mpdconf;
+ $i2smodule = $redis->get('i2smodule');
+ // debug
+ // echo $i2smodule."\n";
+ $acards = $redis->hGetAll('acards');
+ // debug
+ // print_r($acards);
+ foreach ($acards as $card => $data) {
+ $acard_data = json_decode($data);
+ // debug
+ // echo $card."\n";
+ // print_r($acard_data);
+ if ($i2smodule !== 'none') {
+ $acards_details = $redis->hGet('acards_details', $i2smodule);
+ } else {
+ $acards_details = $redis->hGet('acards_details', $card);
+ }
+ if (!empty($acards_details)) {
+ $details = json_decode($acards_details);
+ // debug
+ // echo "acards_details\n";
+ // print_r($details);
+ if ($details->sysname === $card) {
+ if ($details->type === 'integrated_sub') {
+ $sub_interfaces = $redis->sMembers($card);
+ foreach ($sub_interfaces as $int) {
+ $sub_int_details = json_decode($int);
+ // TODO !!! check
+ $audio_cards[] = $sub_int_details;
+ }
+ }
+ if ($details->extlabel !== 'none') {
+ $acard_data->extlabel = $details->extlabel;
+ }
+ }
+ }
+
+ // look to see if the selected card matches this one in the loop
+ if ($acard_data->name == $aoValue) {
+ $ao = $acard_data->extlabel;
+ }
+ $audio_cards[] = $acard_data;
+ }
+ osort($audio_cards, 'extlabel');
+ // debug
+ // print_r($audio_cards);
+ $template->acards = $audio_cards;
+ $template->ao = $ao;
+ }
+
+}
diff --git a/app/api/network_ctl.php b/app/api/network_ctl.php
new file mode 100644
index 00000000..2a455b7e
--- /dev/null
+++ b/app/api/network_ctl.php
@@ -0,0 +1,149 @@
+.
+ *
+ * file: network_ctl.php
+ * version: 1.3
+ * coder: Simone De Gregori
+ *
+ */
+
+$segments = explode('/', $template->uri());
+$count = count($segments);
+$lastsegment = strlen($segments[$count - 1]);
+if ($lastsegment===0) {
+ $count = $count -1;
+}
+$uri_length = $count;
+
+// /api/network = 3
+// /api/network/ = 3
+// /api/network/eth0 = 4
+// /api/network/eth0/ = 4
+
+
+
+// Check for POST
+if ($_SERVER['REQUEST_METHOD'] == 'POST') {
+ // get the data that was POSTed
+ $postData = file_get_contents("php://input");
+ // convert to an associative array
+ $json = json_decode($postData, true);
+
+ if (isset($json['nic'])) {
+ $redis->get($json['nic']['name']) == json_encode($nic) || $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'netcfg', 'action' => 'config', 'args' => $json['nic']));
+ }
+ if (isset($json['refresh'])) {
+ $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'netcfg', 'action' => 'refresh'));
+ }
+ if (isset($json['wifiprofile'])) {
+ switch ($json['wifiprofile']['action']) {
+ case 'add':
+ $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'wificfg', 'action' => 'add', 'args' => $json['wifiprofile']));
+ break;
+ case 'edit':
+ $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'wificfg', 'action' => 'edit', 'args' => $json['wifiprofile']));
+ break;
+ case 'delete':
+ $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'wificfg', 'action' => 'delete', 'args' => $json['wifiprofile']));
+ break;
+ case 'disconnect':
+ $jobID[] = wrk_control($redis, 'newjob', $data = array( 'wrkcmd' => 'wificfg', 'action' => 'disconnect', 'args' => $json['wifiprofile'] ));
+ break;
+ }
+ }
+ // if (isset($json['wifidelete'])) {
+ // $jobID[] = wrk_control($redis,'newjob', $data = array( 'wrkcmd' => 'wificfg', 'action' => 'delete', 'args' => $json['wifidelete'] ));
+ // }
+ if (isset($json['wpa_cli'])) {
+ $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'wificfg', 'action' => 'wpa_cli', 'args' => $json['wpa_cli']));
+ }
+
+} else {
+ // GET
+
+ if ($uri_length == 4) {
+ // INTERFACE SETUP - /api/network/eth0/ or /api/network/wlan0/
+ $nicID = $template->uri(3); // i.e. 'eth0' or 'wlan0'
+ // retrieve current nic status data (detected from the system)
+ $nic_connection = $redis->hGet('nics', $nicID);
+ $template->nic = json_decode($nic_connection);
+ $template->nic->wireless = ($template->nic->wireless == 1);
+ $template->nic->dns2 = ($template->nic->dns2 == null) ? '' : $template->nic->dns2;
+ // fetch current (stored) nic configuration data
+ if ($redis->get($nicID)) {
+ $template->profile = json_decode($redis->get($nicID));
+ $template->profile->dhcp = ($template->profile->dhcp == 1);
+ // ok nic configuration not stored, but check if it is configured
+ } else if ($nic_connection == null) {
+ // last case, nic not found. return an error
+ $msg = 'Oops. Looks like you are trying to edit a card that no longer exists. The broken url is: '.$template->uri();
+ $template->errormsg = $msg;
+ http_response_code(400); // HTTP : Bad Request
+ }
+
+ $prof = json_decode($redis->get($nicID));
+ $nic = json_decode($nic_connection);
+ // return:
+
+ // SSID
+ // UNAME
+ // PASS
+ // ENCR
+
+ // DHCP
+ // IP
+ // GW
+ // DNS1
+ // DNS2
+
+ $return->dhcp = $nic->dhcp;
+ // $return->connected = true; // boolean to tell if I'm actually connected
+ $return->ip = $nic->ip; // Get the IP from the NIC, or the Assigned Static IP if none on NIC, or "" if DHCP & No Connection
+ $return->mask = $nic->mask; // Get the IP from the NIC, or the Assigned Static IP if none on NIC, or "" if DHCP & No Connection
+ $return->gw = $nic->ip;
+ $return->dns1 = $nic->ip;
+ $return->dns2 = $nic->ip;
+
+ // on client
+ // placeholder = oldData.ip
+ // value = data.ip
+ } else if ($uri_length == 3) {
+ // MAIN SECTION - /api/network/
+ $nics = [];
+ $nics2 = [];
+ foreach ($redis->hGetAll('nics') as $interface => $details) {
+ $nic = json_decode($details);
+ $nic->wireless = ($nic->wireless == '1');
+ $nic->id = $interface;
+ $nics[] = $nic;
+ }
+ $template->nics = $nics;
+
+ }
+
+}
\ No newline at end of file
diff --git a/app/api/playback_ctl.php b/app/api/playback_ctl.php
new file mode 100644
index 00000000..296ad06a
--- /dev/null
+++ b/app/api/playback_ctl.php
@@ -0,0 +1,53 @@
+.
+ *
+ * file: app/playback_ctl.php
+ * version: 1.3
+ * coder: Simone De Gregori
+ *
+ */
+$template->activePlayer = $redis->get('activePlayer');
+if ($redis->get('coverart') == 1) {
+ $template->coverart = 1;
+ $template->colspan = 4;
+} else {
+ $template->coverart = 0;
+ $template->colspan = 6;
+}
+if ($redis->get('volume') == 1 && $template->activePlayer !== 'Spotify') {
+ $template->volume['color'] = '#0095D8';
+ $template->volume['readonly'] = 'false';
+} else {
+ //$_volumeColor = '#002c40';
+ $template->volume['color'] = '#1A242F';
+ $template->volume['readonly'] = 'true';
+ $template->volume['disabled'] = 1;
+ $template->volume['divclass'] = 'nomixer';
+}
+$template->dev = $redis->get;
+$template->spotify = $redis->hGet('spotify', 'enable');
diff --git a/app/api/settings_ctl.php b/app/api/settings_ctl.php
new file mode 100644
index 00000000..6451b054
--- /dev/null
+++ b/app/api/settings_ctl.php
@@ -0,0 +1,253 @@
+.
+ *
+ * file: app/settings_ctl.php
+ * version: 1.3
+ * coder: Simone De Gregori
+ *
+ */
+
+// Simple class for managing the items in an HTML Select
+class NameValuePair {
+ public $name = '';
+ public $value = '';
+
+ public function __construct($n, $v) {
+ $this->name = $n;
+ $this->value = $v;
+ }
+}
+
+$environment = [];
+$timezones = [];
+$kernel = [];
+$features = [];
+$system = [];
+
+// Check for POST
+if ($_SERVER['REQUEST_METHOD'] === 'POST') {
+ // get the data that was POSTed
+ $postData = file_get_contents("php://input");
+ // convert to an associative array
+ $json = json_decode($postData, true);
+
+ // ----- Environment Section -----
+ if (isset($json['environment'])) {
+ $environment = $json['environment'];
+
+ // ----- HOSTNAME -----
+ if (empty($environment['hostname'])) {
+ $args = 'runeaudio';
+ } else {
+ $args = $environment['hostname'];
+ }
+ $redis->get('hostname') == $args || $jobID[] = wrk_control($redis, 'newjob', $data = array( 'wrkcmd' => 'hostname', 'args' => $args ));
+
+ // ----- TIME SETTINGS -----
+ if (empty($environment['ntpserver'])) {
+ $args = 'pool.ntp.org';
+ } else {
+ $args = $environment['ntpserver'];
+ }
+ $template->ZZZZ = $redis->get('ntpserver') == $args;
+ $template->XXXX = $args;
+ $redis->get('ntpserver') == $args || $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'ntpserver', 'args' => $args));
+
+
+ $args = $environment['timezone'];
+ $redis->get('timezone') == $args || $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'timezone', 'args' => $args));
+
+ $template->XXXX1 = $args;
+
+ }
+
+ // ----- KERNEL -----
+ if (isset($json['kernel'])) {
+ // submit worker job
+ if ($redis->get('kernel') !== $json['kernel']) {
+ $job = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'kernelswitch', 'args' => $json['kernel']));
+ $notification = new stdClass();
+ $notification->title = 'Kernel switch';
+ $notification->text = 'Kernel switch started...';
+ wrk_notify($redis, 'startjob', $notification, $job);
+ $jobID[] = $job;
+ }
+ }
+ if (isset($json['orionprofile'])) {
+ // submit worker job
+ $redis->get('orionprofile') == $json['orionprofile'] || $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'orionprofile', 'args' => $json['orionprofile']));
+ }
+ if (isset($json['i2smodule'])) {
+ // submit worker job
+ if ($redis->get('i2smodule') !== $json['i2smodule']) {
+ $notification = new stdClass();
+ if ($json['i2smodule'] !== 'none') {
+ $notification->title = 'Loading I²S kernel module';
+ } else {
+ $notification->title = 'Unloading I²S kernel module';
+ }
+ $job = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'i2smodule', 'args' => $json['i2smodule']));
+ $notification->text = 'Please wait';
+ wrk_notify($redis, 'startjob', $notification, $job);
+ $jobID[] = $job;
+ }
+
+ // autoswitch optimized kernel profile for BerryNOS mini DAC
+ if ($json['i2smodule'] === 'berrynosmini') $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'orionprofile', 'args' => 'OrionV3_berrynosmini'));
+ // autoswitch optimized kernel profile for IQaudIO Pi-DAC
+ if ($json['i2smodule'] === 'iqaudiopidac') $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'orionprofile', 'args' => 'OrionV3_iqaudio'));
+ }
+ // ----- FEATURES -----
+ if (isset($json['features'])) {
+ if ($json['features']['airplay']['enable']) {
+ if (($redis->hGet('airplay','enable') === '0') OR $redis->hGet('airplay','name') !== $json['features']['airplay']['name']) {
+ // create worker job (start shairport)
+ $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'airplay', 'action' => 'start', 'args' => $json['features']['airplay']['name']));
+ }
+ } else {
+ // create worker job (stop shairport)
+ $redis->hGet('airplay','enable') === '0' || $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'airplay', 'action' => 'stop', 'args' => $json['features']['airplay']['name']));
+ }
+ if ($json['features']['dlna']['enable'] == 1) {
+ if ($redis->hGet('dlna','enable') !== $json['features']['dlna']['enable'] OR $redis->hGet('dlna','name') !== $json['features']['dlna']['name']) {
+ // create worker job (start upmpdcli)
+ $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'dlna', 'action' => 'start', 'args' => $json['features']['dlna']['name']));
+ }
+ } else {
+ // create worker job (stop upmpdcli)
+ $redis->hGet('dlna','enable') === '0' || $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'dlna', 'action' => 'stop', 'args' => $json['features']['dlna']['name']));
+ }
+ if ($json['features']['udevil'] == 1) {
+ // create worker job (start udevil)
+ $redis->get('udevil') == 1 || $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'udevil', 'action' => 'start'));
+ } else {
+ // create worker job (stop udevil)
+ $redis->get('udevil') == 0 || $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'udevil', 'action' => 'stop'));
+ }
+ if ($json['features']['coverart'] == 1) {
+ $redis->get('coverart') == 1 || $redis->set('coverart', 1);
+ } else {
+ $redis->get('coverart') == 0 || $redis->set('coverart', 0);
+ }
+ if ($json['features']['globalrandom'] == 1) {
+ $redis->get('globalrandom') == 1 || $redis->set('globalrandom', 1);
+ } else {
+ $redis->get('globalrandom') == 0 || $redis->set('globalrandom', 0);
+ }
+ if ($json['features']['lastfm']['enable'] == 1) {
+ // create worker job (start mpdscribble)
+ if (($json['features']['lastfm']['user'] != $redis->hGet('lastfm', 'user') OR $json['features']['lastfm']['pass'] != $redis->hGet('lastfm', 'pass')) OR $redis->hGet('lastfm', 'enable') != $json['features']['lastfm']['enable']) {
+ $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'lastfm', 'action' => 'start', 'args' => $json['features']['lastfm']));
+ }
+ } else {
+ // create worker job (stop mpdscribble)
+ $redis->hGet('lastfm','enable') == 0 || $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'lastfm', 'action' => 'stop'));
+ }
+ if ($json['features']['spotify']['enable'] == 1) {
+ // create worker job (start mpdscribble)
+ if (($json['features']['spotify']['user'] != $redis->hGet('spotify', 'user') OR $json['features']['spotify']['pass'] != $redis->hGet('spotify', 'pass')) OR $redis->hGet('spotify', 'enable') != $json['features']['spotify']['enable']) {
+ $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'spotify', 'action' => 'start', 'args' => $json['features']['spotify']));
+ }
+ } else {
+ // create worker job (stop spotify)
+ $redis->hGet('spotify','enable') == 0 || $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'spotify', 'action' => 'stop'));
+ }
+ }
+ //// ----- SYSTEM COMMANDS -----
+ //if (isset($json['syscmd'])){
+ // if ($json['syscmd'] === 'reboot') $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'reboot'));
+ // if ($json['syscmd'] === 'poweroff') $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'poweroff'));
+ // if ($json['syscmd'] === 'mpdrestart') $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'mpdrestart'));
+ // if ($json['syscmd'] === 'backup') $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'backup'));
+ //}
+
+ $template->YYYY = $jobID;
+ // waitSyWrk($redis,$jobID);
+
+} else {
+
+ if (!$template->uri(3)) {
+ // MAIN SECTION - /api/settings/
+
+ // environment section
+ $environment['hostname'] = $redis->get('hostname');
+ $environment['ntpserver'] = $redis->get('ntpserver');
+ $environment['timezone'] = $redis->get('timezone');
+ $template->environment = $environment;
+
+ // kernel section
+ $kernel['kernel'] = $redis->get('kernel');
+ $kernel['i2smodule'] = $redis->get('i2smodule');
+ $kernel['orionprofile'] = $redis->get('orionprofile');
+ $template->kernel = $kernel;
+
+ // features section
+ $features['airplay'] = $redis->hGetAll('airplay');
+ $features['airplay']['enable'] = ($features['airplay']['enable'] === '1');
+ $features['dlna'] = $redis->hGetAll('dlna');
+ $features['dlna']['enable'] = ($features['dlna']['enable'] === '1');
+ $features['udevil'] = $redis->get('udevil');
+ $features['udevil'] = ($features['udevil'] === '1');
+ $features['coverart'] = $redis->get('coverart');
+ $features['coverart'] = ($features['coverart'] === '1');
+ $features['globalrandom'] = $redis->get('globalrandom');
+ $features['globalrandom'] = ($features['globalrandom'] === '1');
+ $features['lastfm'] = $redis->hGetAll('lastfm');
+ $features['lastfm']['enable'] = ($features['lastfm']['enable'] === '1');
+ $features['lastfm']['authenticated'] = TRUE; // [TODO] make it real
+ $features['proxy'] = $redis->hGetAll('proxy');
+ $features['proxy']['enable'] = ($features['proxy']['enable'] === '1');
+ $features['spotify'] = $redis->hGetAll('spotify');
+ $features['spotify']['enable'] = ($features['spotify']['enable'] === '1');
+ $features['spotify']['authenticated'] = FALSE; // [TODO] make it real
+ $features['hwplatformid'] = $redis->get('hwplatformid');
+ $template->features = $features;
+
+ // cmedia fix
+ $template->cmediafix = ($redis->get('cmediafix') === '1');
+
+ } else {
+ // SUBSECTIONS
+
+ if ($template->uri(3, 'timezones')) {
+ // TIMEZONES - /api/settings/timezones/
+ foreach (ui_timezone() as $t) {
+ $timezones[] = new NameValuePair($t['zone'].' - '.$t['diff_from_GMT'], $t['zone']);
+ }
+ $template->timezones = $timezones;
+ } else if ($template->uri(3, 'sysinfo')) {
+ // SYSTEM INFO - /api/settings/sysinfo/
+ $system['kernel'] = file_get_contents('/proc/version');
+ $system['time'] = implode('\n', sysCmd('date'));
+ $system['uptime'] = date('d:H:i:s', strtok(file_get_contents('/proc/uptime'), ' ' ));
+ $system['HWplatform'] = $redis->get('hwplatform')." (".$redis->get('hwplatformid').")";
+ $system['playerID'] = $redis->get('playerid');
+ $template->system = $system;
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/api/sources_ctl.php b/app/api/sources_ctl.php
new file mode 100644
index 00000000..a1a2a1e7
--- /dev/null
+++ b/app/api/sources_ctl.php
@@ -0,0 +1,167 @@
+.
+ *
+ * file: app/sources_ctl.php
+ * version: 1.3
+ * coder: Simone De Gregori
+ *
+ */
+if ($_SERVER['REQUEST_METHOD'] === 'POST') {
+
+ // get the data that was POSTed
+ $postData = file_get_contents("php://input");
+ // convert to an associative array
+ $json = json_decode($postData, true);
+
+ if ($json['updatempd'] == true) {
+ sendMpdCommand($mpd, 'update');
+ return;
+ }
+
+ if ($json['mountall'] == true) {
+ $jobID = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'sourcecfg', 'action' => 'mountall' ));
+ //waitSyWrk($redis, $jobID);
+ return ;
+ }
+
+ if ($json['source-umount']) {
+ $jobID = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'sourcecfg', 'action' => 'delete', 'args' => $json['mount']));
+ //waitSyWrk($redis, $jobID);
+ return;
+ }
+
+ if ($json['usb-umount']) {
+ $jobID = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'sourcecfg', 'action' => 'umountusb', 'args' => $json['usb-umount']));
+ //waitSyWrk($redis, $jobID);
+ return;
+ }
+
+ if ($json['mount']) {
+ $json['mount']['remotedir'] = str_replace('\\', '/', $json['mount']['remotedir']);
+ if ($json['mount']['rsize'] == '') $json['mount']['rsize'] = 16384;
+ if ($json['mount']['wsize'] == '') $json['mount']['wsize'] = 17408;
+ if ($json['mount']['options'] == '') {
+ if ($json['mount']['type'] === 'cifs' OR $json['mount']['type'] === 'osx') {
+ $json['mount']['options'] = "cache=none,noserverino,ro";
+ } else {
+ $json['mount']['options'] = "nfsvers=3,ro";
+ }
+ }
+ if ($json['mount']['id'] == '0') {
+ // Add
+ $jobID = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'sourcecfg', 'action' => 'add', 'args' => $json['mount']));
+ } else {
+ // Edit
+ $jobID = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'sourcecfg', 'action' => 'edit', 'args' => $json['mount']));
+ }
+ }
+
+ // TODO : reset
+ // if ($json['action'] == 'reset') $jobID = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'sourcecfgman', 'action' => 'reset' ));
+
+ //waitSyWrk($redis, $jobID);
+
+} else {
+
+ // GET
+
+ $id = $template->arg; // null when the id = 0
+ $source = netMounts($redis, 'read');
+
+ if ($id === NULL) {
+ // Getting the Sources list
+
+ // Disk Mounts
+
+ if($source !== true) {
+ foreach ($source as $mp) {
+ if (wrk_checkStrSysfile('/proc/mounts', '/mnt/MPD/NAS/'.$mp['name'])) {
+ $mp['status'] = true;
+ } else {
+ $mp['status'] = false;
+ }
+ $mounts[]=$mp;
+ }
+ }
+ $template->mounts = $mounts;
+
+ // USB Mounts
+ $usbmounts = $redis->hGetAll('usbmounts');
+ foreach ($usbmounts as $usbmount) {
+ $template->usbmounts[] = json_decode($usbmount);
+ }
+ // we still want the property sent to the UI
+ if (isset($template->usbmounts)===FALSE) {
+ $template->usbmounts = NULL;
+ }
+
+
+ } else if ($id === '0') {
+ // GET to setup a New Source
+ $mount = new stdClass();
+ $mount->id = 0;
+ $mount->name = '';
+ $mount->address = '';
+ $mount->type = '';
+ $mount->remotedir = '';
+ $mount->username = '';
+ $mount->password = '';
+
+ $template->mount = $mount;
+
+ } else if ($id > 0) {
+ // GET to Edit Existing
+ //$template->mount = NULL;
+ foreach ($source as $mp) {
+ if ($mp['id'] == $id) {
+ $template->mount = $mp;
+ }
+ }
+
+
+ if (isset($template->mount)===FALSE) {
+ // we were sent a bad ID in the URL
+ $template->errormsg = 'The selected mount does not exist.'; // [TODO] pass the localized string ID
+ http_response_code(400); // HTTP : Bad Request
+ }
+ }
+
+ //if (isset($template->action)) {
+ // if (isset($template->arg)) {
+ // foreach ($source as $mp) {
+ // if ($mp['id'] == $template->arg) {
+ // $template->mount = $mp;
+ // }
+ // }
+ // $template->title = 'Edit network mount';
+ // } else {
+ // $template->title = 'Add new network mount';
+ // }
+ //}
+
+}
\ No newline at end of file
diff --git a/app/api/system_ctl.php b/app/api/system_ctl.php
new file mode 100644
index 00000000..d69b73ff
--- /dev/null
+++ b/app/api/system_ctl.php
@@ -0,0 +1,51 @@
+.
+ *
+ * file: system_ctl.php
+ * version: 1.3
+ * coder: Kevin Welsh
+ *
+ */
+if ($_SERVER['REQUEST_METHOD'] === 'POST') {
+ // get the data that was POSTed
+ $postData = file_get_contents("php://input");
+ // convert to an associative array
+ $json = json_decode($postData, true);
+
+ if ($json['reboot']) {
+ $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'reboot'));
+ } else if ($json['poweroff']) {
+ $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'poweroff'));
+ } else if($json['syscmd'] === 'backup') {
+ $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'backup'));
+ pushFile($redis->hGet('w_msg', $jobID[0]));
+ $redis->hDel('w_msg', $jobID[0]);
+ }
+
+ // waitSyWrk($redis,$jobID);
+};
diff --git a/app/api/tun_ctl.php b/app/api/tun_ctl.php
new file mode 100644
index 00000000..93ca34a4
--- /dev/null
+++ b/app/api/tun_ctl.php
@@ -0,0 +1,42 @@
+.
+ *
+ * file: app/tun_ctl.php
+ * version: 1.3
+ * coder: Simone De Gregori
+ *
+ */
+// disable main template output
+$tplfile = 0;
+$proxy = $redis->hGetall('proxy');
+if ($proxy['enable'] === '1') {
+ echo curlGet(substr($_SERVER["REQUEST_URI"], 5), $proxy);
+} else {
+ echo curlGet(substr($_SERVER["REQUEST_URI"], 5));
+}
+
\ No newline at end of file
diff --git a/app/api_ctl.php b/app/api_ctl.php
new file mode 100644
index 00000000..008d7b93
--- /dev/null
+++ b/app/api_ctl.php
@@ -0,0 +1,3 @@
+action.'_ctl.php');
diff --git a/app/config/_os/etc/ca-certificates/conf.d/runeaudio.conf b/app/config/_os/etc/ca-certificates/conf.d/runeaudio.conf
index 9fe0cabf..981f4298 100644
--- a/app/config/_os/etc/ca-certificates/conf.d/runeaudio.conf
+++ b/app/config/_os/etc/ca-certificates/conf.d/runeaudio.conf
@@ -1,2 +1,2 @@
-runeaudio/gd_intermediate.crt
-
+runeaudio/gd_intermediate.crt
+
diff --git a/app/config/_os/etc/fstab.rpi b/app/config/_os/etc/fstab.rpi
index 8b49769c..4d524442 100644
--- a/app/config/_os/etc/fstab.rpi
+++ b/app/config/_os/etc/fstab.rpi
@@ -1,8 +1,8 @@
-# /etc/fstab: static file system information.
-#
-#/dev/mmcblk0p3 / ext4 noatime,discard,data=writeback,journal_async_commit,nouser_xattr,barrier=0,errors=remount-ro 0 1
-/dev/mmcblk0p3 / ext4 noatime,nouser_xattr,errors=remount-ro 0 1
-/dev/mmcblk0p1 /boot vfat utf8 0 0
-Ramdisk /run/shm tmpfs defaults,size=256M,noexec,nodev,nosuid 0 0
-logs /var/log tmpfs nodev,nosuid,noatime,mode=1777,size=5M 0 0
+# /etc/fstab: static file system information.
+#
+#/dev/mmcblk0p3 / ext4 noatime,discard,data=writeback,journal_async_commit,nouser_xattr,barrier=0,errors=remount-ro 0 1
+/dev/mmcblk0p3 / ext4 noatime,nouser_xattr,errors=remount-ro 0 1
+/dev/mmcblk0p1 /boot vfat utf8 0 0
+Ramdisk /run/shm tmpfs defaults,size=256M,noexec,nodev,nosuid 0 0
+logs /var/log tmpfs nodev,nosuid,noatime,mode=1777,size=5M 0 0
rune-logs /var/log/runeaudio tmpfs nodev,nosuid,noatime,mode=1777,size=20M 0 0
\ No newline at end of file
diff --git a/app/config/_os/etc/issue b/app/config/_os/etc/issue
index 91e0a6a9..7edccf73 100644
--- a/app/config/_os/etc/issue
+++ b/app/config/_os/etc/issue
@@ -1,5 +1,5 @@
----------------------------------------------------------
-Copyright (C) 2013-2014 RuneAudio Team
-Andrea Coiutti & Simone De Gregori & Carmelo San Giovanni
----------------------------------------------------------
-
+---------------------------------------------------------
+Copyright (C) 2013-2014 RuneAudio Team
+Andrea Coiutti & Simone De Gregori & Carmelo San Giovanni
+---------------------------------------------------------
+
diff --git a/app/config/_os/etc/minidlna.conf b/app/config/_os/etc/minidlna.conf
index ccd5f86b..f1d3952e 100644
--- a/app/config/_os/etc/minidlna.conf
+++ b/app/config/_os/etc/minidlna.conf
@@ -1,96 +1,96 @@
-# This is the configuration file for the MiniDLNA daemon, a DLNA/UPnP-AV media
-# server.
-#
-# Unless otherwise noted, the commented out options show their default value.
-#
-# On Debian, you can also refer to the minidlna.conf(5) man page for
-# documentation about this file.
-
-
-# Path to the directory you want scanned for media files.
-#
-# This option can be specified more than once if you want multiple directories
-# scanned.
-#
-# If you want to restrict a media_dir to a specific content type, you can
-# prepend the directory name with a letter representing the type (A, P or V),
-# followed by a comma, as so:
-# * "A" for audio (eg. media_dir=A,/var/lib/minidlna/music)
-# * "P" for pictures (eg. media_dir=P,/var/lib/minidlna/pictures)
-# * "V" for video (eg. media_dir=V,/var/lib/minidlna/videos)
-#
-# WARNING: After changing this option, you need to rebuild the database. Either
-# run minidlna with the '-R' option, or delete the 'files.db' file
-# from the db_dir directory (see below).
-# On Debian, you can run, as root, 'service minidlna force-reload' instead.
-#media_dir=/var/lib/mpd/music
-
-# Path to the directory that should hold the database and album art cache.
-#db_dir=/var/lib/minidlna
-db_dir=/run/minidlna
-
-# Path to the directory that should hold the log file.
-#log_dir=/var/log
-
-# Minimum level of importance of messages to be logged.
-# Must be one of "off", "fatal", "error", "warn", "info" or "debug".
-# "off" turns of logging entirely, "fatal" is the highest level of importance
-# and "debug" the lowest.
-#log_level=warn
-
-# Use a different container as the root of the directory tree presented to
-# clients. The possible values are:
-# * "." - standard container
-# * "B" - "Browse Directory"
-# * "M" - "Music"
-# * "P" - "Pictures"
-# * "V" - "Video"
-# if you specify "B" and client device is audio-only then "Music/Folders" will be used as root
-#root_container=.
-
-# Network interface(s) to bind to (e.g. eth0), comma delimited.
-#network_interface=
-
-# IPv4 address to listen on (e.g. 192.0.2.1).
-#listening_ip=
-
-# Port number for HTTP traffic (descriptions, SOAP, media transfer).
-port=8200
-
-# URL presented to clients.
-# The default is the IP address of the server on port 80.
-presentation_url=http://192.168.10.110:80
-
-# Name that the DLNA server presents to clients.
-#friendly_name=RuneAudio
-
-# Serial number the server reports to clients.
-serial=12345678
-
-# Model name the server reports to clients.
-#model_name=Windows Media Connect compatible (MiniDLNA)
-
-# Model number the server reports to clients.
-model_number=1
-
-# Automatic discovery of new files in the media_dir directory.
-inotify=no
-
-# List of file names to look for when searching for album art. Names should be
-# delimited with a forward slash ("/").
-#album_art_names=Cover.jpg/cover.jpg/AlbumArtSmall.jpg/albumartsmall.jpg/AlbumArt.jpg/albumart.jpg/Album.jpg/album.jpg/Folder.jpg/folder.jpg/Thumb.jpg/thumb.jpg
-
-# Strictly adhere to DLNA standards.
-# This allows server-side downscaling of very large JPEG images, which may
-# decrease JPEG serving performance on (at least) Sony DLNA products.
-#strict_dlna=no
-
-# Support for streaming .jpg and .mp3 files to a TiVo supporting HMO.
-#enable_tivo=no
-
-# Notify interval, in seconds.
-#notify_interval=895
-
-# Path to the MiniSSDPd socket, for MiniSSDPd support.
-#minissdpdsocket=/run/minissdpd.sock
-
+# This is the configuration file for the MiniDLNA daemon, a DLNA/UPnP-AV media
+# server.
+#
+# Unless otherwise noted, the commented out options show their default value.
+#
+# On Debian, you can also refer to the minidlna.conf(5) man page for
+# documentation about this file.
+
+
+# Path to the directory you want scanned for media files.
+#
+# This option can be specified more than once if you want multiple directories
+# scanned.
+#
+# If you want to restrict a media_dir to a specific content type, you can
+# prepend the directory name with a letter representing the type (A, P or V),
+# followed by a comma, as so:
+# * "A" for audio (eg. media_dir=A,/var/lib/minidlna/music)
+# * "P" for pictures (eg. media_dir=P,/var/lib/minidlna/pictures)
+# * "V" for video (eg. media_dir=V,/var/lib/minidlna/videos)
+#
+# WARNING: After changing this option, you need to rebuild the database. Either
+# run minidlna with the '-R' option, or delete the 'files.db' file
+# from the db_dir directory (see below).
+# On Debian, you can run, as root, 'service minidlna force-reload' instead.
+#media_dir=/var/lib/mpd/music
+
+# Path to the directory that should hold the database and album art cache.
+#db_dir=/var/lib/minidlna
+db_dir=/run/minidlna
+
+# Path to the directory that should hold the log file.
+#log_dir=/var/log
+
+# Minimum level of importance of messages to be logged.
+# Must be one of "off", "fatal", "error", "warn", "info" or "debug".
+# "off" turns of logging entirely, "fatal" is the highest level of importance
+# and "debug" the lowest.
+#log_level=warn
+
+# Use a different container as the root of the directory tree presented to
+# clients. The possible values are:
+# * "." - standard container
+# * "B" - "Browse Directory"
+# * "M" - "Music"
+# * "P" - "Pictures"
+# * "V" - "Video"
+# if you specify "B" and client device is audio-only then "Music/Folders" will be used as root
+#root_container=.
+
+# Network interface(s) to bind to (e.g. eth0), comma delimited.
+#network_interface=
+
+# IPv4 address to listen on (e.g. 192.0.2.1).
+#listening_ip=
+
+# Port number for HTTP traffic (descriptions, SOAP, media transfer).
+port=8200
+
+# URL presented to clients.
+# The default is the IP address of the server on port 80.
+presentation_url=http://192.168.10.110:80
+
+# Name that the DLNA server presents to clients.
+#friendly_name=RuneAudio
+
+# Serial number the server reports to clients.
+serial=12345678
+
+# Model name the server reports to clients.
+#model_name=Windows Media Connect compatible (MiniDLNA)
+
+# Model number the server reports to clients.
+model_number=1
+
+# Automatic discovery of new files in the media_dir directory.
+inotify=no
+
+# List of file names to look for when searching for album art. Names should be
+# delimited with a forward slash ("/").
+#album_art_names=Cover.jpg/cover.jpg/AlbumArtSmall.jpg/albumartsmall.jpg/AlbumArt.jpg/albumart.jpg/Album.jpg/album.jpg/Folder.jpg/folder.jpg/Thumb.jpg/thumb.jpg
+
+# Strictly adhere to DLNA standards.
+# This allows server-side downscaling of very large JPEG images, which may
+# decrease JPEG serving performance on (at least) Sony DLNA products.
+#strict_dlna=no
+
+# Support for streaming .jpg and .mp3 files to a TiVo supporting HMO.
+#enable_tivo=no
+
+# Notify interval, in seconds.
+#notify_interval=895
+
+# Path to the MiniSSDPd socket, for MiniSSDPd support.
+#minissdpdsocket=/run/minissdpd.sock
+
diff --git a/app/config/_os/etc/modprobe.d/snd-soc-pcm512x.conf b/app/config/_os/etc/modprobe.d/snd-soc-pcm512x.conf
index 7a503594..da352be1 100644
--- a/app/config/_os/etc/modprobe.d/snd-soc-pcm512x.conf
+++ b/app/config/_os/etc/modprobe.d/snd-soc-pcm512x.conf
@@ -1 +1 @@
-blacklist snd-soc-pcm512x
+blacklist snd-soc-pcm512x
diff --git a/app/config/_os/etc/motd b/app/config/_os/etc/motd
index 3d7e3514..38a58f8e 100644
--- a/app/config/_os/etc/motd
+++ b/app/config/_os/etc/motd
@@ -1,12 +1,17 @@
-=============== RuneOS distribution ===============
- ____ _ _ _
- | _ \ _ _ _ __ ___ / \ _ _ __| (_) ___
- | |_) | | | | '_ \ / _ \ / _ \| | | |/ _` | |/ _ \
- | _ <| |_| | | | | __// ___ \ |_| | (_| | | (_) |
- |_| \_\\__,_|_| |_|\___/_/ \_\__,_|\__,_|_|\___/
-
-================ www.runeaudio.com ================
-RuneOs: 0.3-alpha (build 20140709)
-RuneUI: 1.3-alpha
-Hw-env: RaspberryPi
-
+
+======================= RuneOS distribution =======================
+
+ _ ___ _ _ _
+ /\/\ _ _ ___(_) ___ __ _ / _ \_ __(_)___| |_(_)_ __ __ _
+ / \| | | / __| |/ __/ _` | / /_)/ '__| / __| __| | '_ \ / _` |
+/ /\/\ \ |_| \__ \ | (_| (_| | / ___/| | | \__ \ |_| | | | | (_| |
+\/ \/\__,_|___/_|\___\__,_| \/ |_| |_|___/\__|_|_| |_|\__,_|
+
+
+
+====================== www.musicapristina.com =====================
+
+RuneOs: 0.3-alpha (build 20140709)
+RuneUI: 1.3-alpha
+Hw-env: Musica Pristina A Cappella II
+
diff --git a/app/config/_os/etc/mpd.conf b/app/config/_os/etc/mpd.conf
index a86d7947..4f976b8f 100644
--- a/app/config/_os/etc/mpd.conf
+++ b/app/config/_os/etc/mpd.conf
@@ -1,56 +1,56 @@
-###################################
-# Auto generated mpd.conf file
-# please DO NOT edit it manually!
-# Use RuneUI MPD config section
-###################################
-
-follow_outside_symlinks "yes"
-follow_inside_symlinks "yes"
-db_file "/var/lib/mpd/mpd.db"
-sticker_file "/var/lib/mpd/sticker.sql"
-log_file "/var/log/runeaudio/mpd.log"
-pid_file "/var/run/mpd/pid"
-music_directory "/mnt/MPD"
-playlist_directory "/var/lib/mpd/playlists"
-state_file "/var/lib/mpd/mpdstate"
-user "mpd"
-bind_to_address "any"
-port "6600"
-bind_to_address "/run/mpd.sock"
-log_level "verbose"
-zeroconf_enabled "yes"
-zeroconf_name "runeaudio"
-volume_normalization "no"
-audio_buffer_size "2048"
-buffer_before_play "20%"
-filesystem_charset "UTF-8"
-id3v1_encoding "UTF-8"
-gapless_mp3_playback "yes"
-auto_update "no"
-mixer_type "software"
-group "audio"
-max_connections "20"
-
-decoder {
- plugin "ffmpeg"
- enabled "no"
-}
-
-input {
- plugin "curl"
-}
-
-audio_output {
-enabled "yes"
-type "alsa"
-name "AnalogOut"
-device "hw:0,0"
-dsd_usb "yes"
-}
-
-audio_output {
-enabled "no"
-type "alsa"
-device "hw:2,0"
-name "HDMI"
-}
+###################################
+# Auto generated mpd.conf file
+# please DO NOT edit it manually!
+# Use RuneUI MPD config section
+###################################
+
+follow_outside_symlinks "yes"
+follow_inside_symlinks "yes"
+db_file "/var/lib/mpd/mpd.db"
+sticker_file "/var/lib/mpd/sticker.sql"
+log_file "/var/log/runeaudio/mpd.log"
+pid_file "/var/run/mpd/pid"
+music_directory "/mnt/MPD"
+playlist_directory "/var/lib/mpd/playlists"
+state_file "/var/lib/mpd/mpdstate"
+user "mpd"
+bind_to_address "any"
+port "6600"
+bind_to_address "/run/mpd.sock"
+log_level "verbose"
+zeroconf_enabled "yes"
+zeroconf_name "runeaudio"
+volume_normalization "no"
+audio_buffer_size "2048"
+buffer_before_play "20%"
+filesystem_charset "UTF-8"
+id3v1_encoding "UTF-8"
+gapless_mp3_playback "yes"
+auto_update "no"
+mixer_type "software"
+group "audio"
+max_connections "20"
+
+decoder {
+ plugin "ffmpeg"
+ enabled "no"
+}
+
+input {
+ plugin "curl"
+}
+
+audio_output {
+enabled "yes"
+type "alsa"
+name "AnalogOut"
+device "hw:0,0"
+dsd_usb "yes"
+}
+
+audio_output {
+enabled "no"
+type "alsa"
+device "hw:2,0"
+name "HDMI"
+}
diff --git a/app/config/_os/etc/mpd.conf_utilite b/app/config/_os/etc/mpd.conf_utilite
index a86d7947..4f976b8f 100644
--- a/app/config/_os/etc/mpd.conf_utilite
+++ b/app/config/_os/etc/mpd.conf_utilite
@@ -1,56 +1,56 @@
-###################################
-# Auto generated mpd.conf file
-# please DO NOT edit it manually!
-# Use RuneUI MPD config section
-###################################
-
-follow_outside_symlinks "yes"
-follow_inside_symlinks "yes"
-db_file "/var/lib/mpd/mpd.db"
-sticker_file "/var/lib/mpd/sticker.sql"
-log_file "/var/log/runeaudio/mpd.log"
-pid_file "/var/run/mpd/pid"
-music_directory "/mnt/MPD"
-playlist_directory "/var/lib/mpd/playlists"
-state_file "/var/lib/mpd/mpdstate"
-user "mpd"
-bind_to_address "any"
-port "6600"
-bind_to_address "/run/mpd.sock"
-log_level "verbose"
-zeroconf_enabled "yes"
-zeroconf_name "runeaudio"
-volume_normalization "no"
-audio_buffer_size "2048"
-buffer_before_play "20%"
-filesystem_charset "UTF-8"
-id3v1_encoding "UTF-8"
-gapless_mp3_playback "yes"
-auto_update "no"
-mixer_type "software"
-group "audio"
-max_connections "20"
-
-decoder {
- plugin "ffmpeg"
- enabled "no"
-}
-
-input {
- plugin "curl"
-}
-
-audio_output {
-enabled "yes"
-type "alsa"
-name "AnalogOut"
-device "hw:0,0"
-dsd_usb "yes"
-}
-
-audio_output {
-enabled "no"
-type "alsa"
-device "hw:2,0"
-name "HDMI"
-}
+###################################
+# Auto generated mpd.conf file
+# please DO NOT edit it manually!
+# Use RuneUI MPD config section
+###################################
+
+follow_outside_symlinks "yes"
+follow_inside_symlinks "yes"
+db_file "/var/lib/mpd/mpd.db"
+sticker_file "/var/lib/mpd/sticker.sql"
+log_file "/var/log/runeaudio/mpd.log"
+pid_file "/var/run/mpd/pid"
+music_directory "/mnt/MPD"
+playlist_directory "/var/lib/mpd/playlists"
+state_file "/var/lib/mpd/mpdstate"
+user "mpd"
+bind_to_address "any"
+port "6600"
+bind_to_address "/run/mpd.sock"
+log_level "verbose"
+zeroconf_enabled "yes"
+zeroconf_name "runeaudio"
+volume_normalization "no"
+audio_buffer_size "2048"
+buffer_before_play "20%"
+filesystem_charset "UTF-8"
+id3v1_encoding "UTF-8"
+gapless_mp3_playback "yes"
+auto_update "no"
+mixer_type "software"
+group "audio"
+max_connections "20"
+
+decoder {
+ plugin "ffmpeg"
+ enabled "no"
+}
+
+input {
+ plugin "curl"
+}
+
+audio_output {
+enabled "yes"
+type "alsa"
+name "AnalogOut"
+device "hw:0,0"
+dsd_usb "yes"
+}
+
+audio_output {
+enabled "no"
+type "alsa"
+device "hw:2,0"
+name "HDMI"
+}
diff --git a/app/config/_os/etc/mpdscribble.conf b/app/config/_os/etc/mpdscribble.conf
index dba16c86..7090d930 100644
--- a/app/config/_os/etc/mpdscribble.conf
+++ b/app/config/_os/etc/mpdscribble.conf
@@ -1,55 +1,55 @@
-## mpdscribble - an audioscrobbler for the Music Player Daemon.
-## http://mpd.wikia.com/wiki/Client:mpdscribble
-
-# HTTP proxy URL.
-#proxy = http://the.proxy.server:3128
-
-# The location of the pid file. mpdscribble saves its process id there.
-pidfile = /run/mpdscribble.pid
-
-# Change to this system user after daemonization.
-#daemon_user = mpdscribble
-
-# The location of the mpdscribble log file. The special value
-# "syslog" makes mpdscribble use the local syslog daemon. On most
-# systems, log messages will appear in /var/log/daemon.log then.
-# "-" means log to stderr (the current terminal).
-#log = syslog
-log = /var/log/runeaudio/mpdscribble.log
-
-# How verbose mpdscribble's logging should be. Default is 1.
-verbose = 2
-
-# How often should mpdscribble save the journal file? [seconds]
-#journal_interval = 600
-
-# The host running MPD, possibly protected by a password
-# ([PASSWORD@]HOSTNAME). Defaults to $MPD_HOST or localhost.
-host = localhost
-
-# The port that the MPD listens on and mpdscribble should try to
-# connect to. Defaults to $MPD_PORT or 6600.
-port = 6600
-
-[last.fm]
-url = http://post.audioscrobbler.com/
-username = userid
-password = password
-# The file where mpdscribble should store its Last.fm journal in case
-# you do not have a connection to the Last.fm server.
-#journal = /run/mpdscribble/lastfm.journal
-
-#[libre.fm]
-#url = http://turtle.libre.fm/
-#username =
-#password = my_password
-#journal = /run/mpdscribble/librefm.journal
-
-#[jamendo]
-#url = http://postaudioscrobbler.jamendo.com/
-#username =
-#password = my_password
-#journal = /run/mpdscribble/jamendo.journal
-
-#[file]
-#file = /run/mpdscribble/log
+## mpdscribble - an audioscrobbler for the Music Player Daemon.
+## http://mpd.wikia.com/wiki/Client:mpdscribble
+
+# HTTP proxy URL.
+#proxy = http://the.proxy.server:3128
+
+# The location of the pid file. mpdscribble saves its process id there.
+pidfile = /run/mpdscribble.pid
+
+# Change to this system user after daemonization.
+#daemon_user = mpdscribble
+
+# The location of the mpdscribble log file. The special value
+# "syslog" makes mpdscribble use the local syslog daemon. On most
+# systems, log messages will appear in /var/log/daemon.log then.
+# "-" means log to stderr (the current terminal).
+#log = syslog
+log = /var/log/runeaudio/mpdscribble.log
+
+# How verbose mpdscribble's logging should be. Default is 1.
+verbose = 2
+
+# How often should mpdscribble save the journal file? [seconds]
+#journal_interval = 600
+
+# The host running MPD, possibly protected by a password
+# ([PASSWORD@]HOSTNAME). Defaults to $MPD_HOST or localhost.
+host = localhost
+
+# The port that the MPD listens on and mpdscribble should try to
+# connect to. Defaults to $MPD_PORT or 6600.
+port = 6600
+
+[last.fm]
+url = http://post.audioscrobbler.com/
+username = userid
+password = password
+# The file where mpdscribble should store its Last.fm journal in case
+# you do not have a connection to the Last.fm server.
+#journal = /run/mpdscribble/lastfm.journal
+
+#[libre.fm]
+#url = http://turtle.libre.fm/
+#username =
+#password = my_password
+#journal = /run/mpdscribble/librefm.journal
+
+#[jamendo]
+#url = http://postaudioscrobbler.jamendo.com/
+#username =
+#password = my_password
+#journal = /run/mpdscribble/jamendo.journal
+
+#[file]
+#file = /run/mpdscribble/log
diff --git a/app/config/_os/etc/netconfig b/app/config/_os/etc/netconfig
index 4cc30c52..71ccce69 100644
--- a/app/config/_os/etc/netconfig
+++ b/app/config/_os/etc/netconfig
@@ -1,19 +1,19 @@
-#
-# The network configuration file. This file is currently only used in
-# conjunction with the TI-RPC code in the libtirpc library.
-#
-# Entries consist of:
-#
-# \
-#
-#
-# The and fields are always empty in this
-# implementation.
-#
-udp tpi_clts v inet udp - -
-tcp tpi_cots_ord v inet tcp - -
-#udp6 tpi_clts v inet6 udp - -
-#tcp6 tpi_cots_ord v inet6 tcp - -
-rawip tpi_raw - inet - - -
-local tpi_cots_ord - loopback - - -
-unix tpi_cots_ord - loopback - - -
+#
+# The network configuration file. This file is currently only used in
+# conjunction with the TI-RPC code in the libtirpc library.
+#
+# Entries consist of:
+#
+# \
+#
+#
+# The and fields are always empty in this
+# implementation.
+#
+udp tpi_clts v inet udp - -
+tcp tpi_cots_ord v inet tcp - -
+#udp6 tpi_clts v inet6 udp - -
+#tcp6 tpi_cots_ord v inet6 tcp - -
+rawip tpi_raw - inet - - -
+local tpi_cots_ord - loopback - - -
+unix tpi_cots_ord - loopback - - -
diff --git a/app/config/_os/etc/netctl/eth0-dhcp b/app/config/_os/etc/netctl/eth0-dhcp
index 89d4e9d3..7fbac09b 100644
--- a/app/config/_os/etc/netctl/eth0-dhcp
+++ b/app/config/_os/etc/netctl/eth0-dhcp
@@ -1,7 +1,7 @@
-Description='dhcp ethernet connection'
-Interface=eth0
-Connection=ethernet
-AutoWired=yes
-IP=dhcp
-DHCPReleaseOnStop=yes
-ExecUpPost='/usr/bin/ntpd -gq || true'
+Description='dhcp ethernet connection'
+Interface=eth0
+Connection=ethernet
+AutoWired=yes
+IP=dhcp
+DHCPReleaseOnStop=yes
+ExecUpPost='/usr/bin/ntpd -gq || true'
diff --git a/app/config/_os/etc/netctl/eth0-static b/app/config/_os/etc/netctl/eth0-static
index 4ea24a7d..19b305bd 100644
--- a/app/config/_os/etc/netctl/eth0-static
+++ b/app/config/_os/etc/netctl/eth0-static
@@ -1,8 +1,8 @@
-Description='static ethernet connection'
-Interface=eth0
-Connection=ethernet
-AutoWired=yes
-IP=static
-Address=('192.168.1.123/24')
-Gateway='192.168.1.1'
-DNS=('8.8.8.8' '8.8.4.4')
+Description='static ethernet connection'
+Interface=eth0
+Connection=ethernet
+AutoWired=yes
+IP=static
+Address=('192.168.1.123/24')
+Gateway='192.168.1.1'
+DNS=('8.8.8.8' '8.8.4.4')
diff --git a/app/config/_os/etc/netctl/wlan0-wpa_supplicant-multissid-dhcp b/app/config/_os/etc/netctl/wlan0-wpa_supplicant-multissid-dhcp
index 616bdac2..13d32e50 100644
--- a/app/config/_os/etc/netctl/wlan0-wpa_supplicant-multissid-dhcp
+++ b/app/config/_os/etc/netctl/wlan0-wpa_supplicant-multissid-dhcp
@@ -1,6 +1,6 @@
-Description='encrypted wireless connection'
-Interface=wlan0
-Connection=wireless
-Security=wpa-config
-WPAConfigFile='/etc/wpa_supplicant/wpa_supplicant.conf'
+Description='encrypted wireless connection'
+Interface=wlan0
+Connection=wireless
+Security=wpa-config
+WPAConfigFile='/etc/wpa_supplicant/wpa_supplicant.conf'
IP=dhcp
\ No newline at end of file
diff --git a/app/config/_os/etc/netctl/wlan0-wpa_supplicant-multissid-static b/app/config/_os/etc/netctl/wlan0-wpa_supplicant-multissid-static
index 8e6b8b1e..27bfa346 100644
--- a/app/config/_os/etc/netctl/wlan0-wpa_supplicant-multissid-static
+++ b/app/config/_os/etc/netctl/wlan0-wpa_supplicant-multissid-static
@@ -1,11 +1,11 @@
-Description='A simple WPA encrypted wireless connection'
-Interface=wlan0
-Connection=wireless
-ForceConnect=yes
-SkipNoCarrier=yes
-Security=wpa-config
-WPAConfigFile='/etc/wpa_supplicant/wpa_supplicant.conf'
-IP=static
-Address=('172.31.2.108/24')
-Gateway='172.31.2.254'
-DNS=('8.8.8.8' '8.8.4.4')
+Description='A simple WPA encrypted wireless connection'
+Interface=wlan0
+Connection=wireless
+ForceConnect=yes
+SkipNoCarrier=yes
+Security=wpa-config
+WPAConfigFile='/etc/wpa_supplicant/wpa_supplicant.conf'
+IP=static
+Address=('172.31.2.108/24')
+Gateway='172.31.2.254'
+DNS=('8.8.8.8' '8.8.4.4')
diff --git a/app/config/_os/etc/nginx/nginx-dev.conf b/app/config/_os/etc/nginx/nginx-dev.conf
index cb09ea7c..1debc237 100644
--- a/app/config/_os/etc/nginx/nginx-dev.conf
+++ b/app/config/_os/etc/nginx/nginx-dev.conf
@@ -1,179 +1,179 @@
-user root users;
-worker_processes 1;
-
-#error_log /var/log/runeaudio/runeui.log;
-error_log /var/log/runeaudio/runeui.log debug;
-#error_log /var/log/runeaudio/runeui.log info;
-
-
-events {
- worker_connections 1024;
- use epoll;
-}
-
-
-http {
- include mime.types;
- #default_type application/octet-stream;
- #access_log /var/log/runeaudio/runeui.log main;
- sendfile on;
- keepalive_timeout 0;
- gzip off;
- proxy_buffering off;
- fastcgi_keep_conn on;
- fastcgi_buffers 8 16k;
- fastcgi_buffer_size 32k;
-
- # push directives
- push_stream_shared_memory_size 16M;
- #push_stream_channel_inactivity_time 0;
- push_stream_channel_info_on_publish off;
- #push_stream_timeout_with_body on;
-
- # DISPLAY section [/]
- server {
- listen 80 deferred;
- add_header X-UA-Compatible "IE=Edge,chrome=1";
- access_log /var/log/runeaudio/runeui_access.log;
-
- location / {
- root /var/www;
- index index.php index.html index.htm;
- try_files $uri /index.php;
- }
-
- location ~* (.+)\.(?:\d+)\.(js|css|png|jpg|jpeg|gif|ico)$ {
- try_files $uri $1.$2;
- }
-
- location /pub {
- # activate publisher (admin) mode for this location
- push_stream_publisher admin;
- # query string based channel id
- push_stream_channels_path $arg_id;
- }
-
- location ~ /lp/(.*) {
- # activate subscriber (long-polling)
- push_stream_subscriber long-polling;
- # positional channel path
- push_stream_channels_path $1;
- # message template
- push_stream_message_template "{\"id\":~id~,\"channel\":\"~channel~\",\"text\":[~text~],\"tag\":~tag~,\"time\":\"~time~\"}";
- #push_stream_last_received_message_tag $arg_tag;
- #push_stream_last_received_message_time $arg_time;
- # connection timeout
- #push_stream_longpolling_connection_ttl 60s;
- #push_stream_ping_message_interval 30s;
- }
-
- location ~ /ws/(.*) {
- # activate subscriber (websocket)
- push_stream_subscriber websocket;
- # positional channel path
- push_stream_channels_path $1;
- # message template
- push_stream_message_template "{\"id\":~id~,\"channel\":\"~channel~\",\"text\":[~text~]}";
- #push_stream_websocket_allow_publish on;
- # ping frequency
- push_stream_ping_message_interval 10s;
- }
-
- location /stats {
- # activate channels statistics
- push_stream_channels_statistics;
- push_stream_channels_path $1;
- # query string based channel id
- set $push_stream_channel_id $arg_id;
- }
-
- # proxy RUELS
- location /db {
- proxy_pass http://localhost:81/;
- }
-
- location /command {
- proxy_pass http://localhost:82/;
- }
-
- location /test {
- try_files $uri /test/index.php;
- }
-
- location /clear {
- try_files $uri /command/cachectl.php?action=reset;
- }
-
- # rewrite RULES
- rewrite /css/(.*) /assets/css/$1 break;
- rewrite /less/(.*) /assets/less/$1 break;
- rewrite /js/(.*) /assets/js/$1 break;
- rewrite /img/(.*) /assets/img/$1 break;
- rewrite /fonts/(.*) /assets/fonts/$1 break;
-
- # redirect server error pages to the static page /50x.html
- error_page 500 502 503 504 /50x.html;
- location = /50x.html {
- root html;
- }
- # php5-fpm
- location ~ \.php$ {
- proxy_buffer_size 128k;
- proxy_buffers 4 256k;
- proxy_busy_buffers_size 256k;
- root /var/www;
- fastcgi_pass unix:/var/run/php-display.sock;
- fastcgi_index index.php;
- include fastcgi_params;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_read_timeout 3600;
- }
-
- } # end DISPLAY section [/]
-
- # DB section [/db]
- server {
- listen 81 deferred;
- access_log /var/log/runeaudio/runeui.log;
- location / {
- root /var/www/db;
- index index.php;
- }
- # php5-fpm
- location ~ \.php$ {
- root /var/www/db;
- #proxy_buffer_size 128k;
- #proxy_buffers 4 256k;
- #proxy_busy_buffers_size 256k;
- fastcgi_pass unix:/var/run/php-db.sock;
- fastcgi_index index.php;
- include fastcgi_params;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_read_timeout 3600;
- }
- } # end DB section [/db]
-
- #
- server {
- listen 82 deferred;
- access_log /var/log/runeaudio/runeui.log;
- location / {
- root /var/www/command;
- index index.php;
- }
- # php5-fpm
- location ~ \.php$ {
- root /var/www/command;
- proxy_buffer_size 128k;
- proxy_buffers 4 256k;
- proxy_busy_buffers_size 256k;
- fastcgi_pass unix:/var/run/php-command.sock;
- fastcgi_index index.php;
- include fastcgi_params;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_read_timeout 3600;
- }
- } # end COMMAND section [/command]
-
-} # end http block
-
+user root users;
+worker_processes 1;
+
+#error_log /var/log/runeaudio/runeui.log;
+error_log /var/log/runeaudio/runeui.log debug;
+#error_log /var/log/runeaudio/runeui.log info;
+
+
+events {
+ worker_connections 1024;
+ use epoll;
+}
+
+
+http {
+ include mime.types;
+ #default_type application/octet-stream;
+ #access_log /var/log/runeaudio/runeui.log main;
+ sendfile on;
+ keepalive_timeout 0;
+ gzip off;
+ proxy_buffering off;
+ fastcgi_keep_conn on;
+ fastcgi_buffers 8 16k;
+ fastcgi_buffer_size 32k;
+
+ # push directives
+ push_stream_shared_memory_size 16M;
+ #push_stream_channel_inactivity_time 0;
+ push_stream_channel_info_on_publish off;
+ #push_stream_timeout_with_body on;
+
+ # DISPLAY section [/]
+ server {
+ listen 80 deferred;
+ add_header X-UA-Compatible "IE=Edge,chrome=1";
+ access_log /var/log/runeaudio/runeui_access.log;
+
+ location / {
+ root /var/www;
+ index index.php index.html index.htm;
+ try_files $uri /index.php;
+ }
+
+ location ~* (.+)\.(?:\d+)\.(js|css|png|jpg|jpeg|gif|ico)$ {
+ try_files $uri $1.$2;
+ }
+
+ location /pub {
+ # activate publisher (admin) mode for this location
+ push_stream_publisher admin;
+ # query string based channel id
+ push_stream_channels_path $arg_id;
+ }
+
+ location ~ /lp/(.*) {
+ # activate subscriber (long-polling)
+ push_stream_subscriber long-polling;
+ # positional channel path
+ push_stream_channels_path $1;
+ # message template
+ push_stream_message_template "{\"id\":~id~,\"channel\":\"~channel~\",\"text\":[~text~],\"tag\":~tag~,\"time\":\"~time~\"}";
+ #push_stream_last_received_message_tag $arg_tag;
+ #push_stream_last_received_message_time $arg_time;
+ # connection timeout
+ #push_stream_longpolling_connection_ttl 60s;
+ #push_stream_ping_message_interval 30s;
+ }
+
+ location ~ /ws/(.*) {
+ # activate subscriber (websocket)
+ push_stream_subscriber websocket;
+ # positional channel path
+ push_stream_channels_path $1;
+ # message template
+ push_stream_message_template "{\"id\":~id~,\"channel\":\"~channel~\",\"text\":[~text~]}";
+ #push_stream_websocket_allow_publish on;
+ # ping frequency
+ push_stream_ping_message_interval 10s;
+ }
+
+ location /stats {
+ # activate channels statistics
+ push_stream_channels_statistics;
+ push_stream_channels_path $1;
+ # query string based channel id
+ set $push_stream_channel_id $arg_id;
+ }
+
+ # proxy RUELS
+ location /db {
+ proxy_pass http://localhost:81/;
+ }
+
+ location /command {
+ proxy_pass http://localhost:82/;
+ }
+
+ location /test {
+ try_files $uri /test/index.php;
+ }
+
+ location /clear {
+ try_files $uri /command/cachectl.php?action=reset;
+ }
+
+ # rewrite RULES
+ rewrite /css/(.*) /assets/css/$1 break;
+ rewrite /less/(.*) /assets/less/$1 break;
+ rewrite /js/(.*) /assets/js/$1 break;
+ rewrite /img/(.*) /assets/img/$1 break;
+ rewrite /fonts/(.*) /assets/fonts/$1 break;
+
+ # redirect server error pages to the static page /50x.html
+ error_page 500 502 503 504 /50x.html;
+ location = /50x.html {
+ root html;
+ }
+ # php5-fpm
+ location ~ \.php$ {
+ proxy_buffer_size 128k;
+ proxy_buffers 4 256k;
+ proxy_busy_buffers_size 256k;
+ root /var/www;
+ fastcgi_pass unix:/var/run/php-display.sock;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ fastcgi_read_timeout 3600;
+ }
+
+ } # end DISPLAY section [/]
+
+ # DB section [/db]
+ server {
+ listen 81 deferred;
+ access_log /var/log/runeaudio/runeui.log;
+ location / {
+ root /var/www/db;
+ index index.php;
+ }
+ # php5-fpm
+ location ~ \.php$ {
+ root /var/www/db;
+ #proxy_buffer_size 128k;
+ #proxy_buffers 4 256k;
+ #proxy_busy_buffers_size 256k;
+ fastcgi_pass unix:/var/run/php-db.sock;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ fastcgi_read_timeout 3600;
+ }
+ } # end DB section [/db]
+
+ #
+ server {
+ listen 82 deferred;
+ access_log /var/log/runeaudio/runeui.log;
+ location / {
+ root /var/www/command;
+ index index.php;
+ }
+ # php5-fpm
+ location ~ \.php$ {
+ root /var/www/command;
+ proxy_buffer_size 128k;
+ proxy_buffers 4 256k;
+ proxy_busy_buffers_size 256k;
+ fastcgi_pass unix:/var/run/php-command.sock;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ fastcgi_read_timeout 3600;
+ }
+ } # end COMMAND section [/command]
+
+} # end http block
+
diff --git a/app/config/_os/etc/nginx/nginx.conf b/app/config/_os/etc/nginx/nginx.conf
index aa5e94b6..484c5154 100644
--- a/app/config/_os/etc/nginx/nginx.conf
+++ b/app/config/_os/etc/nginx/nginx.conf
@@ -1,214 +1,214 @@
-user root users;
-worker_processes 1;
-
-#error_log /var/log/runeaudio/runeui.log;
-##error_log /var/log/runeaudio/runeui.log debug;
-#error_log /var/log/runeaudio/runeui.log info;
-
-
-events {
- worker_connections 1024;
- use epoll;
-}
-
-
-http {
- include mime.types;
- #default_type application/octet-stream;
- #access_log /var/log/runeaudio/runeui.log main;
- sendfile on;
- keepalive_timeout 0;
- proxy_buffering off;
- fastcgi_keep_conn on;
- fastcgi_buffers 8 16k;
- fastcgi_buffer_size 32k;
-
- # push directives
- push_stream_shared_memory_size 16M;
- #push_stream_channel_inactivity_time 0;
- push_stream_channel_info_on_publish off;
- #push_stream_timeout_with_body on;
-
- # start DISPLAY section [/]
- server {
- listen 80 deferred;
- add_header X-UA-Compatible "IE=Edge,chrome=1";
- #access_log /var/log/runeaudio/runeui_access.log;
-
- location / {
- root /var/www;
- index index.php index.html index.htm;
- try_files $uri /index.php;
- }
-
- location ~* (.+)\.(?:\d+)\.(js|css|png|jpg|jpeg|gif|ico)$ {
- try_files $uri $1.$2;
- }
-
- location /pub {
- # activate publisher (admin) mode for this location
- push_stream_publisher admin;
- # query string based channel id
- push_stream_channels_path $arg_id;
- }
-
- location ~ /lp/(.*) {
- # activate subscriber (long-polling)
- push_stream_subscriber long-polling;
- # positional channel path
- push_stream_channels_path $1;
- # message template
- push_stream_message_template "{\"id\":~id~,\"channel\":\"~channel~\",\"text\":[~text~],\"tag\":~tag~,\"time\":\"~time~\"}";
- #push_stream_last_received_message_tag $arg_tag;
- #push_stream_last_received_message_time $arg_time;
- # connection timeout
- #push_stream_longpolling_connection_ttl 60s;
- #push_stream_ping_message_interval 30s;
- }
-
- location ~ /ws/(.*) {
- # activate subscriber (websocket)
- push_stream_subscriber websocket;
- # positional channel path
- push_stream_channels_path $1;
- # message template
- push_stream_message_template "{\"id\":~id~,\"channel\":\"~channel~\",\"text\":[~text~]}";
- #push_stream_websocket_allow_publish on;
- # ping frequency
- push_stream_ping_message_interval 10s;
- }
-
- location ~ /pl_lp/(.*) {
- # activate subscriber (long-polling)
- push_stream_subscriber long-polling;
- # positional channel path
- push_stream_channels_path $1;
- # message template
- push_stream_message_template "{\"id\":~id~,\"channel\":\"~channel~\",\"text\":\"~text~\",\"tag\":~tag~,\"time\":\"~time~\"}";
- #push_stream_last_received_message_tag $arg_tag;
- #push_stream_last_received_message_time $arg_time;
- # connection timeout
- #push_stream_longpolling_connection_ttl 60s;
- #push_stream_ping_message_interval 30s;
- }
-
- location ~ /pl_ws/(.*) {
- # activate subscriber (websocket)
- push_stream_subscriber websocket;
- # positional channel path
- push_stream_channels_path $1;
- # message template
- push_stream_message_template "{\"id\":~id~,\"channel\":\"~channel~\",\"text\":\"~text~\"}";
- #push_stream_websocket_allow_publish on;
- # ping frequency
- push_stream_ping_message_interval 10s;
- }
-
- location /stats {
- # activate channels statistics
- push_stream_channels_statistics;
- push_stream_channels_path $1;
- # query string based channel id
- set $push_stream_channel_id $arg_id;
- }
-
- # proxy RUELS
- location /db {
- proxy_pass http://127.0.0.1:81/;
- }
-
- location /command {
- proxy_pass http://127.0.0.1:82/;
- }
-
- location /covers {
- proxy_pass http://localhost:83/;
- }
-
- location /clear {
- try_files $uri /command/cachectl.php?action=reset;
- }
-
- # rewrite RULES
- rewrite /css/(.*) /assets/css/$1 break;
- rewrite /less/(.*) /assets/less/$1 break;
- rewrite /js/(.*) /assets/js/$1 break;
- rewrite /img/(.*) /assets/img/$1 break;
- rewrite /fonts/(.*) /assets/fonts/$1 break;
-
- # redirect server error pages to the static page /50x.html
- error_page 500 502 503 504 /50x.html;
- location = /50x.html {
- root html;
- }
-
- # php5-fpm
- location ~ \.php$ {
- proxy_buffer_size 128k;
- proxy_buffers 4 256k;
- proxy_busy_buffers_size 256k;
- root /var/www;
- fastcgi_pass unix:/var/run/php-display.sock;
- fastcgi_index index.php;
- include fastcgi_params;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_read_timeout 3600;
- }
-
- } # end DISPLAY section [/]
-
- # start DB section [/db]
- server {
- listen 81 deferred;
- #access_log /var/log/runeaudio/runeui.log;
- location / {
- root /var/www/db;
- index index.php;
- }
- # php5-fpm
- location ~ \.php$ {
- root /var/www/db;
- #proxy_buffer_size 128k;
- #proxy_buffers 4 256k;
- #proxy_busy_buffers_size 256k;
- fastcgi_pass unix:/var/run/php-db.sock;
- fastcgi_index index.php;
- include fastcgi_params;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_read_timeout 3600;
- }
- } # end DB section [/db]
-
- # start COMMAND section [/command]
- server {
- listen 82 deferred;
- #access_log /var/log/runeaudio/runeui.log;
- location / {
- root /var/www/command;
- index index.php;
- }
- # php5-fpm
- location ~ \.php$ {
- root /var/www/command;
- proxy_buffer_size 128k;
- proxy_buffers 4 256k;
- proxy_busy_buffers_size 256k;
- fastcgi_pass unix:/var/run/php-command.sock;
- fastcgi_index index.php;
- include fastcgi_params;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_read_timeout 3600;
- }
- } # end COMMAND section [/command]
-
- # start COVERS section [/covers]
- server {
- listen 83;
- root /mnt/MPD;
- location ~* \.(jpg|png|jpeg|bmp) {
- expires 7d;
- }
- } # end COVERS section
-
-} # end http block
-
+user root users;
+worker_processes 1;
+
+#error_log /var/log/runeaudio/runeui.log;
+##error_log /var/log/runeaudio/runeui.log debug;
+#error_log /var/log/runeaudio/runeui.log info;
+
+
+events {
+ worker_connections 1024;
+ use epoll;
+}
+
+
+http {
+ include mime.types;
+ #default_type application/octet-stream;
+ #access_log /var/log/runeaudio/runeui.log main;
+ sendfile on;
+ keepalive_timeout 0;
+ proxy_buffering off;
+ fastcgi_keep_conn on;
+ fastcgi_buffers 8 16k;
+ fastcgi_buffer_size 32k;
+
+ # push directives
+ push_stream_shared_memory_size 16M;
+ #push_stream_channel_inactivity_time 0;
+ push_stream_channel_info_on_publish off;
+ #push_stream_timeout_with_body on;
+
+ # start DISPLAY section [/]
+ server {
+ listen 80 deferred;
+ add_header X-UA-Compatible "IE=Edge,chrome=1";
+ #access_log /var/log/runeaudio/runeui_access.log;
+
+ location / {
+ root /var/www;
+ index index.php index.html index.htm;
+ try_files $uri /index.php;
+ }
+
+ location ~* (.+)\.(?:\d+)\.(js|css|png|jpg|jpeg|gif|ico)$ {
+ try_files $uri $1.$2;
+ }
+
+ location /pub {
+ # activate publisher (admin) mode for this location
+ push_stream_publisher admin;
+ # query string based channel id
+ push_stream_channels_path $arg_id;
+ }
+
+ location ~ /lp/(.*) {
+ # activate subscriber (long-polling)
+ push_stream_subscriber long-polling;
+ # positional channel path
+ push_stream_channels_path $1;
+ # message template
+ push_stream_message_template "{\"id\":~id~,\"channel\":\"~channel~\",\"text\":[~text~],\"tag\":~tag~,\"time\":\"~time~\"}";
+ #push_stream_last_received_message_tag $arg_tag;
+ #push_stream_last_received_message_time $arg_time;
+ # connection timeout
+ #push_stream_longpolling_connection_ttl 60s;
+ #push_stream_ping_message_interval 30s;
+ }
+
+ location ~ /ws/(.*) {
+ # activate subscriber (websocket)
+ push_stream_subscriber websocket;
+ # positional channel path
+ push_stream_channels_path $1;
+ # message template
+ push_stream_message_template "{\"id\":~id~,\"channel\":\"~channel~\",\"text\":[~text~]}";
+ #push_stream_websocket_allow_publish on;
+ # ping frequency
+ push_stream_ping_message_interval 10s;
+ }
+
+ location ~ /pl_lp/(.*) {
+ # activate subscriber (long-polling)
+ push_stream_subscriber long-polling;
+ # positional channel path
+ push_stream_channels_path $1;
+ # message template
+ push_stream_message_template "{\"id\":~id~,\"channel\":\"~channel~\",\"text\":\"~text~\",\"tag\":~tag~,\"time\":\"~time~\"}";
+ #push_stream_last_received_message_tag $arg_tag;
+ #push_stream_last_received_message_time $arg_time;
+ # connection timeout
+ #push_stream_longpolling_connection_ttl 60s;
+ #push_stream_ping_message_interval 30s;
+ }
+
+ location ~ /pl_ws/(.*) {
+ # activate subscriber (websocket)
+ push_stream_subscriber websocket;
+ # positional channel path
+ push_stream_channels_path $1;
+ # message template
+ push_stream_message_template "{\"id\":~id~,\"channel\":\"~channel~\",\"text\":\"~text~\"}";
+ #push_stream_websocket_allow_publish on;
+ # ping frequency
+ push_stream_ping_message_interval 10s;
+ }
+
+ location /stats {
+ # activate channels statistics
+ push_stream_channels_statistics;
+ push_stream_channels_path $1;
+ # query string based channel id
+ set $push_stream_channel_id $arg_id;
+ }
+
+ # proxy RUELS
+ location /db {
+ proxy_pass http://127.0.0.1:81/;
+ }
+
+ location /command {
+ proxy_pass http://127.0.0.1:82/;
+ }
+
+ location /covers {
+ proxy_pass http://localhost:83/;
+ }
+
+ location /clear {
+ try_files $uri /command/cachectl.php?action=reset;
+ }
+
+ # rewrite RULES
+ rewrite /css/(.*) /assets/css/$1 break;
+ rewrite /less/(.*) /assets/less/$1 break;
+ rewrite /js/(.*) /assets/js/$1 break;
+ rewrite /img/(.*) /assets/img/$1 break;
+ rewrite /fonts/(.*) /assets/fonts/$1 break;
+
+ # redirect server error pages to the static page /50x.html
+ error_page 500 502 503 504 /50x.html;
+ location = /50x.html {
+ root html;
+ }
+
+ # php5-fpm
+ location ~ \.php$ {
+ proxy_buffer_size 128k;
+ proxy_buffers 4 256k;
+ proxy_busy_buffers_size 256k;
+ root /var/www;
+ fastcgi_pass unix:/var/run/php-display.sock;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ fastcgi_read_timeout 3600;
+ }
+
+ } # end DISPLAY section [/]
+
+ # start DB section [/db]
+ server {
+ listen 81 deferred;
+ #access_log /var/log/runeaudio/runeui.log;
+ location / {
+ root /var/www/db;
+ index index.php;
+ }
+ # php5-fpm
+ location ~ \.php$ {
+ root /var/www/db;
+ #proxy_buffer_size 128k;
+ #proxy_buffers 4 256k;
+ #proxy_busy_buffers_size 256k;
+ fastcgi_pass unix:/var/run/php-db.sock;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ fastcgi_read_timeout 3600;
+ }
+ } # end DB section [/db]
+
+ # start COMMAND section [/command]
+ server {
+ listen 82 deferred;
+ #access_log /var/log/runeaudio/runeui.log;
+ location / {
+ root /var/www/command;
+ index index.php;
+ }
+ # php5-fpm
+ location ~ \.php$ {
+ root /var/www/command;
+ proxy_buffer_size 128k;
+ proxy_buffers 4 256k;
+ proxy_busy_buffers_size 256k;
+ fastcgi_pass unix:/var/run/php-command.sock;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ fastcgi_read_timeout 3600;
+ }
+ } # end COMMAND section [/command]
+
+ # start COVERS section [/covers]
+ server {
+ listen 83;
+ root /mnt/MPD;
+ location ~* \.(jpg|png|jpeg|bmp) {
+ expires 7d;
+ }
+ } # end COVERS section
+
+} # end http block
+
diff --git a/app/config/_os/etc/php/fpm.d/command.conf b/app/config/_os/etc/php/fpm.d/command.conf
index f6efcb8e..c2b64005 100644
--- a/app/config/_os/etc/php/fpm.d/command.conf
+++ b/app/config/_os/etc/php/fpm.d/command.conf
@@ -1,9 +1,9 @@
-[command]
-user = http
-group = http
-listen = /var/run/php-command.sock
-;listen = 127.0.0.1:9002
-pm = static
-pm.start_servers = 1
-pm.max_children = 1
-chdir = /
+[command]
+user = http
+group = http
+listen = /var/run/php-command.sock
+;listen = 127.0.0.1:9002
+pm = static
+pm.start_servers = 1
+pm.max_children = 1
+chdir = /
diff --git a/app/config/_os/etc/php/fpm.d/db.conf b/app/config/_os/etc/php/fpm.d/db.conf
index 7d084a3e..37fea774 100644
--- a/app/config/_os/etc/php/fpm.d/db.conf
+++ b/app/config/_os/etc/php/fpm.d/db.conf
@@ -1,9 +1,9 @@
-[db]
-user = http
-group = http
-listen = /var/run/php-db.sock
-;listen = 127.0.0.1:9001
-pm = static
-pm.start_servers = 1
-pm.max_children = 1
-chdir = /
+[db]
+user = http
+group = http
+listen = /var/run/php-db.sock
+;listen = 127.0.0.1:9001
+pm = static
+pm.start_servers = 1
+pm.max_children = 1
+chdir = /
diff --git a/app/config/_os/etc/php/fpm.d/display.conf b/app/config/_os/etc/php/fpm.d/display.conf
index 77843d84..2e9f9d0c 100644
--- a/app/config/_os/etc/php/fpm.d/display.conf
+++ b/app/config/_os/etc/php/fpm.d/display.conf
@@ -1,14 +1,14 @@
-[display]
-user = http
-group = http
-listen = /var/run/php-display.sock
-pm = static
-pm.max_children = 1
-pm.start_servers = 1
-chdir = /
-;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
-;php_flag[display_errors] = off
-;php_admin_value[error_log] = /var/log/fpm-php.www.log
-;php_admin_flag[log_errors] = on
-;php_admin_value[memory_limit] = 32M
-
+[display]
+user = http
+group = http
+listen = /var/run/php-display.sock
+pm = static
+pm.max_children = 1
+pm.start_servers = 1
+chdir = /
+;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
+;php_flag[display_errors] = off
+;php_admin_value[error_log] = /var/log/fpm-php.www.log
+;php_admin_flag[log_errors] = on
+;php_admin_value[memory_limit] = 32M
+
diff --git a/app/config/_os/etc/php/php-fpm.conf b/app/config/_os/etc/php/php-fpm.conf
index 33326fc3..3389189a 100644
--- a/app/config/_os/etc/php/php-fpm.conf
+++ b/app/config/_os/etc/php/php-fpm.conf
@@ -1,117 +1,117 @@
-;;;;;;;;;;;;;;;;;;;;;
-; FPM Configuration ;
-;;;;;;;;;;;;;;;;;;;;;
-
-; All relative paths in this configuration file are relative to PHP's install
-; prefix (/usr). This prefix can be dynamically changed by using the
-; '-p' argument from the command line.
-
-; Include one or more files. If glob(3) exists, it is used to include a bunch of
-; files from a glob(3) pattern. This directive can be used everywhere in the
-; file.
-; Relative path can also be used. They will be prefixed by:
-; - the global prefix if it's been set (-p argument)
-; - /usr otherwise
-include=/etc/php/fpm.d/*.conf
-
-;;;;;;;;;;;;;;;;;;
-; Global Options ;
-;;;;;;;;;;;;;;;;;;
-
-[global]
-; Pid file
-; Note: the default prefix is /var
-; Default Value: none
-pid = /run/php-fpm/php-fpm.pid
-
-; Error log file
-; If it's set to "syslog", log is sent to syslogd instead of being written
-; in a local file.
-; Note: the default prefix is /var
-; Default Value: log/php-fpm.log
-;error_log = log/php-fpm.log
-
-; syslog_facility is used to specify what type of program is logging the
-; message. This lets syslogd specify that messages from different facilities
-; will be handled differently.
-; See syslog(3) for possible values (ex daemon equiv LOG_DAEMON)
-; Default Value: daemon
-;syslog.facility = daemon
-
-; syslog_ident is prepended to every message. If you have multiple FPM
-; instances running on the same server, you can change the default value
-; which must suit common needs.
-; Default Value: php-fpm
-;syslog.ident = php-fpm
-
-; Log level
-; Possible Values: alert, error, warning, notice, debug
-; Default Value: notice
-;log_level = notice
-
-; If this number of child processes exit with SIGSEGV or SIGBUS within the time
-; interval set by emergency_restart_interval then FPM will restart. A value
-; of '0' means 'Off'.
-; Default Value: 0
-;emergency_restart_threshold = 0
-
-; Interval of time used by emergency_restart_interval to determine when
-; a graceful restart will be initiated. This can be useful to work around
-; accidental corruptions in an accelerator's shared memory.
-; Available Units: s(econds), m(inutes), h(ours), or d(ays)
-; Default Unit: seconds
-; Default Value: 0
-;emergency_restart_interval = 0
-
-; Time limit for child processes to wait for a reaction on signals from master.
-; Available units: s(econds), m(inutes), h(ours), or d(ays)
-; Default Unit: seconds
-; Default Value: 0
-;process_control_timeout = 0
-
-; The maximum number of processes FPM will fork. This has been design to control
-; the global number of processes when using dynamic PM within a lot of pools.
-; Use it with caution.
-; Note: A value of 0 indicates no limit
-; Default Value: 0
-; process.max = 128
-
-; Specify the nice(2) priority to apply to the master process (only if set)
-; The value can vary from -19 (highest priority) to 20 (lower priority)
-; Note: - It will only work if the FPM master process is launched as root
-; - The pool process will inherit the master process priority
-; unless it specified otherwise
-; Default Value: no set
-; process.priority = -19
-
-; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging.
-; Default Value: yes
-;daemonize = yes
-
-; Set open file descriptor rlimit for the master process.
-; Default Value: system defined value
-;rlimit_files = 1024
-
-; Set max core size rlimit for the master process.
-; Possible Values: 'unlimited' or an integer greater or equal to 0
-; Default Value: system defined value
-;rlimit_core = 0
-
-; Specify the event mechanism FPM will use. The following is available:
-; - select (any POSIX os)
-; - poll (any POSIX os)
-; - epoll (linux >= 2.5.44)
-; - kqueue (FreeBSD >= 4.1, OpenBSD >= 2.9, NetBSD >= 2.0)
-; - /dev/poll (Solaris >= 7)
-; - port (Solaris >= 10)
-; Default Value: not set (auto detection)
-;events.mechanism = epoll
-
-; When FPM is build with systemd integration, specify the interval,
-; in second, between health report notification to systemd.
-; Set to 0 to disable.
-; Available Units: s(econds), m(inutes), h(ours)
-; Default Unit: seconds
-; Default value: 10
-;systemd_interval = 10
-
+;;;;;;;;;;;;;;;;;;;;;
+; FPM Configuration ;
+;;;;;;;;;;;;;;;;;;;;;
+
+; All relative paths in this configuration file are relative to PHP's install
+; prefix (/usr). This prefix can be dynamically changed by using the
+; '-p' argument from the command line.
+
+; Include one or more files. If glob(3) exists, it is used to include a bunch of
+; files from a glob(3) pattern. This directive can be used everywhere in the
+; file.
+; Relative path can also be used. They will be prefixed by:
+; - the global prefix if it's been set (-p argument)
+; - /usr otherwise
+include=/etc/php/fpm.d/*.conf
+
+;;;;;;;;;;;;;;;;;;
+; Global Options ;
+;;;;;;;;;;;;;;;;;;
+
+[global]
+; Pid file
+; Note: the default prefix is /var
+; Default Value: none
+pid = /run/php-fpm/php-fpm.pid
+
+; Error log file
+; If it's set to "syslog", log is sent to syslogd instead of being written
+; in a local file.
+; Note: the default prefix is /var
+; Default Value: log/php-fpm.log
+;error_log = log/php-fpm.log
+
+; syslog_facility is used to specify what type of program is logging the
+; message. This lets syslogd specify that messages from different facilities
+; will be handled differently.
+; See syslog(3) for possible values (ex daemon equiv LOG_DAEMON)
+; Default Value: daemon
+;syslog.facility = daemon
+
+; syslog_ident is prepended to every message. If you have multiple FPM
+; instances running on the same server, you can change the default value
+; which must suit common needs.
+; Default Value: php-fpm
+;syslog.ident = php-fpm
+
+; Log level
+; Possible Values: alert, error, warning, notice, debug
+; Default Value: notice
+;log_level = notice
+
+; If this number of child processes exit with SIGSEGV or SIGBUS within the time
+; interval set by emergency_restart_interval then FPM will restart. A value
+; of '0' means 'Off'.
+; Default Value: 0
+;emergency_restart_threshold = 0
+
+; Interval of time used by emergency_restart_interval to determine when
+; a graceful restart will be initiated. This can be useful to work around
+; accidental corruptions in an accelerator's shared memory.
+; Available Units: s(econds), m(inutes), h(ours), or d(ays)
+; Default Unit: seconds
+; Default Value: 0
+;emergency_restart_interval = 0
+
+; Time limit for child processes to wait for a reaction on signals from master.
+; Available units: s(econds), m(inutes), h(ours), or d(ays)
+; Default Unit: seconds
+; Default Value: 0
+;process_control_timeout = 0
+
+; The maximum number of processes FPM will fork. This has been design to control
+; the global number of processes when using dynamic PM within a lot of pools.
+; Use it with caution.
+; Note: A value of 0 indicates no limit
+; Default Value: 0
+; process.max = 128
+
+; Specify the nice(2) priority to apply to the master process (only if set)
+; The value can vary from -19 (highest priority) to 20 (lower priority)
+; Note: - It will only work if the FPM master process is launched as root
+; - The pool process will inherit the master process priority
+; unless it specified otherwise
+; Default Value: no set
+; process.priority = -19
+
+; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging.
+; Default Value: yes
+;daemonize = yes
+
+; Set open file descriptor rlimit for the master process.
+; Default Value: system defined value
+;rlimit_files = 1024
+
+; Set max core size rlimit for the master process.
+; Possible Values: 'unlimited' or an integer greater or equal to 0
+; Default Value: system defined value
+;rlimit_core = 0
+
+; Specify the event mechanism FPM will use. The following is available:
+; - select (any POSIX os)
+; - poll (any POSIX os)
+; - epoll (linux >= 2.5.44)
+; - kqueue (FreeBSD >= 4.1, OpenBSD >= 2.9, NetBSD >= 2.0)
+; - /dev/poll (Solaris >= 7)
+; - port (Solaris >= 10)
+; Default Value: not set (auto detection)
+;events.mechanism = epoll
+
+; When FPM is build with systemd integration, specify the interval,
+; in second, between health report notification to systemd.
+; Set to 0 to disable.
+; Available Units: s(econds), m(inutes), h(ours)
+; Default Unit: seconds
+; Default value: 10
+;systemd_interval = 10
+
diff --git a/app/config/_os/etc/php/php-fpm.conf.default b/app/config/_os/etc/php/php-fpm.conf.default
index 223b6335..96a327b0 100644
--- a/app/config/_os/etc/php/php-fpm.conf.default
+++ b/app/config/_os/etc/php/php-fpm.conf.default
@@ -1,519 +1,519 @@
-;;;;;;;;;;;;;;;;;;;;;
-; FPM Configuration ;
-;;;;;;;;;;;;;;;;;;;;;
-
-; All relative paths in this configuration file are relative to PHP's install
-; prefix (/usr). This prefix can be dynamically changed by using the
-; '-p' argument from the command line.
-
-; Include one or more files. If glob(3) exists, it is used to include a bunch of
-; files from a glob(3) pattern. This directive can be used everywhere in the
-; file.
-; Relative path can also be used. They will be prefixed by:
-; - the global prefix if it's been set (-p argument)
-; - /usr otherwise
-;include=/etc/php/fpm.d/*.conf
-
-;;;;;;;;;;;;;;;;;;
-; Global Options ;
-;;;;;;;;;;;;;;;;;;
-
-[global]
-; Pid file
-; Note: the default prefix is /var
-; Default Value: none
-pid = /run/php-fpm/php-fpm.pid
-
-; Error log file
-; If it's set to "syslog", log is sent to syslogd instead of being written
-; in a local file.
-; Note: the default prefix is /var
-; Default Value: log/php-fpm.log
-;error_log = log/php-fpm.log
-
-; syslog_facility is used to specify what type of program is logging the
-; message. This lets syslogd specify that messages from different facilities
-; will be handled differently.
-; See syslog(3) for possible values (ex daemon equiv LOG_DAEMON)
-; Default Value: daemon
-;syslog.facility = daemon
-
-; syslog_ident is prepended to every message. If you have multiple FPM
-; instances running on the same server, you can change the default value
-; which must suit common needs.
-; Default Value: php-fpm
-;syslog.ident = php-fpm
-
-; Log level
-; Possible Values: alert, error, warning, notice, debug
-; Default Value: notice
-;log_level = notice
-
-; If this number of child processes exit with SIGSEGV or SIGBUS within the time
-; interval set by emergency_restart_interval then FPM will restart. A value
-; of '0' means 'Off'.
-; Default Value: 0
-;emergency_restart_threshold = 0
-
-; Interval of time used by emergency_restart_interval to determine when
-; a graceful restart will be initiated. This can be useful to work around
-; accidental corruptions in an accelerator's shared memory.
-; Available Units: s(econds), m(inutes), h(ours), or d(ays)
-; Default Unit: seconds
-; Default Value: 0
-;emergency_restart_interval = 0
-
-; Time limit for child processes to wait for a reaction on signals from master.
-; Available units: s(econds), m(inutes), h(ours), or d(ays)
-; Default Unit: seconds
-; Default Value: 0
-;process_control_timeout = 0
-
-; The maximum number of processes FPM will fork. This has been design to control
-; the global number of processes when using dynamic PM within a lot of pools.
-; Use it with caution.
-; Note: A value of 0 indicates no limit
-; Default Value: 0
-; process.max = 128
-
-; Specify the nice(2) priority to apply to the master process (only if set)
-; The value can vary from -19 (highest priority) to 20 (lower priority)
-; Note: - It will only work if the FPM master process is launched as root
-; - The pool process will inherit the master process priority
-; unless it specified otherwise
-; Default Value: no set
-; process.priority = -19
-
-; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging.
-; Default Value: yes
-;daemonize = yes
-
-; Set open file descriptor rlimit for the master process.
-; Default Value: system defined value
-;rlimit_files = 1024
-
-; Set max core size rlimit for the master process.
-; Possible Values: 'unlimited' or an integer greater or equal to 0
-; Default Value: system defined value
-;rlimit_core = 0
-
-; Specify the event mechanism FPM will use. The following is available:
-; - select (any POSIX os)
-; - poll (any POSIX os)
-; - epoll (linux >= 2.5.44)
-; - kqueue (FreeBSD >= 4.1, OpenBSD >= 2.9, NetBSD >= 2.0)
-; - /dev/poll (Solaris >= 7)
-; - port (Solaris >= 10)
-; Default Value: not set (auto detection)
-;events.mechanism = epoll
-
-; When FPM is build with systemd integration, specify the interval,
-; in second, between health report notification to systemd.
-; Set to 0 to disable.
-; Available Units: s(econds), m(inutes), h(ours)
-; Default Unit: seconds
-; Default value: 10
-;systemd_interval = 10
-
-;;;;;;;;;;;;;;;;;;;;
-; Pool Definitions ;
-;;;;;;;;;;;;;;;;;;;;
-
-; Multiple pools of child processes may be started with different listening
-; ports and different management options. The name of the pool will be
-; used in logs and stats. There is no limitation on the number of pools which
-; FPM can handle. Your system will tell you anyway :)
-
-; Start a new pool named 'www'.
-; the variable $pool can we used in any directive and will be replaced by the
-; pool name ('www' here)
-[www]
-
-; Per pool prefix
-; It only applies on the following directives:
-; - 'slowlog'
-; - 'listen' (unixsocket)
-; - 'chroot'
-; - 'chdir'
-; - 'php_values'
-; - 'php_admin_values'
-; When not set, the global prefix (or /usr) applies instead.
-; Note: This directive can also be relative to the global prefix.
-; Default Value: none
-;prefix = /path/to/pools/$pool
-
-; Unix user/group of processes
-; Note: The user is mandatory. If the group is not set, the default user's group
-; will be used.
-user = http
-group = http
-
-; The address on which to accept FastCGI requests.
-; Valid syntaxes are:
-; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on
-; a specific port;
-; 'port' - to listen on a TCP socket to all addresses on a
-; specific port;
-; '/path/to/unix/socket' - to listen on a unix socket.
-; Note: This value is mandatory.
-;listen = 127.0.0.1:9000
-listen = /run/php-fpm/php-fpm.sock
-
-; Set listen(2) backlog.
-; Default Value: 65535 (-1 on FreeBSD and OpenBSD)
-;listen.backlog = 65535
-
-; Set permissions for unix socket, if one is used. In Linux, read/write
-; permissions must be set in order to allow connections from a web server. Many
-; BSD-derived systems allow connections regardless of permissions.
-; Default Values: user and group are set as the running user
-; mode is set to 0666
-listen.owner = http
-listen.group = http
-listen.mode = 0660
-
-; List of ipv4 addresses of FastCGI clients which are allowed to connect.
-; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
-; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
-; must be separated by a comma. If this value is left blank, connections will be
-; accepted from any ip address.
-; Default Value: any
-;listen.allowed_clients = 127.0.0.1
-
-; Specify the nice(2) priority to apply to the pool processes (only if set)
-; The value can vary from -19 (highest priority) to 20 (lower priority)
-; Note: - It will only work if the FPM master process is launched as root
-; - The pool processes will inherit the master process priority
-; unless it specified otherwise
-; Default Value: no set
-; priority = -19
-
-; Choose how the process manager will control the number of child processes.
-; Possible Values:
-; static - a fixed number (pm.max_children) of child processes;
-; dynamic - the number of child processes are set dynamically based on the
-; following directives. With this process management, there will be
-; always at least 1 children.
-; pm.max_children - the maximum number of children that can
-; be alive at the same time.
-; pm.start_servers - the number of children created on startup.
-; pm.min_spare_servers - the minimum number of children in 'idle'
-; state (waiting to process). If the number
-; of 'idle' processes is less than this
-; number then some children will be created.
-; pm.max_spare_servers - the maximum number of children in 'idle'
-; state (waiting to process). If the number
-; of 'idle' processes is greater than this
-; number then some children will be killed.
-; ondemand - no children are created at startup. Children will be forked when
-; new requests will connect. The following parameter are used:
-; pm.max_children - the maximum number of children that
-; can be alive at the same time.
-; pm.process_idle_timeout - The number of seconds after which
-; an idle process will be killed.
-; Note: This value is mandatory.
-pm = dynamic
-
-; The number of child processes to be created when pm is set to 'static' and the
-; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
-; This value sets the limit on the number of simultaneous requests that will be
-; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
-; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
-; CGI. The below defaults are based on a server without much resources. Don't
-; forget to tweak pm.* to fit your needs.
-; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
-; Note: This value is mandatory.
-pm.max_children = 5
-
-; The number of child processes created on startup.
-; Note: Used only when pm is set to 'dynamic'
-; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
-pm.start_servers = 2
-
-; The desired minimum number of idle server processes.
-; Note: Used only when pm is set to 'dynamic'
-; Note: Mandatory when pm is set to 'dynamic'
-pm.min_spare_servers = 1
-
-; The desired maximum number of idle server processes.
-; Note: Used only when pm is set to 'dynamic'
-; Note: Mandatory when pm is set to 'dynamic'
-pm.max_spare_servers = 3
-
-; The number of seconds after which an idle process will be killed.
-; Note: Used only when pm is set to 'ondemand'
-; Default Value: 10s
-;pm.process_idle_timeout = 10s;
-
-; The number of requests each child process should execute before respawning.
-; This can be useful to work around memory leaks in 3rd party libraries. For
-; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
-; Default Value: 0
-;pm.max_requests = 500
-
-; The URI to view the FPM status page. If this value is not set, no URI will be
-; recognized as a status page. It shows the following informations:
-; pool - the name of the pool;
-; process manager - static, dynamic or ondemand;
-; start time - the date and time FPM has started;
-; start since - number of seconds since FPM has started;
-; accepted conn - the number of request accepted by the pool;
-; listen queue - the number of request in the queue of pending
-; connections (see backlog in listen(2));
-; max listen queue - the maximum number of requests in the queue
-; of pending connections since FPM has started;
-; listen queue len - the size of the socket queue of pending connections;
-; idle processes - the number of idle processes;
-; active processes - the number of active processes;
-; total processes - the number of idle + active processes;
-; max active processes - the maximum number of active processes since FPM
-; has started;
-; max children reached - number of times, the process limit has been reached,
-; when pm tries to start more children (works only for
-; pm 'dynamic' and 'ondemand');
-; Value are updated in real time.
-; Example output:
-; pool: www
-; process manager: static
-; start time: 01/Jul/2011:17:53:49 +0200
-; start since: 62636
-; accepted conn: 190460
-; listen queue: 0
-; max listen queue: 1
-; listen queue len: 42
-; idle processes: 4
-; active processes: 11
-; total processes: 15
-; max active processes: 12
-; max children reached: 0
-;
-; By default the status page output is formatted as text/plain. Passing either
-; 'html', 'xml' or 'json' in the query string will return the corresponding
-; output syntax. Example:
-; http://www.foo.bar/status
-; http://www.foo.bar/status?json
-; http://www.foo.bar/status?html
-; http://www.foo.bar/status?xml
-;
-; By default the status page only outputs short status. Passing 'full' in the
-; query string will also return status for each pool process.
-; Example:
-; http://www.foo.bar/status?full
-; http://www.foo.bar/status?json&full
-; http://www.foo.bar/status?html&full
-; http://www.foo.bar/status?xml&full
-; The Full status returns for each process:
-; pid - the PID of the process;
-; state - the state of the process (Idle, Running, ...);
-; start time - the date and time the process has started;
-; start since - the number of seconds since the process has started;
-; requests - the number of requests the process has served;
-; request duration - the duration in µs of the requests;
-; request method - the request method (GET, POST, ...);
-; request URI - the request URI with the query string;
-; content length - the content length of the request (only with POST);
-; user - the user (PHP_AUTH_USER) (or '-' if not set);
-; script - the main script called (or '-' if not set);
-; last request cpu - the %cpu the last request consumed
-; it's always 0 if the process is not in Idle state
-; because CPU calculation is done when the request
-; processing has terminated;
-; last request memory - the max amount of memory the last request consumed
-; it's always 0 if the process is not in Idle state
-; because memory calculation is done when the request
-; processing has terminated;
-; If the process is in Idle state, then informations are related to the
-; last request the process has served. Otherwise informations are related to
-; the current request being served.
-; Example output:
-; ************************
-; pid: 31330
-; state: Running
-; start time: 01/Jul/2011:17:53:49 +0200
-; start since: 63087
-; requests: 12808
-; request duration: 1250261
-; request method: GET
-; request URI: /test_mem.php?N=10000
-; content length: 0
-; user: -
-; script: /home/fat/web/docs/php/test_mem.php
-; last request cpu: 0.00
-; last request memory: 0
-;
-; Note: There is a real-time FPM status monitoring sample web page available
-; It's available in: ${prefix}/share/fpm/status.html
-;
-; Note: The value must start with a leading slash (/). The value can be
-; anything, but it may not be a good idea to use the .php extension or it
-; may conflict with a real PHP file.
-; Default Value: not set
-;pm.status_path = /status
-
-; The ping URI to call the monitoring page of FPM. If this value is not set, no
-; URI will be recognized as a ping page. This could be used to test from outside
-; that FPM is alive and responding, or to
-; - create a graph of FPM availability (rrd or such);
-; - remove a server from a group if it is not responding (load balancing);
-; - trigger alerts for the operating team (24/7).
-; Note: The value must start with a leading slash (/). The value can be
-; anything, but it may not be a good idea to use the .php extension or it
-; may conflict with a real PHP file.
-; Default Value: not set
-;ping.path = /ping
-
-; This directive may be used to customize the response of a ping request. The
-; response is formatted as text/plain with a 200 response code.
-; Default Value: pong
-;ping.response = pong
-
-; The access log file
-; Default: not set
-;access.log = log/$pool.access.log
-
-; The access log format.
-; The following syntax is allowed
-; %%: the '%' character
-; %C: %CPU used by the request
-; it can accept the following format:
-; - %{user}C for user CPU only
-; - %{system}C for system CPU only
-; - %{total}C for user + system CPU (default)
-; %d: time taken to serve the request
-; it can accept the following format:
-; - %{seconds}d (default)
-; - %{miliseconds}d
-; - %{mili}d
-; - %{microseconds}d
-; - %{micro}d
-; %e: an environment variable (same as $_ENV or $_SERVER)
-; it must be associated with embraces to specify the name of the env
-; variable. Some exemples:
-; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e
-; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e
-; %f: script filename
-; %l: content-length of the request (for POST request only)
-; %m: request method
-; %M: peak of memory allocated by PHP
-; it can accept the following format:
-; - %{bytes}M (default)
-; - %{kilobytes}M
-; - %{kilo}M
-; - %{megabytes}M
-; - %{mega}M
-; %n: pool name
-; %o: output header
-; it must be associated with embraces to specify the name of the header:
-; - %{Content-Type}o
-; - %{X-Powered-By}o
-; - %{Transfert-Encoding}o
-; - ....
-; %p: PID of the child that serviced the request
-; %P: PID of the parent of the child that serviced the request
-; %q: the query string
-; %Q: the '?' character if query string exists
-; %r: the request URI (without the query string, see %q and %Q)
-; %R: remote IP address
-; %s: status (response code)
-; %t: server time the request was received
-; it can accept a strftime(3) format:
-; %d/%b/%Y:%H:%M:%S %z (default)
-; %T: time the log has been written (the request has finished)
-; it can accept a strftime(3) format:
-; %d/%b/%Y:%H:%M:%S %z (default)
-; %u: remote user
-;
-; Default: "%R - %u %t \"%m %r\" %s"
-;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%"
-
-; The log file for slow requests
-; Default Value: not set
-; Note: slowlog is mandatory if request_slowlog_timeout is set
-;slowlog = log/$pool.log.slow
-
-; The timeout for serving a single request after which a PHP backtrace will be
-; dumped to the 'slowlog' file. A value of '0s' means 'off'.
-; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
-; Default Value: 0
-;request_slowlog_timeout = 0
-
-; The timeout for serving a single request after which the worker process will
-; be killed. This option should be used when the 'max_execution_time' ini option
-; does not stop script execution for some reason. A value of '0' means 'off'.
-; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
-; Default Value: 0
-;request_terminate_timeout = 0
-
-; Set open file descriptor rlimit.
-; Default Value: system defined value
-;rlimit_files = 1024
-
-; Set max core size rlimit.
-; Possible Values: 'unlimited' or an integer greater or equal to 0
-; Default Value: system defined value
-;rlimit_core = 0
-
-; Chroot to this directory at the start. This value must be defined as an
-; absolute path. When this value is not set, chroot is not used.
-; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
-; of its subdirectories. If the pool prefix is not set, the global prefix
-; will be used instead.
-; Note: chrooting is a great security feature and should be used whenever
-; possible. However, all PHP paths will be relative to the chroot
-; (error_log, sessions.save_path, ...).
-; Default Value: not set
-;chroot =
-
-; Chdir to this directory at the start.
-; Note: relative path can be used.
-; Default Value: current directory or / when chroot
-;chdir = /srv/http
-
-; Redirect worker stdout and stderr into main error log. If not set, stdout and
-; stderr will be redirected to /dev/null according to FastCGI specs.
-; Note: on highloaded environement, this can cause some delay in the page
-; process time (several ms).
-; Default Value: no
-;catch_workers_output = yes
-
-; Limits the extensions of the main script FPM will allow to parse. This can
-; prevent configuration mistakes on the web server side. You should only limit
-; FPM to .php extensions to prevent malicious users to use other extensions to
-; exectute php code.
-; Note: set an empty value to allow all extensions.
-; Default Value: .php
-;security.limit_extensions = .php .php3 .php4 .php5
-
-; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
-; the current environment.
-; Default Value: clean env
-;env[HOSTNAME] = $HOSTNAME
-;env[PATH] = /usr/local/bin:/usr/bin:/bin
-;env[TMP] = /tmp
-;env[TMPDIR] = /tmp
-;env[TEMP] = /tmp
-
-; Additional php.ini defines, specific to this pool of workers. These settings
-; overwrite the values previously defined in the php.ini. The directives are the
-; same as the PHP SAPI:
-; php_value/php_flag - you can set classic ini defines which can
-; be overwritten from PHP call 'ini_set'.
-; php_admin_value/php_admin_flag - these directives won't be overwritten by
-; PHP call 'ini_set'
-; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
-
-; Defining 'extension' will load the corresponding shared extension from
-; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
-; overwrite previously defined php.ini values, but will append the new value
-; instead.
-
-; Note: path INI options can be relative and will be expanded with the prefix
-; (pool, global or /usr)
-
-; Default Value: nothing is defined by default except the values in php.ini and
-; specified at startup with the -d argument
-;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
-;php_flag[display_errors] = off
-;php_admin_value[error_log] = /var/log/fpm-php.www.log
-;php_admin_flag[log_errors] = on
-;php_admin_value[memory_limit] = 32M
+;;;;;;;;;;;;;;;;;;;;;
+; FPM Configuration ;
+;;;;;;;;;;;;;;;;;;;;;
+
+; All relative paths in this configuration file are relative to PHP's install
+; prefix (/usr). This prefix can be dynamically changed by using the
+; '-p' argument from the command line.
+
+; Include one or more files. If glob(3) exists, it is used to include a bunch of
+; files from a glob(3) pattern. This directive can be used everywhere in the
+; file.
+; Relative path can also be used. They will be prefixed by:
+; - the global prefix if it's been set (-p argument)
+; - /usr otherwise
+;include=/etc/php/fpm.d/*.conf
+
+;;;;;;;;;;;;;;;;;;
+; Global Options ;
+;;;;;;;;;;;;;;;;;;
+
+[global]
+; Pid file
+; Note: the default prefix is /var
+; Default Value: none
+pid = /run/php-fpm/php-fpm.pid
+
+; Error log file
+; If it's set to "syslog", log is sent to syslogd instead of being written
+; in a local file.
+; Note: the default prefix is /var
+; Default Value: log/php-fpm.log
+;error_log = log/php-fpm.log
+
+; syslog_facility is used to specify what type of program is logging the
+; message. This lets syslogd specify that messages from different facilities
+; will be handled differently.
+; See syslog(3) for possible values (ex daemon equiv LOG_DAEMON)
+; Default Value: daemon
+;syslog.facility = daemon
+
+; syslog_ident is prepended to every message. If you have multiple FPM
+; instances running on the same server, you can change the default value
+; which must suit common needs.
+; Default Value: php-fpm
+;syslog.ident = php-fpm
+
+; Log level
+; Possible Values: alert, error, warning, notice, debug
+; Default Value: notice
+;log_level = notice
+
+; If this number of child processes exit with SIGSEGV or SIGBUS within the time
+; interval set by emergency_restart_interval then FPM will restart. A value
+; of '0' means 'Off'.
+; Default Value: 0
+;emergency_restart_threshold = 0
+
+; Interval of time used by emergency_restart_interval to determine when
+; a graceful restart will be initiated. This can be useful to work around
+; accidental corruptions in an accelerator's shared memory.
+; Available Units: s(econds), m(inutes), h(ours), or d(ays)
+; Default Unit: seconds
+; Default Value: 0
+;emergency_restart_interval = 0
+
+; Time limit for child processes to wait for a reaction on signals from master.
+; Available units: s(econds), m(inutes), h(ours), or d(ays)
+; Default Unit: seconds
+; Default Value: 0
+;process_control_timeout = 0
+
+; The maximum number of processes FPM will fork. This has been design to control
+; the global number of processes when using dynamic PM within a lot of pools.
+; Use it with caution.
+; Note: A value of 0 indicates no limit
+; Default Value: 0
+; process.max = 128
+
+; Specify the nice(2) priority to apply to the master process (only if set)
+; The value can vary from -19 (highest priority) to 20 (lower priority)
+; Note: - It will only work if the FPM master process is launched as root
+; - The pool process will inherit the master process priority
+; unless it specified otherwise
+; Default Value: no set
+; process.priority = -19
+
+; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging.
+; Default Value: yes
+;daemonize = yes
+
+; Set open file descriptor rlimit for the master process.
+; Default Value: system defined value
+;rlimit_files = 1024
+
+; Set max core size rlimit for the master process.
+; Possible Values: 'unlimited' or an integer greater or equal to 0
+; Default Value: system defined value
+;rlimit_core = 0
+
+; Specify the event mechanism FPM will use. The following is available:
+; - select (any POSIX os)
+; - poll (any POSIX os)
+; - epoll (linux >= 2.5.44)
+; - kqueue (FreeBSD >= 4.1, OpenBSD >= 2.9, NetBSD >= 2.0)
+; - /dev/poll (Solaris >= 7)
+; - port (Solaris >= 10)
+; Default Value: not set (auto detection)
+;events.mechanism = epoll
+
+; When FPM is build with systemd integration, specify the interval,
+; in second, between health report notification to systemd.
+; Set to 0 to disable.
+; Available Units: s(econds), m(inutes), h(ours)
+; Default Unit: seconds
+; Default value: 10
+;systemd_interval = 10
+
+;;;;;;;;;;;;;;;;;;;;
+; Pool Definitions ;
+;;;;;;;;;;;;;;;;;;;;
+
+; Multiple pools of child processes may be started with different listening
+; ports and different management options. The name of the pool will be
+; used in logs and stats. There is no limitation on the number of pools which
+; FPM can handle. Your system will tell you anyway :)
+
+; Start a new pool named 'www'.
+; the variable $pool can we used in any directive and will be replaced by the
+; pool name ('www' here)
+[www]
+
+; Per pool prefix
+; It only applies on the following directives:
+; - 'slowlog'
+; - 'listen' (unixsocket)
+; - 'chroot'
+; - 'chdir'
+; - 'php_values'
+; - 'php_admin_values'
+; When not set, the global prefix (or /usr) applies instead.
+; Note: This directive can also be relative to the global prefix.
+; Default Value: none
+;prefix = /path/to/pools/$pool
+
+; Unix user/group of processes
+; Note: The user is mandatory. If the group is not set, the default user's group
+; will be used.
+user = http
+group = http
+
+; The address on which to accept FastCGI requests.
+; Valid syntaxes are:
+; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on
+; a specific port;
+; 'port' - to listen on a TCP socket to all addresses on a
+; specific port;
+; '/path/to/unix/socket' - to listen on a unix socket.
+; Note: This value is mandatory.
+;listen = 127.0.0.1:9000
+listen = /run/php-fpm/php-fpm.sock
+
+; Set listen(2) backlog.
+; Default Value: 65535 (-1 on FreeBSD and OpenBSD)
+;listen.backlog = 65535
+
+; Set permissions for unix socket, if one is used. In Linux, read/write
+; permissions must be set in order to allow connections from a web server. Many
+; BSD-derived systems allow connections regardless of permissions.
+; Default Values: user and group are set as the running user
+; mode is set to 0666
+listen.owner = http
+listen.group = http
+listen.mode = 0660
+
+; List of ipv4 addresses of FastCGI clients which are allowed to connect.
+; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
+; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
+; must be separated by a comma. If this value is left blank, connections will be
+; accepted from any ip address.
+; Default Value: any
+;listen.allowed_clients = 127.0.0.1
+
+; Specify the nice(2) priority to apply to the pool processes (only if set)
+; The value can vary from -19 (highest priority) to 20 (lower priority)
+; Note: - It will only work if the FPM master process is launched as root
+; - The pool processes will inherit the master process priority
+; unless it specified otherwise
+; Default Value: no set
+; priority = -19
+
+; Choose how the process manager will control the number of child processes.
+; Possible Values:
+; static - a fixed number (pm.max_children) of child processes;
+; dynamic - the number of child processes are set dynamically based on the
+; following directives. With this process management, there will be
+; always at least 1 children.
+; pm.max_children - the maximum number of children that can
+; be alive at the same time.
+; pm.start_servers - the number of children created on startup.
+; pm.min_spare_servers - the minimum number of children in 'idle'
+; state (waiting to process). If the number
+; of 'idle' processes is less than this
+; number then some children will be created.
+; pm.max_spare_servers - the maximum number of children in 'idle'
+; state (waiting to process). If the number
+; of 'idle' processes is greater than this
+; number then some children will be killed.
+; ondemand - no children are created at startup. Children will be forked when
+; new requests will connect. The following parameter are used:
+; pm.max_children - the maximum number of children that
+; can be alive at the same time.
+; pm.process_idle_timeout - The number of seconds after which
+; an idle process will be killed.
+; Note: This value is mandatory.
+pm = dynamic
+
+; The number of child processes to be created when pm is set to 'static' and the
+; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
+; This value sets the limit on the number of simultaneous requests that will be
+; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
+; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
+; CGI. The below defaults are based on a server without much resources. Don't
+; forget to tweak pm.* to fit your needs.
+; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
+; Note: This value is mandatory.
+pm.max_children = 5
+
+; The number of child processes created on startup.
+; Note: Used only when pm is set to 'dynamic'
+; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
+pm.start_servers = 2
+
+; The desired minimum number of idle server processes.
+; Note: Used only when pm is set to 'dynamic'
+; Note: Mandatory when pm is set to 'dynamic'
+pm.min_spare_servers = 1
+
+; The desired maximum number of idle server processes.
+; Note: Used only when pm is set to 'dynamic'
+; Note: Mandatory when pm is set to 'dynamic'
+pm.max_spare_servers = 3
+
+; The number of seconds after which an idle process will be killed.
+; Note: Used only when pm is set to 'ondemand'
+; Default Value: 10s
+;pm.process_idle_timeout = 10s;
+
+; The number of requests each child process should execute before respawning.
+; This can be useful to work around memory leaks in 3rd party libraries. For
+; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
+; Default Value: 0
+;pm.max_requests = 500
+
+; The URI to view the FPM status page. If this value is not set, no URI will be
+; recognized as a status page. It shows the following informations:
+; pool - the name of the pool;
+; process manager - static, dynamic or ondemand;
+; start time - the date and time FPM has started;
+; start since - number of seconds since FPM has started;
+; accepted conn - the number of request accepted by the pool;
+; listen queue - the number of request in the queue of pending
+; connections (see backlog in listen(2));
+; max listen queue - the maximum number of requests in the queue
+; of pending connections since FPM has started;
+; listen queue len - the size of the socket queue of pending connections;
+; idle processes - the number of idle processes;
+; active processes - the number of active processes;
+; total processes - the number of idle + active processes;
+; max active processes - the maximum number of active processes since FPM
+; has started;
+; max children reached - number of times, the process limit has been reached,
+; when pm tries to start more children (works only for
+; pm 'dynamic' and 'ondemand');
+; Value are updated in real time.
+; Example output:
+; pool: www
+; process manager: static
+; start time: 01/Jul/2011:17:53:49 +0200
+; start since: 62636
+; accepted conn: 190460
+; listen queue: 0
+; max listen queue: 1
+; listen queue len: 42
+; idle processes: 4
+; active processes: 11
+; total processes: 15
+; max active processes: 12
+; max children reached: 0
+;
+; By default the status page output is formatted as text/plain. Passing either
+; 'html', 'xml' or 'json' in the query string will return the corresponding
+; output syntax. Example:
+; http://www.foo.bar/status
+; http://www.foo.bar/status?json
+; http://www.foo.bar/status?html
+; http://www.foo.bar/status?xml
+;
+; By default the status page only outputs short status. Passing 'full' in the
+; query string will also return status for each pool process.
+; Example:
+; http://www.foo.bar/status?full
+; http://www.foo.bar/status?json&full
+; http://www.foo.bar/status?html&full
+; http://www.foo.bar/status?xml&full
+; The Full status returns for each process:
+; pid - the PID of the process;
+; state - the state of the process (Idle, Running, ...);
+; start time - the date and time the process has started;
+; start since - the number of seconds since the process has started;
+; requests - the number of requests the process has served;
+; request duration - the duration in µs of the requests;
+; request method - the request method (GET, POST, ...);
+; request URI - the request URI with the query string;
+; content length - the content length of the request (only with POST);
+; user - the user (PHP_AUTH_USER) (or '-' if not set);
+; script - the main script called (or '-' if not set);
+; last request cpu - the %cpu the last request consumed
+; it's always 0 if the process is not in Idle state
+; because CPU calculation is done when the request
+; processing has terminated;
+; last request memory - the max amount of memory the last request consumed
+; it's always 0 if the process is not in Idle state
+; because memory calculation is done when the request
+; processing has terminated;
+; If the process is in Idle state, then informations are related to the
+; last request the process has served. Otherwise informations are related to
+; the current request being served.
+; Example output:
+; ************************
+; pid: 31330
+; state: Running
+; start time: 01/Jul/2011:17:53:49 +0200
+; start since: 63087
+; requests: 12808
+; request duration: 1250261
+; request method: GET
+; request URI: /test_mem.php?N=10000
+; content length: 0
+; user: -
+; script: /home/fat/web/docs/php/test_mem.php
+; last request cpu: 0.00
+; last request memory: 0
+;
+; Note: There is a real-time FPM status monitoring sample web page available
+; It's available in: ${prefix}/share/fpm/status.html
+;
+; Note: The value must start with a leading slash (/). The value can be
+; anything, but it may not be a good idea to use the .php extension or it
+; may conflict with a real PHP file.
+; Default Value: not set
+;pm.status_path = /status
+
+; The ping URI to call the monitoring page of FPM. If this value is not set, no
+; URI will be recognized as a ping page. This could be used to test from outside
+; that FPM is alive and responding, or to
+; - create a graph of FPM availability (rrd or such);
+; - remove a server from a group if it is not responding (load balancing);
+; - trigger alerts for the operating team (24/7).
+; Note: The value must start with a leading slash (/). The value can be
+; anything, but it may not be a good idea to use the .php extension or it
+; may conflict with a real PHP file.
+; Default Value: not set
+;ping.path = /ping
+
+; This directive may be used to customize the response of a ping request. The
+; response is formatted as text/plain with a 200 response code.
+; Default Value: pong
+;ping.response = pong
+
+; The access log file
+; Default: not set
+;access.log = log/$pool.access.log
+
+; The access log format.
+; The following syntax is allowed
+; %%: the '%' character
+; %C: %CPU used by the request
+; it can accept the following format:
+; - %{user}C for user CPU only
+; - %{system}C for system CPU only
+; - %{total}C for user + system CPU (default)
+; %d: time taken to serve the request
+; it can accept the following format:
+; - %{seconds}d (default)
+; - %{miliseconds}d
+; - %{mili}d
+; - %{microseconds}d
+; - %{micro}d
+; %e: an environment variable (same as $_ENV or $_SERVER)
+; it must be associated with embraces to specify the name of the env
+; variable. Some exemples:
+; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e
+; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e
+; %f: script filename
+; %l: content-length of the request (for POST request only)
+; %m: request method
+; %M: peak of memory allocated by PHP
+; it can accept the following format:
+; - %{bytes}M (default)
+; - %{kilobytes}M
+; - %{kilo}M
+; - %{megabytes}M
+; - %{mega}M
+; %n: pool name
+; %o: output header
+; it must be associated with embraces to specify the name of the header:
+; - %{Content-Type}o
+; - %{X-Powered-By}o
+; - %{Transfert-Encoding}o
+; - ....
+; %p: PID of the child that serviced the request
+; %P: PID of the parent of the child that serviced the request
+; %q: the query string
+; %Q: the '?' character if query string exists
+; %r: the request URI (without the query string, see %q and %Q)
+; %R: remote IP address
+; %s: status (response code)
+; %t: server time the request was received
+; it can accept a strftime(3) format:
+; %d/%b/%Y:%H:%M:%S %z (default)
+; %T: time the log has been written (the request has finished)
+; it can accept a strftime(3) format:
+; %d/%b/%Y:%H:%M:%S %z (default)
+; %u: remote user
+;
+; Default: "%R - %u %t \"%m %r\" %s"
+;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%"
+
+; The log file for slow requests
+; Default Value: not set
+; Note: slowlog is mandatory if request_slowlog_timeout is set
+;slowlog = log/$pool.log.slow
+
+; The timeout for serving a single request after which a PHP backtrace will be
+; dumped to the 'slowlog' file. A value of '0s' means 'off'.
+; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
+; Default Value: 0
+;request_slowlog_timeout = 0
+
+; The timeout for serving a single request after which the worker process will
+; be killed. This option should be used when the 'max_execution_time' ini option
+; does not stop script execution for some reason. A value of '0' means 'off'.
+; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
+; Default Value: 0
+;request_terminate_timeout = 0
+
+; Set open file descriptor rlimit.
+; Default Value: system defined value
+;rlimit_files = 1024
+
+; Set max core size rlimit.
+; Possible Values: 'unlimited' or an integer greater or equal to 0
+; Default Value: system defined value
+;rlimit_core = 0
+
+; Chroot to this directory at the start. This value must be defined as an
+; absolute path. When this value is not set, chroot is not used.
+; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
+; of its subdirectories. If the pool prefix is not set, the global prefix
+; will be used instead.
+; Note: chrooting is a great security feature and should be used whenever
+; possible. However, all PHP paths will be relative to the chroot
+; (error_log, sessions.save_path, ...).
+; Default Value: not set
+;chroot =
+
+; Chdir to this directory at the start.
+; Note: relative path can be used.
+; Default Value: current directory or / when chroot
+;chdir = /srv/http
+
+; Redirect worker stdout and stderr into main error log. If not set, stdout and
+; stderr will be redirected to /dev/null according to FastCGI specs.
+; Note: on highloaded environement, this can cause some delay in the page
+; process time (several ms).
+; Default Value: no
+;catch_workers_output = yes
+
+; Limits the extensions of the main script FPM will allow to parse. This can
+; prevent configuration mistakes on the web server side. You should only limit
+; FPM to .php extensions to prevent malicious users to use other extensions to
+; exectute php code.
+; Note: set an empty value to allow all extensions.
+; Default Value: .php
+;security.limit_extensions = .php .php3 .php4 .php5
+
+; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
+; the current environment.
+; Default Value: clean env
+;env[HOSTNAME] = $HOSTNAME
+;env[PATH] = /usr/local/bin:/usr/bin:/bin
+;env[TMP] = /tmp
+;env[TMPDIR] = /tmp
+;env[TEMP] = /tmp
+
+; Additional php.ini defines, specific to this pool of workers. These settings
+; overwrite the values previously defined in the php.ini. The directives are the
+; same as the PHP SAPI:
+; php_value/php_flag - you can set classic ini defines which can
+; be overwritten from PHP call 'ini_set'.
+; php_admin_value/php_admin_flag - these directives won't be overwritten by
+; PHP call 'ini_set'
+; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
+
+; Defining 'extension' will load the corresponding shared extension from
+; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
+; overwrite previously defined php.ini values, but will append the new value
+; instead.
+
+; Note: path INI options can be relative and will be expanded with the prefix
+; (pool, global or /usr)
+
+; Default Value: nothing is defined by default except the values in php.ini and
+; specified at startup with the -d argument
+;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
+;php_flag[display_errors] = off
+;php_admin_value[error_log] = /var/log/fpm-php.www.log
+;php_admin_flag[log_errors] = on
+;php_admin_value[memory_limit] = 32M
diff --git a/app/config/_os/etc/rc.local b/app/config/_os/etc/rc.local
index 04b4d122..f3995236 100644
--- a/app/config/_os/etc/rc.local
+++ b/app/config/_os/etc/rc.local
@@ -1,15 +1,15 @@
-#!/bin/sh -e
-#
-# rc.local
-#
-# This script is executed at the end of each multiuser runlevel.
-# Make sure that the script will "exit 0" on success or any other
-# value on error.
-#
-# In order to enable or disable this script just change the execution
-# bits.
-#
-# By default this script does nothing.
-
-exit 0
-
+#!/bin/sh -e
+#
+# rc.local
+#
+# This script is executed at the end of each multiuser runlevel.
+# Make sure that the script will "exit 0" on success or any other
+# value on error.
+#
+# In order to enable or disable this script just change the execution
+# bits.
+#
+# By default this script does nothing.
+
+exit 0
+
diff --git a/app/config/_os/etc/redis.conf b/app/config/_os/etc/redis.conf
index c53d197a..234430dd 100644
--- a/app/config/_os/etc/redis.conf
+++ b/app/config/_os/etc/redis.conf
@@ -1,731 +1,731 @@
-# Redis configuration file example
-
-# Note on units: when memory size is needed, it is possible to specify
-# it in the usual form of 1k 5GB 4M and so forth:
-#
-# 1k => 1000 bytes
-# 1kb => 1024 bytes
-# 1m => 1000000 bytes
-# 1mb => 1024*1024 bytes
-# 1g => 1000000000 bytes
-# 1gb => 1024*1024*1024 bytes
-#
-# units are case insensitive so 1GB 1Gb 1gB are all the same.
-
-################################## INCLUDES ###################################
-
-# Include one or more other config files here. This is useful if you
-# have a standard template that goes to all Redis server but also need
-# to customize a few per-server settings. Include files can include
-# other files, so use this wisely.
-#
-# Notice option "include" won't be rewritten by command "CONFIG REWRITE"
-# from admin or Redis Sentinel. Since Redis always uses the last processed
-# line as value of a configuration directive, you'd better put includes
-# at the beginning of this file to avoid overwriting config change at runtime.
-#
-# If instead you are interested in using includes to override configuration
-# options, it is better to use include as the last line.
-#
-# include /path/to/local.conf
-# include /path/to/other.conf
-
-################################ GENERAL #####################################
-
-# By default Redis does not run as a daemon. Use 'yes' if you need it.
-# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
-daemonize yes
-
-# When running daemonized, Redis writes a pid file in /var/run/redis.pid by
-# default. You can specify a custom pid file location here.
-pidfile /run/redis/redis.pid
-
-# Accept connections on the specified port, default is 6379.
-# If port 0 is specified Redis will not listen on a TCP socket.
-port 6379
-
-# TCP listen() backlog.
-#
-# In high requests-per-second environments you need an high backlog in order
-# to avoid slow clients connections issues. Note that the Linux kernel
-# will silently truncate it to the value of /proc/sys/net/core/somaxconn so
-# make sure to raise both the value of somaxconn and tcp_max_syn_backlog
-# in order to get the desired effect.
-tcp-backlog 511
-
-# By default Redis listens for connections from all the network interfaces
-# available on the server. It is possible to listen to just one or multiple
-# interfaces using the "bind" configuration directive, followed by one or
-# more IP addresses.
-#
-# Examples:
-#
-# bind 192.168.1.100 10.0.0.1
-bind 127.0.0.1
-
-# Specify the path for the Unix socket that will be used to listen for
-# incoming connections. There is no default, so Redis will not listen
-# on a unix socket when not specified.
-#
-unixsocket /tmp/redis.sock
-unixsocketperm 777
-
-# Close the connection after a client is idle for N seconds (0 to disable)
-timeout 0
-
-# TCP keepalive.
-#
-# If non-zero, use SO_KEEPALIVE to send TCP ACKs to clients in absence
-# of communication. This is useful for two reasons:
-#
-# 1) Detect dead peers.
-# 2) Take the connection alive from the point of view of network
-# equipment in the middle.
-#
-# On Linux, the specified value (in seconds) is the period used to send ACKs.
-# Note that to close the connection the double of the time is needed.
-# On other kernels the period depends on the kernel configuration.
-#
-# A reasonable value for this option is 60 seconds.
-tcp-keepalive 0
-
-# Specify the server verbosity level.
-# This can be one of:
-# debug (a lot of information, useful for development/testing)
-# verbose (many rarely useful info, but not a mess like the debug level)
-# notice (moderately verbose, what you want in production probably)
-# warning (only very important / critical messages are logged)
-loglevel notice
-
-# Specify the log file name. Also the empty string can be used to force
-# Redis to log on the standard output. Note that if you use standard
-# output for logging but daemonize, logs will be sent to /dev/null
-logfile ""
-
-# To enable logging to the system logger, just set 'syslog-enabled' to yes,
-# and optionally update the other syslog parameters to suit your needs.
-# syslog-enabled no
-
-# Specify the syslog identity.
-# syslog-ident redis
-
-# Specify the syslog facility. Must be USER or between LOCAL0-LOCAL7.
-# syslog-facility local0
-
-# Set the number of databases. The default database is DB 0, you can select
-# a different one on a per-connection basis using SELECT where
-# dbid is a number between 0 and 'databases'-1
-databases 16
-
-################################ SNAPSHOTTING ################################
-#
-# Save the DB on disk:
-#
-# save
-#
-# Will save the DB if both the given number of seconds and the given
-# number of write operations against the DB occurred.
-#
-# In the example below the behaviour will be to save:
-# after 900 sec (15 min) if at least 1 key changed
-# after 300 sec (5 min) if at least 10 keys changed
-# after 60 sec if at least 10000 keys changed
-#
-# Note: you can disable saving at all commenting all the "save" lines.
-#
-# It is also possible to remove all the previously configured save
-# points by adding a save directive with a single empty string argument
-# like in the following example:
-#
-# save ""
-
-save 900 1
-save 300 10
-save 60 10000
-
-# By default Redis will stop accepting writes if RDB snapshots are enabled
-# (at least one save point) and the latest background save failed.
-# This will make the user aware (in a hard way) that data is not persisting
-# on disk properly, otherwise chances are that no one will notice and some
-# disaster will happen.
-#
-# If the background saving process will start working again Redis will
-# automatically allow writes again.
-#
-# However if you have setup your proper monitoring of the Redis server
-# and persistence, you may want to disable this feature so that Redis will
-# continue to work as usual even if there are problems with disk,
-# permissions, and so forth.
-stop-writes-on-bgsave-error yes
-
-# Compress string objects using LZF when dump .rdb databases?
-# For default that's set to 'yes' as it's almost always a win.
-# If you want to save some CPU in the saving child set it to 'no' but
-# the dataset will likely be bigger if you have compressible values or keys.
-rdbcompression yes
-
-# Since version 5 of RDB a CRC64 checksum is placed at the end of the file.
-# This makes the format more resistant to corruption but there is a performance
-# hit to pay (around 10%) when saving and loading RDB files, so you can disable it
-# for maximum performances.
-#
-# RDB files created with checksum disabled have a checksum of zero that will
-# tell the loading code to skip the check.
-rdbchecksum yes
-
-# The filename where to dump the DB
-dbfilename dump.rdb
-
-# The working directory.
-#
-# The DB will be written inside this directory, with the filename specified
-# above using the 'dbfilename' configuration directive.
-#
-# The Append Only File will also be created inside this directory.
-#
-# Note that you must specify a directory here, not a file name.
-dir /var/lib/redis/
-
-################################# REPLICATION #################################
-
-# Master-Slave replication. Use slaveof to make a Redis instance a copy of
-# another Redis server. Note that the configuration is local to the slave
-# so for example it is possible to configure the slave to save the DB with a
-# different interval, or to listen to another port, and so on.
-#
-# slaveof
-
-# If the master is password protected (using the "requirepass" configuration
-# directive below) it is possible to tell the slave to authenticate before
-# starting the replication synchronization process, otherwise the master will
-# refuse the slave request.
-#
-# masterauth
-
-# When a slave loses its connection with the master, or when the replication
-# is still in progress, the slave can act in two different ways:
-#
-# 1) if slave-serve-stale-data is set to 'yes' (the default) the slave will
-# still reply to client requests, possibly with out of date data, or the
-# data set may just be empty if this is the first synchronization.
-#
-# 2) if slave-serve-stale-data is set to 'no' the slave will reply with
-# an error "SYNC with master in progress" to all the kind of commands
-# but to INFO and SLAVEOF.
-#
-slave-serve-stale-data yes
-
-# You can configure a slave instance to accept writes or not. Writing against
-# a slave instance may be useful to store some ephemeral data (because data
-# written on a slave will be easily deleted after resync with the master) but
-# may also cause problems if clients are writing to it because of a
-# misconfiguration.
-#
-# Since Redis 2.6 by default slaves are read-only.
-#
-# Note: read only slaves are not designed to be exposed to untrusted clients
-# on the internet. It's just a protection layer against misuse of the instance.
-# Still a read only slave exports by default all the administrative commands
-# such as CONFIG, DEBUG, and so forth. To a limited extent you can improve
-# security of read only slaves using 'rename-command' to shadow all the
-# administrative / dangerous commands.
-slave-read-only yes
-
-# Slaves send PINGs to server in a predefined interval. It's possible to change
-# this interval with the repl_ping_slave_period option. The default value is 10
-# seconds.
-#
-# repl-ping-slave-period 10
-
-# The following option sets the replication timeout for:
-#
-# 1) Bulk transfer I/O during SYNC, from the point of view of slave.
-# 2) Master timeout from the point of view of slaves (data, pings).
-# 3) Slave timeout from the point of view of masters (REPLCONF ACK pings).
-#
-# It is important to make sure that this value is greater than the value
-# specified for repl-ping-slave-period otherwise a timeout will be detected
-# every time there is low traffic between the master and the slave.
-#
-# repl-timeout 60
-
-# Disable TCP_NODELAY on the slave socket after SYNC?
-#
-# If you select "yes" Redis will use a smaller number of TCP packets and
-# less bandwidth to send data to slaves. But this can add a delay for
-# the data to appear on the slave side, up to 40 milliseconds with
-# Linux kernels using a default configuration.
-#
-# If you select "no" the delay for data to appear on the slave side will
-# be reduced but more bandwidth will be used for replication.
-#
-# By default we optimize for low latency, but in very high traffic conditions
-# or when the master and slaves are many hops away, turning this to "yes" may
-# be a good idea.
-repl-disable-tcp-nodelay no
-
-# Set the replication backlog size. The backlog is a buffer that accumulates
-# slave data when slaves are disconnected for some time, so that when a slave
-# wants to reconnect again, often a full resync is not needed, but a partial
-# resync is enough, just passing the portion of data the slave missed while
-# disconnected.
-#
-# The biggest the replication backlog, the longer the time the slave can be
-# disconnected and later be able to perform a partial resynchronization.
-#
-# The backlog is only allocated once there is at least a slave connected.
-#
-# repl-backlog-size 1mb
-
-# After a master has no longer connected slaves for some time, the backlog
-# will be freed. The following option configures the amount of seconds that
-# need to elapse, starting from the time the last slave disconnected, for
-# the backlog buffer to be freed.
-#
-# A value of 0 means to never release the backlog.
-#
-# repl-backlog-ttl 3600
-
-# The slave priority is an integer number published by Redis in the INFO output.
-# It is used by Redis Sentinel in order to select a slave to promote into a
-# master if the master is no longer working correctly.
-#
-# A slave with a low priority number is considered better for promotion, so
-# for instance if there are three slaves with priority 10, 100, 25 Sentinel will
-# pick the one with priority 10, that is the lowest.
-#
-# However a special priority of 0 marks the slave as not able to perform the
-# role of master, so a slave with priority of 0 will never be selected by
-# Redis Sentinel for promotion.
-#
-# By default the priority is 100.
-slave-priority 100
-
-# It is possible for a master to stop accepting writes if there are less than
-# N slaves connected, having a lag less or equal than M seconds.
-#
-# The N slaves need to be in "online" state.
-#
-# The lag in seconds, that must be <= the specified value, is calculated from
-# the last ping received from the slave, that is usually sent every second.
-#
-# This option does not GUARANTEES that N replicas will accept the write, but
-# will limit the window of exposure for lost writes in case not enough slaves
-# are available, to the specified number of seconds.
-#
-# For example to require at least 3 slaves with a lag <= 10 seconds use:
-#
-# min-slaves-to-write 3
-# min-slaves-max-lag 10
-#
-# Setting one or the other to 0 disables the feature.
-#
-# By default min-slaves-to-write is set to 0 (feature disabled) and
-# min-slaves-max-lag is set to 10.
-
-################################## SECURITY ###################################
-
-# Require clients to issue AUTH before processing any other
-# commands. This might be useful in environments in which you do not trust
-# others with access to the host running redis-server.
-#
-# This should stay commented out for backward compatibility and because most
-# people do not need auth (e.g. they run their own servers).
-#
-# Warning: since Redis is pretty fast an outside user can try up to
-# 150k passwords per second against a good box. This means that you should
-# use a very strong password otherwise it will be very easy to break.
-#
-# requirepass foobared
-
-# Command renaming.
-#
-# It is possible to change the name of dangerous commands in a shared
-# environment. For instance the CONFIG command may be renamed into something
-# hard to guess so that it will still be available for internal-use tools
-# but not available for general clients.
-#
-# Example:
-#
-# rename-command CONFIG b840fc02d524045429941cc15f59e41cb7be6c52
-#
-# It is also possible to completely kill a command by renaming it into
-# an empty string:
-#
-# rename-command CONFIG ""
-#
-# Please note that changing the name of commands that are logged into the
-# AOF file or transmitted to slaves may cause problems.
-
-################################### LIMITS ####################################
-
-# Set the max number of connected clients at the same time. By default
-# this limit is set to 10000 clients, however if the Redis server is not
-# able to configure the process file limit to allow for the specified limit
-# the max number of allowed clients is set to the current file limit
-# minus 32 (as Redis reserves a few file descriptors for internal uses).
-#
-# Once the limit is reached Redis will close all the new connections sending
-# an error 'max number of clients reached'.
-#
-# maxclients 10000
-
-# Don't use more memory than the specified amount of bytes.
-# When the memory limit is reached Redis will try to remove keys
-# according to the eviction policy selected (see maxmemory-policy).
-#
-# If Redis can't remove keys according to the policy, or if the policy is
-# set to 'noeviction', Redis will start to reply with errors to commands
-# that would use more memory, like SET, LPUSH, and so on, and will continue
-# to reply to read-only commands like GET.
-#
-# This option is usually useful when using Redis as an LRU cache, or to set
-# a hard memory limit for an instance (using the 'noeviction' policy).
-#
-# WARNING: If you have slaves attached to an instance with maxmemory on,
-# the size of the output buffers needed to feed the slaves are subtracted
-# from the used memory count, so that network problems / resyncs will
-# not trigger a loop where keys are evicted, and in turn the output
-# buffer of slaves is full with DELs of keys evicted triggering the deletion
-# of more keys, and so forth until the database is completely emptied.
-#
-# In short... if you have slaves attached it is suggested that you set a lower
-# limit for maxmemory so that there is some free RAM on the system for slave
-# output buffers (but this is not needed if the policy is 'noeviction').
-#
-# maxmemory
-
-# MAXMEMORY POLICY: how Redis will select what to remove when maxmemory
-# is reached. You can select among five behaviors:
-#
-# volatile-lru -> remove the key with an expire set using an LRU algorithm
-# allkeys-lru -> remove any key accordingly to the LRU algorithm
-# volatile-random -> remove a random key with an expire set
-# allkeys-random -> remove a random key, any key
-# volatile-ttl -> remove the key with the nearest expire time (minor TTL)
-# noeviction -> don't expire at all, just return an error on write operations
-#
-# Note: with any of the above policies, Redis will return an error on write
-# operations, when there are not suitable keys for eviction.
-#
-# At the date of writing this commands are: set setnx setex append
-# incr decr rpush lpush rpushx lpushx linsert lset rpoplpush sadd
-# sinter sinterstore sunion sunionstore sdiff sdiffstore zadd zincrby
-# zunionstore zinterstore hset hsetnx hmset hincrby incrby decrby
-# getset mset msetnx exec sort
-#
-# The default is:
-#
-# maxmemory-policy volatile-lru
-
-# LRU and minimal TTL algorithms are not precise algorithms but approximated
-# algorithms (in order to save memory), so you can select as well the sample
-# size to check. For instance for default Redis will check three keys and
-# pick the one that was used less recently, you can change the sample size
-# using the following configuration directive.
-#
-# maxmemory-samples 3
-
-############################## APPEND ONLY MODE ###############################
-
-# By default Redis asynchronously dumps the dataset on disk. This mode is
-# good enough in many applications, but an issue with the Redis process or
-# a power outage may result into a few minutes of writes lost (depending on
-# the configured save points).
-#
-# The Append Only File is an alternative persistence mode that provides
-# much better durability. For instance using the default data fsync policy
-# (see later in the config file) Redis can lose just one second of writes in a
-# dramatic event like a server power outage, or a single write if something
-# wrong with the Redis process itself happens, but the operating system is
-# still running correctly.
-#
-# AOF and RDB persistence can be enabled at the same time without problems.
-# If the AOF is enabled on startup Redis will load the AOF, that is the file
-# with the better durability guarantees.
-#
-# Please check http://redis.io/topics/persistence for more information.
-
-appendonly no
-
-# The name of the append only file (default: "appendonly.aof")
-
-appendfilename "appendonly.aof"
-
-# The fsync() call tells the Operating System to actually write data on disk
-# instead to wait for more data in the output buffer. Some OS will really flush
-# data on disk, some other OS will just try to do it ASAP.
-#
-# Redis supports three different modes:
-#
-# no: don't fsync, just let the OS flush the data when it wants. Faster.
-# always: fsync after every write to the append only log . Slow, Safest.
-# everysec: fsync only one time every second. Compromise.
-#
-# The default is "everysec", as that's usually the right compromise between
-# speed and data safety. It's up to you to understand if you can relax this to
-# "no" that will let the operating system flush the output buffer when
-# it wants, for better performances (but if you can live with the idea of
-# some data loss consider the default persistence mode that's snapshotting),
-# or on the contrary, use "always" that's very slow but a bit safer than
-# everysec.
-#
-# More details please check the following article:
-# http://antirez.com/post/redis-persistence-demystified.html
-#
-# If unsure, use "everysec".
-
-# appendfsync always
-appendfsync everysec
-# appendfsync no
-
-# When the AOF fsync policy is set to always or everysec, and a background
-# saving process (a background save or AOF log background rewriting) is
-# performing a lot of I/O against the disk, in some Linux configurations
-# Redis may block too long on the fsync() call. Note that there is no fix for
-# this currently, as even performing fsync in a different thread will block
-# our synchronous write(2) call.
-#
-# In order to mitigate this problem it's possible to use the following option
-# that will prevent fsync() from being called in the main process while a
-# BGSAVE or BGREWRITEAOF is in progress.
-#
-# This means that while another child is saving, the durability of Redis is
-# the same as "appendfsync none". In practical terms, this means that it is
-# possible to lose up to 30 seconds of log in the worst scenario (with the
-# default Linux settings).
-#
-# If you have latency problems turn this to "yes". Otherwise leave it as
-# "no" that is the safest pick from the point of view of durability.
-
-no-appendfsync-on-rewrite no
-
-# Automatic rewrite of the append only file.
-# Redis is able to automatically rewrite the log file implicitly calling
-# BGREWRITEAOF when the AOF log size grows by the specified percentage.
-#
-# This is how it works: Redis remembers the size of the AOF file after the
-# latest rewrite (if no rewrite has happened since the restart, the size of
-# the AOF at startup is used).
-#
-# This base size is compared to the current size. If the current size is
-# bigger than the specified percentage, the rewrite is triggered. Also
-# you need to specify a minimal size for the AOF file to be rewritten, this
-# is useful to avoid rewriting the AOF file even if the percentage increase
-# is reached but it is still pretty small.
-#
-# Specify a percentage of zero in order to disable the automatic AOF
-# rewrite feature.
-
-auto-aof-rewrite-percentage 100
-auto-aof-rewrite-min-size 64mb
-
-################################ LUA SCRIPTING ###############################
-
-# Max execution time of a Lua script in milliseconds.
-#
-# If the maximum execution time is reached Redis will log that a script is
-# still in execution after the maximum allowed time and will start to
-# reply to queries with an error.
-#
-# When a long running script exceed the maximum execution time only the
-# SCRIPT KILL and SHUTDOWN NOSAVE commands are available. The first can be
-# used to stop a script that did not yet called write commands. The second
-# is the only way to shut down the server in the case a write commands was
-# already issue by the script but the user don't want to wait for the natural
-# termination of the script.
-#
-# Set it to 0 or a negative value for unlimited execution without warnings.
-lua-time-limit 5000
-
-################################## SLOW LOG ###################################
-
-# The Redis Slow Log is a system to log queries that exceeded a specified
-# execution time. The execution time does not include the I/O operations
-# like talking with the client, sending the reply and so forth,
-# but just the time needed to actually execute the command (this is the only
-# stage of command execution where the thread is blocked and can not serve
-# other requests in the meantime).
-#
-# You can configure the slow log with two parameters: one tells Redis
-# what is the execution time, in microseconds, to exceed in order for the
-# command to get logged, and the other parameter is the length of the
-# slow log. When a new command is logged the oldest one is removed from the
-# queue of logged commands.
-
-# The following time is expressed in microseconds, so 1000000 is equivalent
-# to one second. Note that a negative number disables the slow log, while
-# a value of zero forces the logging of every command.
-slowlog-log-slower-than 10000
-
-# There is no limit to this length. Just be aware that it will consume memory.
-# You can reclaim memory used by the slow log with SLOWLOG RESET.
-slowlog-max-len 128
-
-############################# Event notification ##############################
-
-# Redis can notify Pub/Sub clients about events happening in the key space.
-# This feature is documented at http://redis.io/topics/keyspace-events
-#
-# For instance if keyspace events notification is enabled, and a client
-# performs a DEL operation on key "foo" stored in the Database 0, two
-# messages will be published via Pub/Sub:
-#
-# PUBLISH __keyspace@0__:foo del
-# PUBLISH __keyevent@0__:del foo
-#
-# It is possible to select the events that Redis will notify among a set
-# of classes. Every class is identified by a single character:
-#
-# K Keyspace events, published with __keyspace@__ prefix.
-# E Keyevent events, published with __keyevent@__ prefix.
-# g Generic commands (non-type specific) like DEL, EXPIRE, RENAME, ...
-# $ String commands
-# l List commands
-# s Set commands
-# h Hash commands
-# z Sorted set commands
-# x Expired events (events generated every time a key expires)
-# e Evicted events (events generated when a key is evicted for maxmemory)
-# A Alias for g$lshzxe, so that the "AKE" string means all the events.
-#
-# The "notify-keyspace-events" takes as argument a string that is composed
-# by zero or multiple characters. The empty string means that notifications
-# are disabled at all.
-#
-# Example: to enable list and generic events, from the point of view of the
-# event name, use:
-#
-# notify-keyspace-events Elg
-#
-# Example 2: to get the stream of the expired keys subscribing to channel
-# name __keyevent@0__:expired use:
-#
-# notify-keyspace-events Ex
-#
-# By default all notifications are disabled because most users don't need
-# this feature and the feature has some overhead. Note that if you don't
-# specify at least one of K or E, no events will be delivered.
-notify-keyspace-events ""
-
-############################### ADVANCED CONFIG ###############################
-
-# Hashes are encoded using a memory efficient data structure when they have a
-# small number of entries, and the biggest entry does not exceed a given
-# threshold. These thresholds can be configured using the following directives.
-hash-max-ziplist-entries 512
-hash-max-ziplist-value 64
-
-# Similarly to hashes, small lists are also encoded in a special way in order
-# to save a lot of space. The special representation is only used when
-# you are under the following limits:
-list-max-ziplist-entries 512
-list-max-ziplist-value 64
-
-# Sets have a special encoding in just one case: when a set is composed
-# of just strings that happens to be integers in radix 10 in the range
-# of 64 bit signed integers.
-# The following configuration setting sets the limit in the size of the
-# set in order to use this special memory saving encoding.
-set-max-intset-entries 512
-
-# Similarly to hashes and lists, sorted sets are also specially encoded in
-# order to save a lot of space. This encoding is only used when the length and
-# elements of a sorted set are below the following limits:
-zset-max-ziplist-entries 128
-zset-max-ziplist-value 64
-
-# HyperLogLog sparse representation bytes limit. The limit includes the
-# 16 bytes header. When an HyperLogLog using the sparse representation crosses
-# this limit, it is converted into the dense representation.
-#
-# A value greater than 16000 is totally useless, since at that point the
-# dense representation is more memory efficient.
-#
-# The suggested value is ~ 3000 in order to have the benefits of
-# the space efficient encoding without slowing down too much PFADD,
-# which is O(N) with the sparse encoding. The value can be raised to
-# ~ 10000 when CPU is not a concern, but space is, and the data set is
-# composed of many HyperLogLogs with cardinality in the 0 - 15000 range.
-hll-sparse-max-bytes 3000
-
-# Active rehashing uses 1 millisecond every 100 milliseconds of CPU time in
-# order to help rehashing the main Redis hash table (the one mapping top-level
-# keys to values). The hash table implementation Redis uses (see dict.c)
-# performs a lazy rehashing: the more operation you run into a hash table
-# that is rehashing, the more rehashing "steps" are performed, so if the
-# server is idle the rehashing is never complete and some more memory is used
-# by the hash table.
-#
-# The default is to use this millisecond 10 times every second in order to
-# active rehashing the main dictionaries, freeing memory when possible.
-#
-# If unsure:
-# use "activerehashing no" if you have hard latency requirements and it is
-# not a good thing in your environment that Redis can reply form time to time
-# to queries with 2 milliseconds delay.
-#
-# use "activerehashing yes" if you don't have such hard requirements but
-# want to free memory asap when possible.
-activerehashing yes
-
-# The client output buffer limits can be used to force disconnection of clients
-# that are not reading data from the server fast enough for some reason (a
-# common reason is that a Pub/Sub client can't consume messages as fast as the
-# publisher can produce them).
-#
-# The limit can be set differently for the three different classes of clients:
-#
-# normal -> normal clients including MONITOR clients
-# slave -> slave clients
-# pubsub -> clients subscribed to at least one pubsub channel or pattern
-#
-# The syntax of every client-output-buffer-limit directive is the following:
-#
-# client-output-buffer-limit
-#
-# A client is immediately disconnected once the hard limit is reached, or if
-# the soft limit is reached and remains reached for the specified number of
-# seconds (continuously).
-# So for instance if the hard limit is 32 megabytes and the soft limit is
-# 16 megabytes / 10 seconds, the client will get disconnected immediately
-# if the size of the output buffers reach 32 megabytes, but will also get
-# disconnected if the client reaches 16 megabytes and continuously overcomes
-# the limit for 10 seconds.
-#
-# By default normal clients are not limited because they don't receive data
-# without asking (in a push way), but just after a request, so only
-# asynchronous clients may create a scenario where data is requested faster
-# than it can read.
-#
-# Instead there is a default limit for pubsub and slave clients, since
-# subscribers and slaves receive data in a push fashion.
-#
-# Both the hard or the soft limit can be disabled by setting them to zero.
-client-output-buffer-limit normal 0 0 0
-client-output-buffer-limit slave 256mb 64mb 60
-client-output-buffer-limit pubsub 32mb 8mb 60
-
-# Redis calls an internal function to perform many background tasks, like
-# closing connections of clients in timeout, purging expired keys that are
-# never requested, and so forth.
-#
-# Not all tasks are performed with the same frequency, but Redis checks for
-# tasks to perform accordingly to the specified "hz" value.
-#
-# By default "hz" is set to 10. Raising the value will use more CPU when
-# Redis is idle, but at the same time will make Redis more responsive when
-# there are many keys expiring at the same time, and timeouts may be
-# handled with more precision.
-#
-# The range is between 1 and 500, however a value over 100 is usually not
-# a good idea. Most users should use the default of 10 and raise this up to
-# 100 only in environments where very low latency is required.
-hz 10
-
-# When a child rewrites the AOF file, if the following option is enabled
-# the file will be fsync-ed every 32 MB of data generated. This is useful
-# in order to commit the file to the disk more incrementally and avoid
-# big latency spikes.
-aof-rewrite-incremental-fsync yes
-
+# Redis configuration file example
+
+# Note on units: when memory size is needed, it is possible to specify
+# it in the usual form of 1k 5GB 4M and so forth:
+#
+# 1k => 1000 bytes
+# 1kb => 1024 bytes
+# 1m => 1000000 bytes
+# 1mb => 1024*1024 bytes
+# 1g => 1000000000 bytes
+# 1gb => 1024*1024*1024 bytes
+#
+# units are case insensitive so 1GB 1Gb 1gB are all the same.
+
+################################## INCLUDES ###################################
+
+# Include one or more other config files here. This is useful if you
+# have a standard template that goes to all Redis server but also need
+# to customize a few per-server settings. Include files can include
+# other files, so use this wisely.
+#
+# Notice option "include" won't be rewritten by command "CONFIG REWRITE"
+# from admin or Redis Sentinel. Since Redis always uses the last processed
+# line as value of a configuration directive, you'd better put includes
+# at the beginning of this file to avoid overwriting config change at runtime.
+#
+# If instead you are interested in using includes to override configuration
+# options, it is better to use include as the last line.
+#
+# include /path/to/local.conf
+# include /path/to/other.conf
+
+################################ GENERAL #####################################
+
+# By default Redis does not run as a daemon. Use 'yes' if you need it.
+# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
+daemonize yes
+
+# When running daemonized, Redis writes a pid file in /var/run/redis.pid by
+# default. You can specify a custom pid file location here.
+pidfile /run/redis/redis.pid
+
+# Accept connections on the specified port, default is 6379.
+# If port 0 is specified Redis will not listen on a TCP socket.
+port 6379
+
+# TCP listen() backlog.
+#
+# In high requests-per-second environments you need an high backlog in order
+# to avoid slow clients connections issues. Note that the Linux kernel
+# will silently truncate it to the value of /proc/sys/net/core/somaxconn so
+# make sure to raise both the value of somaxconn and tcp_max_syn_backlog
+# in order to get the desired effect.
+tcp-backlog 511
+
+# By default Redis listens for connections from all the network interfaces
+# available on the server. It is possible to listen to just one or multiple
+# interfaces using the "bind" configuration directive, followed by one or
+# more IP addresses.
+#
+# Examples:
+#
+# bind 192.168.1.100 10.0.0.1
+bind 127.0.0.1
+
+# Specify the path for the Unix socket that will be used to listen for
+# incoming connections. There is no default, so Redis will not listen
+# on a unix socket when not specified.
+#
+unixsocket /tmp/redis.sock
+unixsocketperm 777
+
+# Close the connection after a client is idle for N seconds (0 to disable)
+timeout 0
+
+# TCP keepalive.
+#
+# If non-zero, use SO_KEEPALIVE to send TCP ACKs to clients in absence
+# of communication. This is useful for two reasons:
+#
+# 1) Detect dead peers.
+# 2) Take the connection alive from the point of view of network
+# equipment in the middle.
+#
+# On Linux, the specified value (in seconds) is the period used to send ACKs.
+# Note that to close the connection the double of the time is needed.
+# On other kernels the period depends on the kernel configuration.
+#
+# A reasonable value for this option is 60 seconds.
+tcp-keepalive 0
+
+# Specify the server verbosity level.
+# This can be one of:
+# debug (a lot of information, useful for development/testing)
+# verbose (many rarely useful info, but not a mess like the debug level)
+# notice (moderately verbose, what you want in production probably)
+# warning (only very important / critical messages are logged)
+loglevel notice
+
+# Specify the log file name. Also the empty string can be used to force
+# Redis to log on the standard output. Note that if you use standard
+# output for logging but daemonize, logs will be sent to /dev/null
+logfile ""
+
+# To enable logging to the system logger, just set 'syslog-enabled' to yes,
+# and optionally update the other syslog parameters to suit your needs.
+# syslog-enabled no
+
+# Specify the syslog identity.
+# syslog-ident redis
+
+# Specify the syslog facility. Must be USER or between LOCAL0-LOCAL7.
+# syslog-facility local0
+
+# Set the number of databases. The default database is DB 0, you can select
+# a different one on a per-connection basis using SELECT where
+# dbid is a number between 0 and 'databases'-1
+databases 16
+
+################################ SNAPSHOTTING ################################
+#
+# Save the DB on disk:
+#
+# save
+#
+# Will save the DB if both the given number of seconds and the given
+# number of write operations against the DB occurred.
+#
+# In the example below the behaviour will be to save:
+# after 900 sec (15 min) if at least 1 key changed
+# after 300 sec (5 min) if at least 10 keys changed
+# after 60 sec if at least 10000 keys changed
+#
+# Note: you can disable saving at all commenting all the "save" lines.
+#
+# It is also possible to remove all the previously configured save
+# points by adding a save directive with a single empty string argument
+# like in the following example:
+#
+# save ""
+
+save 900 1
+save 300 10
+save 60 10000
+
+# By default Redis will stop accepting writes if RDB snapshots are enabled
+# (at least one save point) and the latest background save failed.
+# This will make the user aware (in a hard way) that data is not persisting
+# on disk properly, otherwise chances are that no one will notice and some
+# disaster will happen.
+#
+# If the background saving process will start working again Redis will
+# automatically allow writes again.
+#
+# However if you have setup your proper monitoring of the Redis server
+# and persistence, you may want to disable this feature so that Redis will
+# continue to work as usual even if there are problems with disk,
+# permissions, and so forth.
+stop-writes-on-bgsave-error yes
+
+# Compress string objects using LZF when dump .rdb databases?
+# For default that's set to 'yes' as it's almost always a win.
+# If you want to save some CPU in the saving child set it to 'no' but
+# the dataset will likely be bigger if you have compressible values or keys.
+rdbcompression yes
+
+# Since version 5 of RDB a CRC64 checksum is placed at the end of the file.
+# This makes the format more resistant to corruption but there is a performance
+# hit to pay (around 10%) when saving and loading RDB files, so you can disable it
+# for maximum performances.
+#
+# RDB files created with checksum disabled have a checksum of zero that will
+# tell the loading code to skip the check.
+rdbchecksum yes
+
+# The filename where to dump the DB
+dbfilename dump.rdb
+
+# The working directory.
+#
+# The DB will be written inside this directory, with the filename specified
+# above using the 'dbfilename' configuration directive.
+#
+# The Append Only File will also be created inside this directory.
+#
+# Note that you must specify a directory here, not a file name.
+dir /var/lib/redis/
+
+################################# REPLICATION #################################
+
+# Master-Slave replication. Use slaveof to make a Redis instance a copy of
+# another Redis server. Note that the configuration is local to the slave
+# so for example it is possible to configure the slave to save the DB with a
+# different interval, or to listen to another port, and so on.
+#
+# slaveof
+
+# If the master is password protected (using the "requirepass" configuration
+# directive below) it is possible to tell the slave to authenticate before
+# starting the replication synchronization process, otherwise the master will
+# refuse the slave request.
+#
+# masterauth
+
+# When a slave loses its connection with the master, or when the replication
+# is still in progress, the slave can act in two different ways:
+#
+# 1) if slave-serve-stale-data is set to 'yes' (the default) the slave will
+# still reply to client requests, possibly with out of date data, or the
+# data set may just be empty if this is the first synchronization.
+#
+# 2) if slave-serve-stale-data is set to 'no' the slave will reply with
+# an error "SYNC with master in progress" to all the kind of commands
+# but to INFO and SLAVEOF.
+#
+slave-serve-stale-data yes
+
+# You can configure a slave instance to accept writes or not. Writing against
+# a slave instance may be useful to store some ephemeral data (because data
+# written on a slave will be easily deleted after resync with the master) but
+# may also cause problems if clients are writing to it because of a
+# misconfiguration.
+#
+# Since Redis 2.6 by default slaves are read-only.
+#
+# Note: read only slaves are not designed to be exposed to untrusted clients
+# on the internet. It's just a protection layer against misuse of the instance.
+# Still a read only slave exports by default all the administrative commands
+# such as CONFIG, DEBUG, and so forth. To a limited extent you can improve
+# security of read only slaves using 'rename-command' to shadow all the
+# administrative / dangerous commands.
+slave-read-only yes
+
+# Slaves send PINGs to server in a predefined interval. It's possible to change
+# this interval with the repl_ping_slave_period option. The default value is 10
+# seconds.
+#
+# repl-ping-slave-period 10
+
+# The following option sets the replication timeout for:
+#
+# 1) Bulk transfer I/O during SYNC, from the point of view of slave.
+# 2) Master timeout from the point of view of slaves (data, pings).
+# 3) Slave timeout from the point of view of masters (REPLCONF ACK pings).
+#
+# It is important to make sure that this value is greater than the value
+# specified for repl-ping-slave-period otherwise a timeout will be detected
+# every time there is low traffic between the master and the slave.
+#
+# repl-timeout 60
+
+# Disable TCP_NODELAY on the slave socket after SYNC?
+#
+# If you select "yes" Redis will use a smaller number of TCP packets and
+# less bandwidth to send data to slaves. But this can add a delay for
+# the data to appear on the slave side, up to 40 milliseconds with
+# Linux kernels using a default configuration.
+#
+# If you select "no" the delay for data to appear on the slave side will
+# be reduced but more bandwidth will be used for replication.
+#
+# By default we optimize for low latency, but in very high traffic conditions
+# or when the master and slaves are many hops away, turning this to "yes" may
+# be a good idea.
+repl-disable-tcp-nodelay no
+
+# Set the replication backlog size. The backlog is a buffer that accumulates
+# slave data when slaves are disconnected for some time, so that when a slave
+# wants to reconnect again, often a full resync is not needed, but a partial
+# resync is enough, just passing the portion of data the slave missed while
+# disconnected.
+#
+# The biggest the replication backlog, the longer the time the slave can be
+# disconnected and later be able to perform a partial resynchronization.
+#
+# The backlog is only allocated once there is at least a slave connected.
+#
+# repl-backlog-size 1mb
+
+# After a master has no longer connected slaves for some time, the backlog
+# will be freed. The following option configures the amount of seconds that
+# need to elapse, starting from the time the last slave disconnected, for
+# the backlog buffer to be freed.
+#
+# A value of 0 means to never release the backlog.
+#
+# repl-backlog-ttl 3600
+
+# The slave priority is an integer number published by Redis in the INFO output.
+# It is used by Redis Sentinel in order to select a slave to promote into a
+# master if the master is no longer working correctly.
+#
+# A slave with a low priority number is considered better for promotion, so
+# for instance if there are three slaves with priority 10, 100, 25 Sentinel will
+# pick the one with priority 10, that is the lowest.
+#
+# However a special priority of 0 marks the slave as not able to perform the
+# role of master, so a slave with priority of 0 will never be selected by
+# Redis Sentinel for promotion.
+#
+# By default the priority is 100.
+slave-priority 100
+
+# It is possible for a master to stop accepting writes if there are less than
+# N slaves connected, having a lag less or equal than M seconds.
+#
+# The N slaves need to be in "online" state.
+#
+# The lag in seconds, that must be <= the specified value, is calculated from
+# the last ping received from the slave, that is usually sent every second.
+#
+# This option does not GUARANTEES that N replicas will accept the write, but
+# will limit the window of exposure for lost writes in case not enough slaves
+# are available, to the specified number of seconds.
+#
+# For example to require at least 3 slaves with a lag <= 10 seconds use:
+#
+# min-slaves-to-write 3
+# min-slaves-max-lag 10
+#
+# Setting one or the other to 0 disables the feature.
+#
+# By default min-slaves-to-write is set to 0 (feature disabled) and
+# min-slaves-max-lag is set to 10.
+
+################################## SECURITY ###################################
+
+# Require clients to issue AUTH before processing any other
+# commands. This might be useful in environments in which you do not trust
+# others with access to the host running redis-server.
+#
+# This should stay commented out for backward compatibility and because most
+# people do not need auth (e.g. they run their own servers).
+#
+# Warning: since Redis is pretty fast an outside user can try up to
+# 150k passwords per second against a good box. This means that you should
+# use a very strong password otherwise it will be very easy to break.
+#
+# requirepass foobared
+
+# Command renaming.
+#
+# It is possible to change the name of dangerous commands in a shared
+# environment. For instance the CONFIG command may be renamed into something
+# hard to guess so that it will still be available for internal-use tools
+# but not available for general clients.
+#
+# Example:
+#
+# rename-command CONFIG b840fc02d524045429941cc15f59e41cb7be6c52
+#
+# It is also possible to completely kill a command by renaming it into
+# an empty string:
+#
+# rename-command CONFIG ""
+#
+# Please note that changing the name of commands that are logged into the
+# AOF file or transmitted to slaves may cause problems.
+
+################################### LIMITS ####################################
+
+# Set the max number of connected clients at the same time. By default
+# this limit is set to 10000 clients, however if the Redis server is not
+# able to configure the process file limit to allow for the specified limit
+# the max number of allowed clients is set to the current file limit
+# minus 32 (as Redis reserves a few file descriptors for internal uses).
+#
+# Once the limit is reached Redis will close all the new connections sending
+# an error 'max number of clients reached'.
+#
+# maxclients 10000
+
+# Don't use more memory than the specified amount of bytes.
+# When the memory limit is reached Redis will try to remove keys
+# according to the eviction policy selected (see maxmemory-policy).
+#
+# If Redis can't remove keys according to the policy, or if the policy is
+# set to 'noeviction', Redis will start to reply with errors to commands
+# that would use more memory, like SET, LPUSH, and so on, and will continue
+# to reply to read-only commands like GET.
+#
+# This option is usually useful when using Redis as an LRU cache, or to set
+# a hard memory limit for an instance (using the 'noeviction' policy).
+#
+# WARNING: If you have slaves attached to an instance with maxmemory on,
+# the size of the output buffers needed to feed the slaves are subtracted
+# from the used memory count, so that network problems / resyncs will
+# not trigger a loop where keys are evicted, and in turn the output
+# buffer of slaves is full with DELs of keys evicted triggering the deletion
+# of more keys, and so forth until the database is completely emptied.
+#
+# In short... if you have slaves attached it is suggested that you set a lower
+# limit for maxmemory so that there is some free RAM on the system for slave
+# output buffers (but this is not needed if the policy is 'noeviction').
+#
+# maxmemory
+
+# MAXMEMORY POLICY: how Redis will select what to remove when maxmemory
+# is reached. You can select among five behaviors:
+#
+# volatile-lru -> remove the key with an expire set using an LRU algorithm
+# allkeys-lru -> remove any key accordingly to the LRU algorithm
+# volatile-random -> remove a random key with an expire set
+# allkeys-random -> remove a random key, any key
+# volatile-ttl -> remove the key with the nearest expire time (minor TTL)
+# noeviction -> don't expire at all, just return an error on write operations
+#
+# Note: with any of the above policies, Redis will return an error on write
+# operations, when there are not suitable keys for eviction.
+#
+# At the date of writing this commands are: set setnx setex append
+# incr decr rpush lpush rpushx lpushx linsert lset rpoplpush sadd
+# sinter sinterstore sunion sunionstore sdiff sdiffstore zadd zincrby
+# zunionstore zinterstore hset hsetnx hmset hincrby incrby decrby
+# getset mset msetnx exec sort
+#
+# The default is:
+#
+# maxmemory-policy volatile-lru
+
+# LRU and minimal TTL algorithms are not precise algorithms but approximated
+# algorithms (in order to save memory), so you can select as well the sample
+# size to check. For instance for default Redis will check three keys and
+# pick the one that was used less recently, you can change the sample size
+# using the following configuration directive.
+#
+# maxmemory-samples 3
+
+############################## APPEND ONLY MODE ###############################
+
+# By default Redis asynchronously dumps the dataset on disk. This mode is
+# good enough in many applications, but an issue with the Redis process or
+# a power outage may result into a few minutes of writes lost (depending on
+# the configured save points).
+#
+# The Append Only File is an alternative persistence mode that provides
+# much better durability. For instance using the default data fsync policy
+# (see later in the config file) Redis can lose just one second of writes in a
+# dramatic event like a server power outage, or a single write if something
+# wrong with the Redis process itself happens, but the operating system is
+# still running correctly.
+#
+# AOF and RDB persistence can be enabled at the same time without problems.
+# If the AOF is enabled on startup Redis will load the AOF, that is the file
+# with the better durability guarantees.
+#
+# Please check http://redis.io/topics/persistence for more information.
+
+appendonly no
+
+# The name of the append only file (default: "appendonly.aof")
+
+appendfilename "appendonly.aof"
+
+# The fsync() call tells the Operating System to actually write data on disk
+# instead to wait for more data in the output buffer. Some OS will really flush
+# data on disk, some other OS will just try to do it ASAP.
+#
+# Redis supports three different modes:
+#
+# no: don't fsync, just let the OS flush the data when it wants. Faster.
+# always: fsync after every write to the append only log . Slow, Safest.
+# everysec: fsync only one time every second. Compromise.
+#
+# The default is "everysec", as that's usually the right compromise between
+# speed and data safety. It's up to you to understand if you can relax this to
+# "no" that will let the operating system flush the output buffer when
+# it wants, for better performances (but if you can live with the idea of
+# some data loss consider the default persistence mode that's snapshotting),
+# or on the contrary, use "always" that's very slow but a bit safer than
+# everysec.
+#
+# More details please check the following article:
+# http://antirez.com/post/redis-persistence-demystified.html
+#
+# If unsure, use "everysec".
+
+# appendfsync always
+appendfsync everysec
+# appendfsync no
+
+# When the AOF fsync policy is set to always or everysec, and a background
+# saving process (a background save or AOF log background rewriting) is
+# performing a lot of I/O against the disk, in some Linux configurations
+# Redis may block too long on the fsync() call. Note that there is no fix for
+# this currently, as even performing fsync in a different thread will block
+# our synchronous write(2) call.
+#
+# In order to mitigate this problem it's possible to use the following option
+# that will prevent fsync() from being called in the main process while a
+# BGSAVE or BGREWRITEAOF is in progress.
+#
+# This means that while another child is saving, the durability of Redis is
+# the same as "appendfsync none". In practical terms, this means that it is
+# possible to lose up to 30 seconds of log in the worst scenario (with the
+# default Linux settings).
+#
+# If you have latency problems turn this to "yes". Otherwise leave it as
+# "no" that is the safest pick from the point of view of durability.
+
+no-appendfsync-on-rewrite no
+
+# Automatic rewrite of the append only file.
+# Redis is able to automatically rewrite the log file implicitly calling
+# BGREWRITEAOF when the AOF log size grows by the specified percentage.
+#
+# This is how it works: Redis remembers the size of the AOF file after the
+# latest rewrite (if no rewrite has happened since the restart, the size of
+# the AOF at startup is used).
+#
+# This base size is compared to the current size. If the current size is
+# bigger than the specified percentage, the rewrite is triggered. Also
+# you need to specify a minimal size for the AOF file to be rewritten, this
+# is useful to avoid rewriting the AOF file even if the percentage increase
+# is reached but it is still pretty small.
+#
+# Specify a percentage of zero in order to disable the automatic AOF
+# rewrite feature.
+
+auto-aof-rewrite-percentage 100
+auto-aof-rewrite-min-size 64mb
+
+################################ LUA SCRIPTING ###############################
+
+# Max execution time of a Lua script in milliseconds.
+#
+# If the maximum execution time is reached Redis will log that a script is
+# still in execution after the maximum allowed time and will start to
+# reply to queries with an error.
+#
+# When a long running script exceed the maximum execution time only the
+# SCRIPT KILL and SHUTDOWN NOSAVE commands are available. The first can be
+# used to stop a script that did not yet called write commands. The second
+# is the only way to shut down the server in the case a write commands was
+# already issue by the script but the user don't want to wait for the natural
+# termination of the script.
+#
+# Set it to 0 or a negative value for unlimited execution without warnings.
+lua-time-limit 5000
+
+################################## SLOW LOG ###################################
+
+# The Redis Slow Log is a system to log queries that exceeded a specified
+# execution time. The execution time does not include the I/O operations
+# like talking with the client, sending the reply and so forth,
+# but just the time needed to actually execute the command (this is the only
+# stage of command execution where the thread is blocked and can not serve
+# other requests in the meantime).
+#
+# You can configure the slow log with two parameters: one tells Redis
+# what is the execution time, in microseconds, to exceed in order for the
+# command to get logged, and the other parameter is the length of the
+# slow log. When a new command is logged the oldest one is removed from the
+# queue of logged commands.
+
+# The following time is expressed in microseconds, so 1000000 is equivalent
+# to one second. Note that a negative number disables the slow log, while
+# a value of zero forces the logging of every command.
+slowlog-log-slower-than 10000
+
+# There is no limit to this length. Just be aware that it will consume memory.
+# You can reclaim memory used by the slow log with SLOWLOG RESET.
+slowlog-max-len 128
+
+############################# Event notification ##############################
+
+# Redis can notify Pub/Sub clients about events happening in the key space.
+# This feature is documented at http://redis.io/topics/keyspace-events
+#
+# For instance if keyspace events notification is enabled, and a client
+# performs a DEL operation on key "foo" stored in the Database 0, two
+# messages will be published via Pub/Sub:
+#
+# PUBLISH __keyspace@0__:foo del
+# PUBLISH __keyevent@0__:del foo
+#
+# It is possible to select the events that Redis will notify among a set
+# of classes. Every class is identified by a single character:
+#
+# K Keyspace events, published with __keyspace@__ prefix.
+# E Keyevent events, published with __keyevent@__ prefix.
+# g Generic commands (non-type specific) like DEL, EXPIRE, RENAME, ...
+# $ String commands
+# l List commands
+# s Set commands
+# h Hash commands
+# z Sorted set commands
+# x Expired events (events generated every time a key expires)
+# e Evicted events (events generated when a key is evicted for maxmemory)
+# A Alias for g$lshzxe, so that the "AKE" string means all the events.
+#
+# The "notify-keyspace-events" takes as argument a string that is composed
+# by zero or multiple characters. The empty string means that notifications
+# are disabled at all.
+#
+# Example: to enable list and generic events, from the point of view of the
+# event name, use:
+#
+# notify-keyspace-events Elg
+#
+# Example 2: to get the stream of the expired keys subscribing to channel
+# name __keyevent@0__:expired use:
+#
+# notify-keyspace-events Ex
+#
+# By default all notifications are disabled because most users don't need
+# this feature and the feature has some overhead. Note that if you don't
+# specify at least one of K or E, no events will be delivered.
+notify-keyspace-events ""
+
+############################### ADVANCED CONFIG ###############################
+
+# Hashes are encoded using a memory efficient data structure when they have a
+# small number of entries, and the biggest entry does not exceed a given
+# threshold. These thresholds can be configured using the following directives.
+hash-max-ziplist-entries 512
+hash-max-ziplist-value 64
+
+# Similarly to hashes, small lists are also encoded in a special way in order
+# to save a lot of space. The special representation is only used when
+# you are under the following limits:
+list-max-ziplist-entries 512
+list-max-ziplist-value 64
+
+# Sets have a special encoding in just one case: when a set is composed
+# of just strings that happens to be integers in radix 10 in the range
+# of 64 bit signed integers.
+# The following configuration setting sets the limit in the size of the
+# set in order to use this special memory saving encoding.
+set-max-intset-entries 512
+
+# Similarly to hashes and lists, sorted sets are also specially encoded in
+# order to save a lot of space. This encoding is only used when the length and
+# elements of a sorted set are below the following limits:
+zset-max-ziplist-entries 128
+zset-max-ziplist-value 64
+
+# HyperLogLog sparse representation bytes limit. The limit includes the
+# 16 bytes header. When an HyperLogLog using the sparse representation crosses
+# this limit, it is converted into the dense representation.
+#
+# A value greater than 16000 is totally useless, since at that point the
+# dense representation is more memory efficient.
+#
+# The suggested value is ~ 3000 in order to have the benefits of
+# the space efficient encoding without slowing down too much PFADD,
+# which is O(N) with the sparse encoding. The value can be raised to
+# ~ 10000 when CPU is not a concern, but space is, and the data set is
+# composed of many HyperLogLogs with cardinality in the 0 - 15000 range.
+hll-sparse-max-bytes 3000
+
+# Active rehashing uses 1 millisecond every 100 milliseconds of CPU time in
+# order to help rehashing the main Redis hash table (the one mapping top-level
+# keys to values). The hash table implementation Redis uses (see dict.c)
+# performs a lazy rehashing: the more operation you run into a hash table
+# that is rehashing, the more rehashing "steps" are performed, so if the
+# server is idle the rehashing is never complete and some more memory is used
+# by the hash table.
+#
+# The default is to use this millisecond 10 times every second in order to
+# active rehashing the main dictionaries, freeing memory when possible.
+#
+# If unsure:
+# use "activerehashing no" if you have hard latency requirements and it is
+# not a good thing in your environment that Redis can reply form time to time
+# to queries with 2 milliseconds delay.
+#
+# use "activerehashing yes" if you don't have such hard requirements but
+# want to free memory asap when possible.
+activerehashing yes
+
+# The client output buffer limits can be used to force disconnection of clients
+# that are not reading data from the server fast enough for some reason (a
+# common reason is that a Pub/Sub client can't consume messages as fast as the
+# publisher can produce them).
+#
+# The limit can be set differently for the three different classes of clients:
+#
+# normal -> normal clients including MONITOR clients
+# slave -> slave clients
+# pubsub -> clients subscribed to at least one pubsub channel or pattern
+#
+# The syntax of every client-output-buffer-limit directive is the following:
+#
+# client-output-buffer-limit
+#
+# A client is immediately disconnected once the hard limit is reached, or if
+# the soft limit is reached and remains reached for the specified number of
+# seconds (continuously).
+# So for instance if the hard limit is 32 megabytes and the soft limit is
+# 16 megabytes / 10 seconds, the client will get disconnected immediately
+# if the size of the output buffers reach 32 megabytes, but will also get
+# disconnected if the client reaches 16 megabytes and continuously overcomes
+# the limit for 10 seconds.
+#
+# By default normal clients are not limited because they don't receive data
+# without asking (in a push way), but just after a request, so only
+# asynchronous clients may create a scenario where data is requested faster
+# than it can read.
+#
+# Instead there is a default limit for pubsub and slave clients, since
+# subscribers and slaves receive data in a push fashion.
+#
+# Both the hard or the soft limit can be disabled by setting them to zero.
+client-output-buffer-limit normal 0 0 0
+client-output-buffer-limit slave 256mb 64mb 60
+client-output-buffer-limit pubsub 32mb 8mb 60
+
+# Redis calls an internal function to perform many background tasks, like
+# closing connections of clients in timeout, purging expired keys that are
+# never requested, and so forth.
+#
+# Not all tasks are performed with the same frequency, but Redis checks for
+# tasks to perform accordingly to the specified "hz" value.
+#
+# By default "hz" is set to 10. Raising the value will use more CPU when
+# Redis is idle, but at the same time will make Redis more responsive when
+# there are many keys expiring at the same time, and timeouts may be
+# handled with more precision.
+#
+# The range is between 1 and 500, however a value over 100 is usually not
+# a good idea. Most users should use the default of 10 and raise this up to
+# 100 only in environments where very low latency is required.
+hz 10
+
+# When a child rewrites the AOF file, if the following option is enabled
+# the file will be fsync-ed every 32 MB of data generated. This is useful
+# in order to commit the file to the disk more incrementally and avoid
+# big latency spikes.
+aof-rewrite-incremental-fsync yes
+
diff --git a/app/config/_os/etc/redis.conf.new b/app/config/_os/etc/redis.conf.new
index b37f4b5c..37843121 100644
--- a/app/config/_os/etc/redis.conf.new
+++ b/app/config/_os/etc/redis.conf.new
@@ -1,753 +1,753 @@
-# Redis configuration file example
-
-# Note on units: when memory size is needed, it is possible to specify
-# it in the usual form of 1k 5GB 4M and so forth:
-#
-# 1k => 1000 bytes
-# 1kb => 1024 bytes
-# 1m => 1000000 bytes
-# 1mb => 1024*1024 bytes
-# 1g => 1000000000 bytes
-# 1gb => 1024*1024*1024 bytes
-#
-# units are case insensitive so 1GB 1Gb 1gB are all the same.
-
-################################## INCLUDES ###################################
-
-# Include one or more other config files here. This is useful if you
-# have a standard template that goes to all Redis server but also need
-# to customize a few per-server settings. Include files can include
-# other files, so use this wisely.
-#
-# Notice option "include" won't be rewritten by command "CONFIG REWRITE"
-# from admin or Redis Sentinel. Since Redis always uses the last processed
-# line as value of a configuration directive, you'd better put includes
-# at the beginning of this file to avoid overwriting config change at runtime.
-#
-# If instead you are interested in using includes to override configuration
-# options, it is better to use include as the last line.
-#
-# include /path/to/local.conf
-# include /path/to/other.conf
-
-################################ GENERAL #####################################
-
-# By default Redis does not run as a daemon. Use 'yes' if you need it.
-# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
-daemonize no
-
-# When running daemonized, Redis writes a pid file in /var/run/redis.pid by
-# default. You can specify a custom pid file location here.
-pidfile /run/redis/redis.pid
-
-# Accept connections on the specified port, default is 6379.
-# If port 0 is specified Redis will not listen on a TCP socket.
-#port 6379
-port 0
-
-# TCP listen() backlog.
-#
-# In high requests-per-second environments you need an high backlog in order
-# to avoid slow clients connections issues. Note that the Linux kernel
-# will silently truncate it to the value of /proc/sys/net/core/somaxconn so
-# make sure to raise both the value of somaxconn and tcp_max_syn_backlog
-# in order to get the desired effect.
-tcp-backlog 511
-
-# By default Redis listens for connections from all the network interfaces
-# available on the server. It is possible to listen to just one or multiple
-# interfaces using the "bind" configuration directive, followed by one or
-# more IP addresses.
-#
-# Examples:
-#
-# bind 192.168.1.100 10.0.0.1
-bind 127.0.0.1
-
-# Specify the path for the Unix socket that will be used to listen for
-# incoming connections. There is no default, so Redis will not listen
-# on a unix socket when not specified.
-#
-unixsocket /tmp/redis.sock
-unixsocketperm 777
-
-# Close the connection after a client is idle for N seconds (0 to disable)
-timeout 0
-
-# TCP keepalive.
-#
-# If non-zero, use SO_KEEPALIVE to send TCP ACKs to clients in absence
-# of communication. This is useful for two reasons:
-#
-# 1) Detect dead peers.
-# 2) Take the connection alive from the point of view of network
-# equipment in the middle.
-#
-# On Linux, the specified value (in seconds) is the period used to send ACKs.
-# Note that to close the connection the double of the time is needed.
-# On other kernels the period depends on the kernel configuration.
-#
-# A reasonable value for this option is 60 seconds.
-tcp-keepalive 0
-
-# Specify the server verbosity level.
-# This can be one of:
-# debug (a lot of information, useful for development/testing)
-# verbose (many rarely useful info, but not a mess like the debug level)
-# notice (moderately verbose, what you want in production probably)
-# warning (only very important / critical messages are logged)
-loglevel warning
-
-# Specify the log file name. Also the empty string can be used to force
-# Redis to log on the standard output. Note that if you use standard
-# output for logging but daemonize, logs will be sent to /dev/null
-logfile ""
-
-# To enable logging to the system logger, just set 'syslog-enabled' to yes,
-# and optionally update the other syslog parameters to suit your needs.
-# syslog-enabled no
-
-# Specify the syslog identity.
-# syslog-ident redis
-
-# Specify the syslog facility. Must be USER or between LOCAL0-LOCAL7.
-# syslog-facility local0
-
-# Set the number of databases. The default database is DB 0, you can select
-# a different one on a per-connection basis using SELECT where
-# dbid is a number between 0 and 'databases'-1
-databases 1
-
-################################ SNAPSHOTTING ################################
-#
-# Save the DB on disk:
-#
-# save
-#
-# Will save the DB if both the given number of seconds and the given
-# number of write operations against the DB occurred.
-#
-# In the example below the behaviour will be to save:
-# after 900 sec (15 min) if at least 1 key changed
-# after 300 sec (5 min) if at least 10 keys changed
-# after 60 sec if at least 10000 keys changed
-#
-# Note: you can disable saving at all commenting all the "save" lines.
-#
-# It is also possible to remove all the previously configured save
-# points by adding a save directive with a single empty string argument
-# like in the following example:
-#
-# save ""
-
-save 900 1
-save 300 10
-save 60 10000
-
-# By default Redis will stop accepting writes if RDB snapshots are enabled
-# (at least one save point) and the latest background save failed.
-# This will make the user aware (in a hard way) that data is not persisting
-# on disk properly, otherwise chances are that no one will notice and some
-# disaster will happen.
-#
-# If the background saving process will start working again Redis will
-# automatically allow writes again.
-#
-# However if you have setup your proper monitoring of the Redis server
-# and persistence, you may want to disable this feature so that Redis will
-# continue to work as usual even if there are problems with disk,
-# permissions, and so forth.
-stop-writes-on-bgsave-error yes
-
-# Compress string objects using LZF when dump .rdb databases?
-# For default that's set to 'yes' as it's almost always a win.
-# If you want to save some CPU in the saving child set it to 'no' but
-# the dataset will likely be bigger if you have compressible values or keys.
-rdbcompression no
-
-# Since version 5 of RDB a CRC64 checksum is placed at the end of the file.
-# This makes the format more resistant to corruption but there is a performance
-# hit to pay (around 10%) when saving and loading RDB files, so you can disable it
-# for maximum performances.
-#
-# RDB files created with checksum disabled have a checksum of zero that will
-# tell the loading code to skip the check.
-rdbchecksum no
-
-# The filename where to dump the DB
-dbfilename rune.rdb
-
-# The working directory.
-#
-# The DB will be written inside this directory, with the filename specified
-# above using the 'dbfilename' configuration directive.
-#
-# The Append Only File will also be created inside this directory.
-#
-# Note that you must specify a directory here, not a file name.
-dir /var/lib/redis/
-
-################################# REPLICATION #################################
-
-# Master-Slave replication. Use slaveof to make a Redis instance a copy of
-# another Redis server. Note that the configuration is local to the slave
-# so for example it is possible to configure the slave to save the DB with a
-# different interval, or to listen to another port, and so on.
-#
-# slaveof
-
-# If the master is password protected (using the "requirepass" configuration
-# directive below) it is possible to tell the slave to authenticate before
-# starting the replication synchronization process, otherwise the master will
-# refuse the slave request.
-#
-# masterauth
-
-# When a slave loses its connection with the master, or when the replication
-# is still in progress, the slave can act in two different ways:
-#
-# 1) if slave-serve-stale-data is set to 'yes' (the default) the slave will
-# still reply to client requests, possibly with out of date data, or the
-# data set may just be empty if this is the first synchronization.
-#
-# 2) if slave-serve-stale-data is set to 'no' the slave will reply with
-# an error "SYNC with master in progress" to all the kind of commands
-# but to INFO and SLAVEOF.
-#
-slave-serve-stale-data yes
-
-# You can configure a slave instance to accept writes or not. Writing against
-# a slave instance may be useful to store some ephemeral data (because data
-# written on a slave will be easily deleted after resync with the master) but
-# may also cause problems if clients are writing to it because of a
-# misconfiguration.
-#
-# Since Redis 2.6 by default slaves are read-only.
-#
-# Note: read only slaves are not designed to be exposed to untrusted clients
-# on the internet. It's just a protection layer against misuse of the instance.
-# Still a read only slave exports by default all the administrative commands
-# such as CONFIG, DEBUG, and so forth. To a limited extent you can improve
-# security of read only slaves using 'rename-command' to shadow all the
-# administrative / dangerous commands.
-slave-read-only yes
-
-# Slaves send PINGs to server in a predefined interval. It's possible to change
-# this interval with the repl_ping_slave_period option. The default value is 10
-# seconds.
-#
-# repl-ping-slave-period 10
-
-# The following option sets the replication timeout for:
-#
-# 1) Bulk transfer I/O during SYNC, from the point of view of slave.
-# 2) Master timeout from the point of view of slaves (data, pings).
-# 3) Slave timeout from the point of view of masters (REPLCONF ACK pings).
-#
-# It is important to make sure that this value is greater than the value
-# specified for repl-ping-slave-period otherwise a timeout will be detected
-# every time there is low traffic between the master and the slave.
-#
-# repl-timeout 60
-
-# Disable TCP_NODELAY on the slave socket after SYNC?
-#
-# If you select "yes" Redis will use a smaller number of TCP packets and
-# less bandwidth to send data to slaves. But this can add a delay for
-# the data to appear on the slave side, up to 40 milliseconds with
-# Linux kernels using a default configuration.
-#
-# If you select "no" the delay for data to appear on the slave side will
-# be reduced but more bandwidth will be used for replication.
-#
-# By default we optimize for low latency, but in very high traffic conditions
-# or when the master and slaves are many hops away, turning this to "yes" may
-# be a good idea.
-repl-disable-tcp-nodelay no
-
-# Set the replication backlog size. The backlog is a buffer that accumulates
-# slave data when slaves are disconnected for some time, so that when a slave
-# wants to reconnect again, often a full resync is not needed, but a partial
-# resync is enough, just passing the portion of data the slave missed while
-# disconnected.
-#
-# The biggest the replication backlog, the longer the time the slave can be
-# disconnected and later be able to perform a partial resynchronization.
-#
-# The backlog is only allocated once there is at least a slave connected.
-#
-# repl-backlog-size 1mb
-
-# After a master has no longer connected slaves for some time, the backlog
-# will be freed. The following option configures the amount of seconds that
-# need to elapse, starting from the time the last slave disconnected, for
-# the backlog buffer to be freed.
-#
-# A value of 0 means to never release the backlog.
-#
-# repl-backlog-ttl 3600
-
-# The slave priority is an integer number published by Redis in the INFO output.
-# It is used by Redis Sentinel in order to select a slave to promote into a
-# master if the master is no longer working correctly.
-#
-# A slave with a low priority number is considered better for promotion, so
-# for instance if there are three slaves with priority 10, 100, 25 Sentinel will
-# pick the one with priority 10, that is the lowest.
-#
-# However a special priority of 0 marks the slave as not able to perform the
-# role of master, so a slave with priority of 0 will never be selected by
-# Redis Sentinel for promotion.
-#
-# By default the priority is 100.
-slave-priority 100
-
-# It is possible for a master to stop accepting writes if there are less than
-# N slaves connected, having a lag less or equal than M seconds.
-#
-# The N slaves need to be in "online" state.
-#
-# The lag in seconds, that must be <= the specified value, is calculated from
-# the last ping received from the slave, that is usually sent every second.
-#
-# This option does not GUARANTEES that N replicas will accept the write, but
-# will limit the window of exposure for lost writes in case not enough slaves
-# are available, to the specified number of seconds.
-#
-# For example to require at least 3 slaves with a lag <= 10 seconds use:
-#
-# min-slaves-to-write 3
-# min-slaves-max-lag 10
-#
-# Setting one or the other to 0 disables the feature.
-#
-# By default min-slaves-to-write is set to 0 (feature disabled) and
-# min-slaves-max-lag is set to 10.
-
-################################## SECURITY ###################################
-
-# Require clients to issue AUTH before processing any other
-# commands. This might be useful in environments in which you do not trust
-# others with access to the host running redis-server.
-#
-# This should stay commented out for backward compatibility and because most
-# people do not need auth (e.g. they run their own servers).
-#
-# Warning: since Redis is pretty fast an outside user can try up to
-# 150k passwords per second against a good box. This means that you should
-# use a very strong password otherwise it will be very easy to break.
-#
-# requirepass foobared
-
-# Command renaming.
-#
-# It is possible to change the name of dangerous commands in a shared
-# environment. For instance the CONFIG command may be renamed into something
-# hard to guess so that it will still be available for internal-use tools
-# but not available for general clients.
-#
-# Example:
-#
-# rename-command CONFIG b840fc02d524045429941cc15f59e41cb7be6c52
-#
-# It is also possible to completely kill a command by renaming it into
-# an empty string:
-#
-# rename-command CONFIG ""
-#
-# Please note that changing the name of commands that are logged into the
-# AOF file or transmitted to slaves may cause problems.
-
-################################### LIMITS ####################################
-
-# Set the max number of connected clients at the same time. By default
-# this limit is set to 10000 clients, however if the Redis server is not
-# able to configure the process file limit to allow for the specified limit
-# the max number of allowed clients is set to the current file limit
-# minus 32 (as Redis reserves a few file descriptors for internal uses).
-#
-# Once the limit is reached Redis will close all the new connections sending
-# an error 'max number of clients reached'.
-#
-# maxclients 10000
-
-# Don't use more memory than the specified amount of bytes.
-# When the memory limit is reached Redis will try to remove keys
-# according to the eviction policy selected (see maxmemory-policy).
-#
-# If Redis can't remove keys according to the policy, or if the policy is
-# set to 'noeviction', Redis will start to reply with errors to commands
-# that would use more memory, like SET, LPUSH, and so on, and will continue
-# to reply to read-only commands like GET.
-#
-# This option is usually useful when using Redis as an LRU cache, or to set
-# a hard memory limit for an instance (using the 'noeviction' policy).
-#
-# WARNING: If you have slaves attached to an instance with maxmemory on,
-# the size of the output buffers needed to feed the slaves are subtracted
-# from the used memory count, so that network problems / resyncs will
-# not trigger a loop where keys are evicted, and in turn the output
-# buffer of slaves is full with DELs of keys evicted triggering the deletion
-# of more keys, and so forth until the database is completely emptied.
-#
-# In short... if you have slaves attached it is suggested that you set a lower
-# limit for maxmemory so that there is some free RAM on the system for slave
-# output buffers (but this is not needed if the policy is 'noeviction').
-#
-# maxmemory
-
-# MAXMEMORY POLICY: how Redis will select what to remove when maxmemory
-# is reached. You can select among five behaviors:
-#
-# volatile-lru -> remove the key with an expire set using an LRU algorithm
-# allkeys-lru -> remove any key accordingly to the LRU algorithm
-# volatile-random -> remove a random key with an expire set
-# allkeys-random -> remove a random key, any key
-# volatile-ttl -> remove the key with the nearest expire time (minor TTL)
-# noeviction -> don't expire at all, just return an error on write operations
-#
-# Note: with any of the above policies, Redis will return an error on write
-# operations, when there are not suitable keys for eviction.
-#
-# At the date of writing this commands are: set setnx setex append
-# incr decr rpush lpush rpushx lpushx linsert lset rpoplpush sadd
-# sinter sinterstore sunion sunionstore sdiff sdiffstore zadd zincrby
-# zunionstore zinterstore hset hsetnx hmset hincrby incrby decrby
-# getset mset msetnx exec sort
-#
-# The default is:
-#
-# maxmemory-policy volatile-lru
-
-# LRU and minimal TTL algorithms are not precise algorithms but approximated
-# algorithms (in order to save memory), so you can select as well the sample
-# size to check. For instance for default Redis will check three keys and
-# pick the one that was used less recently, you can change the sample size
-# using the following configuration directive.
-#
-# maxmemory-samples 3
-
-############################## APPEND ONLY MODE ###############################
-
-# By default Redis asynchronously dumps the dataset on disk. This mode is
-# good enough in many applications, but an issue with the Redis process or
-# a power outage may result into a few minutes of writes lost (depending on
-# the configured save points).
-#
-# The Append Only File is an alternative persistence mode that provides
-# much better durability. For instance using the default data fsync policy
-# (see later in the config file) Redis can lose just one second of writes in a
-# dramatic event like a server power outage, or a single write if something
-# wrong with the Redis process itself happens, but the operating system is
-# still running correctly.
-#
-# AOF and RDB persistence can be enabled at the same time without problems.
-# If the AOF is enabled on startup Redis will load the AOF, that is the file
-# with the better durability guarantees.
-#
-# Please check http://redis.io/topics/persistence for more information.
-
-appendonly no
-
-# The name of the append only file (default: "appendonly.aof")
-
-appendfilename "appendonly.aof"
-
-# The fsync() call tells the Operating System to actually write data on disk
-# instead to wait for more data in the output buffer. Some OS will really flush
-# data on disk, some other OS will just try to do it ASAP.
-#
-# Redis supports three different modes:
-#
-# no: don't fsync, just let the OS flush the data when it wants. Faster.
-# always: fsync after every write to the append only log . Slow, Safest.
-# everysec: fsync only one time every second. Compromise.
-#
-# The default is "everysec", as that's usually the right compromise between
-# speed and data safety. It's up to you to understand if you can relax this to
-# "no" that will let the operating system flush the output buffer when
-# it wants, for better performances (but if you can live with the idea of
-# some data loss consider the default persistence mode that's snapshotting),
-# or on the contrary, use "always" that's very slow but a bit safer than
-# everysec.
-#
-# More details please check the following article:
-# http://antirez.com/post/redis-persistence-demystified.html
-#
-# If unsure, use "everysec".
-
-# appendfsync always
-# appendfsync everysec
-appendfsync no
-
-# When the AOF fsync policy is set to always or everysec, and a background
-# saving process (a background save or AOF log background rewriting) is
-# performing a lot of I/O against the disk, in some Linux configurations
-# Redis may block too long on the fsync() call. Note that there is no fix for
-# this currently, as even performing fsync in a different thread will block
-# our synchronous write(2) call.
-#
-# In order to mitigate this problem it's possible to use the following option
-# that will prevent fsync() from being called in the main process while a
-# BGSAVE or BGREWRITEAOF is in progress.
-#
-# This means that while another child is saving, the durability of Redis is
-# the same as "appendfsync none". In practical terms, this means that it is
-# possible to lose up to 30 seconds of log in the worst scenario (with the
-# default Linux settings).
-#
-# If you have latency problems turn this to "yes". Otherwise leave it as
-# "no" that is the safest pick from the point of view of durability.
-
-no-appendfsync-on-rewrite no
-
-# Automatic rewrite of the append only file.
-# Redis is able to automatically rewrite the log file implicitly calling
-# BGREWRITEAOF when the AOF log size grows by the specified percentage.
-#
-# This is how it works: Redis remembers the size of the AOF file after the
-# latest rewrite (if no rewrite has happened since the restart, the size of
-# the AOF at startup is used).
-#
-# This base size is compared to the current size. If the current size is
-# bigger than the specified percentage, the rewrite is triggered. Also
-# you need to specify a minimal size for the AOF file to be rewritten, this
-# is useful to avoid rewriting the AOF file even if the percentage increase
-# is reached but it is still pretty small.
-#
-# Specify a percentage of zero in order to disable the automatic AOF
-# rewrite feature.
-
-auto-aof-rewrite-percentage 100
-auto-aof-rewrite-min-size 64mb
-
-################################ LUA SCRIPTING ###############################
-
-# Max execution time of a Lua script in milliseconds.
-#
-# If the maximum execution time is reached Redis will log that a script is
-# still in execution after the maximum allowed time and will start to
-# reply to queries with an error.
-#
-# When a long running script exceed the maximum execution time only the
-# SCRIPT KILL and SHUTDOWN NOSAVE commands are available. The first can be
-# used to stop a script that did not yet called write commands. The second
-# is the only way to shut down the server in the case a write commands was
-# already issue by the script but the user don't want to wait for the natural
-# termination of the script.
-#
-# Set it to 0 or a negative value for unlimited execution without warnings.
-lua-time-limit 5000
-
-################################## SLOW LOG ###################################
-
-# The Redis Slow Log is a system to log queries that exceeded a specified
-# execution time. The execution time does not include the I/O operations
-# like talking with the client, sending the reply and so forth,
-# but just the time needed to actually execute the command (this is the only
-# stage of command execution where the thread is blocked and can not serve
-# other requests in the meantime).
-#
-# You can configure the slow log with two parameters: one tells Redis
-# what is the execution time, in microseconds, to exceed in order for the
-# command to get logged, and the other parameter is the length of the
-# slow log. When a new command is logged the oldest one is removed from the
-# queue of logged commands.
-
-# The following time is expressed in microseconds, so 1000000 is equivalent
-# to one second. Note that a negative number disables the slow log, while
-# a value of zero forces the logging of every command.
-slowlog-log-slower-than 10000
-
-# There is no limit to this length. Just be aware that it will consume memory.
-# You can reclaim memory used by the slow log with SLOWLOG RESET.
-slowlog-max-len 128
-
-################################ LATENCY MONITOR ##############################
-
-# The Redis latency monitoring subsystem samples different operations
-# at runtime in order to collect data related to possible sources of
-# latency of a Redis instance.
-#
-# Via the LATENCY command this information is available to the user that can
-# print graphs and obtain reports.
-#
-# The system only logs operations that were performed in a time equal or
-# greater than the amount of milliseconds specified via the
-# latency-monitor-threshold configuration directive. When its value is set
-# to zero, the latency monitor is turned off.
-#
-# By default latency monitoring is disabled since it is mostly not needed
-# if you don't have latency issues, and collecting data has a performance
-# impact, that while very small, can be measured under big load. Latency
-# monitoring can easily be enalbed at runtime using the command
-# "CONFIG SET latency-monitor-threshold " if needed.
-latency-monitor-threshold 0
-
-############################# Event notification ##############################
-
-# Redis can notify Pub/Sub clients about events happening in the key space.
-# This feature is documented at http://redis.io/topics/keyspace-events
-#
-# For instance if keyspace events notification is enabled, and a client
-# performs a DEL operation on key "foo" stored in the Database 0, two
-# messages will be published via Pub/Sub:
-#
-# PUBLISH __keyspace@0__:foo del
-# PUBLISH __keyevent@0__:del foo
-#
-# It is possible to select the events that Redis will notify among a set
-# of classes. Every class is identified by a single character:
-#
-# K Keyspace events, published with __keyspace@__ prefix.
-# E Keyevent events, published with __keyevent@__ prefix.
-# g Generic commands (non-type specific) like DEL, EXPIRE, RENAME, ...
-# $ String commands
-# l List commands
-# s Set commands
-# h Hash commands
-# z Sorted set commands
-# x Expired events (events generated every time a key expires)
-# e Evicted events (events generated when a key is evicted for maxmemory)
-# A Alias for g$lshzxe, so that the "AKE" string means all the events.
-#
-# The "notify-keyspace-events" takes as argument a string that is composed
-# by zero or multiple characters. The empty string means that notifications
-# are disabled at all.
-#
-# Example: to enable list and generic events, from the point of view of the
-# event name, use:
-#
-# notify-keyspace-events Elg
-#
-# Example 2: to get the stream of the expired keys subscribing to channel
-# name __keyevent@0__:expired use:
-#
-# notify-keyspace-events Ex
-#
-# By default all notifications are disabled because most users don't need
-# this feature and the feature has some overhead. Note that if you don't
-# specify at least one of K or E, no events will be delivered.
-notify-keyspace-events ""
-
-############################### ADVANCED CONFIG ###############################
-
-# Hashes are encoded using a memory efficient data structure when they have a
-# small number of entries, and the biggest entry does not exceed a given
-# threshold. These thresholds can be configured using the following directives.
-hash-max-ziplist-entries 512
-hash-max-ziplist-value 64
-
-# Similarly to hashes, small lists are also encoded in a special way in order
-# to save a lot of space. The special representation is only used when
-# you are under the following limits:
-list-max-ziplist-entries 512
-list-max-ziplist-value 64
-
-# Sets have a special encoding in just one case: when a set is composed
-# of just strings that happens to be integers in radix 10 in the range
-# of 64 bit signed integers.
-# The following configuration setting sets the limit in the size of the
-# set in order to use this special memory saving encoding.
-set-max-intset-entries 512
-
-# Similarly to hashes and lists, sorted sets are also specially encoded in
-# order to save a lot of space. This encoding is only used when the length and
-# elements of a sorted set are below the following limits:
-zset-max-ziplist-entries 128
-zset-max-ziplist-value 64
-
-# HyperLogLog sparse representation bytes limit. The limit includes the
-# 16 bytes header. When an HyperLogLog using the sparse representation crosses
-# this limit, it is converted into the dense representation.
-#
-# A value greater than 16000 is totally useless, since at that point the
-# dense representation is more memory efficient.
-#
-# The suggested value is ~ 3000 in order to have the benefits of
-# the space efficient encoding without slowing down too much PFADD,
-# which is O(N) with the sparse encoding. The value can be raised to
-# ~ 10000 when CPU is not a concern, but space is, and the data set is
-# composed of many HyperLogLogs with cardinality in the 0 - 15000 range.
-hll-sparse-max-bytes 3000
-
-# Active rehashing uses 1 millisecond every 100 milliseconds of CPU time in
-# order to help rehashing the main Redis hash table (the one mapping top-level
-# keys to values). The hash table implementation Redis uses (see dict.c)
-# performs a lazy rehashing: the more operation you run into a hash table
-# that is rehashing, the more rehashing "steps" are performed, so if the
-# server is idle the rehashing is never complete and some more memory is used
-# by the hash table.
-#
-# The default is to use this millisecond 10 times every second in order to
-# active rehashing the main dictionaries, freeing memory when possible.
-#
-# If unsure:
-# use "activerehashing no" if you have hard latency requirements and it is
-# not a good thing in your environment that Redis can reply form time to time
-# to queries with 2 milliseconds delay.
-#
-# use "activerehashing yes" if you don't have such hard requirements but
-# want to free memory asap when possible.
-activerehashing no
-
-# The client output buffer limits can be used to force disconnection of clients
-# that are not reading data from the server fast enough for some reason (a
-# common reason is that a Pub/Sub client can't consume messages as fast as the
-# publisher can produce them).
-#
-# The limit can be set differently for the three different classes of clients:
-#
-# normal -> normal clients including MONITOR clients
-# slave -> slave clients
-# pubsub -> clients subscribed to at least one pubsub channel or pattern
-#
-# The syntax of every client-output-buffer-limit directive is the following:
-#
-# client-output-buffer-limit
-#
-# A client is immediately disconnected once the hard limit is reached, or if
-# the soft limit is reached and remains reached for the specified number of
-# seconds (continuously).
-# So for instance if the hard limit is 32 megabytes and the soft limit is
-# 16 megabytes / 10 seconds, the client will get disconnected immediately
-# if the size of the output buffers reach 32 megabytes, but will also get
-# disconnected if the client reaches 16 megabytes and continuously overcomes
-# the limit for 10 seconds.
-#
-# By default normal clients are not limited because they don't receive data
-# without asking (in a push way), but just after a request, so only
-# asynchronous clients may create a scenario where data is requested faster
-# than it can read.
-#
-# Instead there is a default limit for pubsub and slave clients, since
-# subscribers and slaves receive data in a push fashion.
-#
-# Both the hard or the soft limit can be disabled by setting them to zero.
-client-output-buffer-limit normal 0 0 0
-client-output-buffer-limit slave 256mb 64mb 60
-client-output-buffer-limit pubsub 32mb 8mb 60
-
-# Redis calls an internal function to perform many background tasks, like
-# closing connections of clients in timeout, purging expired keys that are
-# never requested, and so forth.
-#
-# Not all tasks are performed with the same frequency, but Redis checks for
-# tasks to perform accordingly to the specified "hz" value.
-#
-# By default "hz" is set to 10. Raising the value will use more CPU when
-# Redis is idle, but at the same time will make Redis more responsive when
-# there are many keys expiring at the same time, and timeouts may be
-# handled with more precision.
-#
-# The range is between 1 and 500, however a value over 100 is usually not
-# a good idea. Most users should use the default of 10 and raise this up to
-# 100 only in environments where very low latency is required.
-hz 5
-
-# When a child rewrites the AOF file, if the following option is enabled
-# the file will be fsync-ed every 32 MB of data generated. This is useful
-# in order to commit the file to the disk more incrementally and avoid
-# big latency spikes.
-aof-rewrite-incremental-fsync yes
-
+# Redis configuration file example
+
+# Note on units: when memory size is needed, it is possible to specify
+# it in the usual form of 1k 5GB 4M and so forth:
+#
+# 1k => 1000 bytes
+# 1kb => 1024 bytes
+# 1m => 1000000 bytes
+# 1mb => 1024*1024 bytes
+# 1g => 1000000000 bytes
+# 1gb => 1024*1024*1024 bytes
+#
+# units are case insensitive so 1GB 1Gb 1gB are all the same.
+
+################################## INCLUDES ###################################
+
+# Include one or more other config files here. This is useful if you
+# have a standard template that goes to all Redis server but also need
+# to customize a few per-server settings. Include files can include
+# other files, so use this wisely.
+#
+# Notice option "include" won't be rewritten by command "CONFIG REWRITE"
+# from admin or Redis Sentinel. Since Redis always uses the last processed
+# line as value of a configuration directive, you'd better put includes
+# at the beginning of this file to avoid overwriting config change at runtime.
+#
+# If instead you are interested in using includes to override configuration
+# options, it is better to use include as the last line.
+#
+# include /path/to/local.conf
+# include /path/to/other.conf
+
+################################ GENERAL #####################################
+
+# By default Redis does not run as a daemon. Use 'yes' if you need it.
+# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
+daemonize no
+
+# When running daemonized, Redis writes a pid file in /var/run/redis.pid by
+# default. You can specify a custom pid file location here.
+pidfile /run/redis/redis.pid
+
+# Accept connections on the specified port, default is 6379.
+# If port 0 is specified Redis will not listen on a TCP socket.
+#port 6379
+port 0
+
+# TCP listen() backlog.
+#
+# In high requests-per-second environments you need an high backlog in order
+# to avoid slow clients connections issues. Note that the Linux kernel
+# will silently truncate it to the value of /proc/sys/net/core/somaxconn so
+# make sure to raise both the value of somaxconn and tcp_max_syn_backlog
+# in order to get the desired effect.
+tcp-backlog 511
+
+# By default Redis listens for connections from all the network interfaces
+# available on the server. It is possible to listen to just one or multiple
+# interfaces using the "bind" configuration directive, followed by one or
+# more IP addresses.
+#
+# Examples:
+#
+# bind 192.168.1.100 10.0.0.1
+bind 127.0.0.1
+
+# Specify the path for the Unix socket that will be used to listen for
+# incoming connections. There is no default, so Redis will not listen
+# on a unix socket when not specified.
+#
+unixsocket /tmp/redis.sock
+unixsocketperm 777
+
+# Close the connection after a client is idle for N seconds (0 to disable)
+timeout 0
+
+# TCP keepalive.
+#
+# If non-zero, use SO_KEEPALIVE to send TCP ACKs to clients in absence
+# of communication. This is useful for two reasons:
+#
+# 1) Detect dead peers.
+# 2) Take the connection alive from the point of view of network
+# equipment in the middle.
+#
+# On Linux, the specified value (in seconds) is the period used to send ACKs.
+# Note that to close the connection the double of the time is needed.
+# On other kernels the period depends on the kernel configuration.
+#
+# A reasonable value for this option is 60 seconds.
+tcp-keepalive 0
+
+# Specify the server verbosity level.
+# This can be one of:
+# debug (a lot of information, useful for development/testing)
+# verbose (many rarely useful info, but not a mess like the debug level)
+# notice (moderately verbose, what you want in production probably)
+# warning (only very important / critical messages are logged)
+loglevel warning
+
+# Specify the log file name. Also the empty string can be used to force
+# Redis to log on the standard output. Note that if you use standard
+# output for logging but daemonize, logs will be sent to /dev/null
+logfile ""
+
+# To enable logging to the system logger, just set 'syslog-enabled' to yes,
+# and optionally update the other syslog parameters to suit your needs.
+# syslog-enabled no
+
+# Specify the syslog identity.
+# syslog-ident redis
+
+# Specify the syslog facility. Must be USER or between LOCAL0-LOCAL7.
+# syslog-facility local0
+
+# Set the number of databases. The default database is DB 0, you can select
+# a different one on a per-connection basis using SELECT where
+# dbid is a number between 0 and 'databases'-1
+databases 1
+
+################################ SNAPSHOTTING ################################
+#
+# Save the DB on disk:
+#
+# save
+#
+# Will save the DB if both the given number of seconds and the given
+# number of write operations against the DB occurred.
+#
+# In the example below the behaviour will be to save:
+# after 900 sec (15 min) if at least 1 key changed
+# after 300 sec (5 min) if at least 10 keys changed
+# after 60 sec if at least 10000 keys changed
+#
+# Note: you can disable saving at all commenting all the "save" lines.
+#
+# It is also possible to remove all the previously configured save
+# points by adding a save directive with a single empty string argument
+# like in the following example:
+#
+# save ""
+
+save 900 1
+save 300 10
+save 60 10000
+
+# By default Redis will stop accepting writes if RDB snapshots are enabled
+# (at least one save point) and the latest background save failed.
+# This will make the user aware (in a hard way) that data is not persisting
+# on disk properly, otherwise chances are that no one will notice and some
+# disaster will happen.
+#
+# If the background saving process will start working again Redis will
+# automatically allow writes again.
+#
+# However if you have setup your proper monitoring of the Redis server
+# and persistence, you may want to disable this feature so that Redis will
+# continue to work as usual even if there are problems with disk,
+# permissions, and so forth.
+stop-writes-on-bgsave-error yes
+
+# Compress string objects using LZF when dump .rdb databases?
+# For default that's set to 'yes' as it's almost always a win.
+# If you want to save some CPU in the saving child set it to 'no' but
+# the dataset will likely be bigger if you have compressible values or keys.
+rdbcompression no
+
+# Since version 5 of RDB a CRC64 checksum is placed at the end of the file.
+# This makes the format more resistant to corruption but there is a performance
+# hit to pay (around 10%) when saving and loading RDB files, so you can disable it
+# for maximum performances.
+#
+# RDB files created with checksum disabled have a checksum of zero that will
+# tell the loading code to skip the check.
+rdbchecksum no
+
+# The filename where to dump the DB
+dbfilename rune.rdb
+
+# The working directory.
+#
+# The DB will be written inside this directory, with the filename specified
+# above using the 'dbfilename' configuration directive.
+#
+# The Append Only File will also be created inside this directory.
+#
+# Note that you must specify a directory here, not a file name.
+dir /var/lib/redis/
+
+################################# REPLICATION #################################
+
+# Master-Slave replication. Use slaveof to make a Redis instance a copy of
+# another Redis server. Note that the configuration is local to the slave
+# so for example it is possible to configure the slave to save the DB with a
+# different interval, or to listen to another port, and so on.
+#
+# slaveof
+
+# If the master is password protected (using the "requirepass" configuration
+# directive below) it is possible to tell the slave to authenticate before
+# starting the replication synchronization process, otherwise the master will
+# refuse the slave request.
+#
+# masterauth
+
+# When a slave loses its connection with the master, or when the replication
+# is still in progress, the slave can act in two different ways:
+#
+# 1) if slave-serve-stale-data is set to 'yes' (the default) the slave will
+# still reply to client requests, possibly with out of date data, or the
+# data set may just be empty if this is the first synchronization.
+#
+# 2) if slave-serve-stale-data is set to 'no' the slave will reply with
+# an error "SYNC with master in progress" to all the kind of commands
+# but to INFO and SLAVEOF.
+#
+slave-serve-stale-data yes
+
+# You can configure a slave instance to accept writes or not. Writing against
+# a slave instance may be useful to store some ephemeral data (because data
+# written on a slave will be easily deleted after resync with the master) but
+# may also cause problems if clients are writing to it because of a
+# misconfiguration.
+#
+# Since Redis 2.6 by default slaves are read-only.
+#
+# Note: read only slaves are not designed to be exposed to untrusted clients
+# on the internet. It's just a protection layer against misuse of the instance.
+# Still a read only slave exports by default all the administrative commands
+# such as CONFIG, DEBUG, and so forth. To a limited extent you can improve
+# security of read only slaves using 'rename-command' to shadow all the
+# administrative / dangerous commands.
+slave-read-only yes
+
+# Slaves send PINGs to server in a predefined interval. It's possible to change
+# this interval with the repl_ping_slave_period option. The default value is 10
+# seconds.
+#
+# repl-ping-slave-period 10
+
+# The following option sets the replication timeout for:
+#
+# 1) Bulk transfer I/O during SYNC, from the point of view of slave.
+# 2) Master timeout from the point of view of slaves (data, pings).
+# 3) Slave timeout from the point of view of masters (REPLCONF ACK pings).
+#
+# It is important to make sure that this value is greater than the value
+# specified for repl-ping-slave-period otherwise a timeout will be detected
+# every time there is low traffic between the master and the slave.
+#
+# repl-timeout 60
+
+# Disable TCP_NODELAY on the slave socket after SYNC?
+#
+# If you select "yes" Redis will use a smaller number of TCP packets and
+# less bandwidth to send data to slaves. But this can add a delay for
+# the data to appear on the slave side, up to 40 milliseconds with
+# Linux kernels using a default configuration.
+#
+# If you select "no" the delay for data to appear on the slave side will
+# be reduced but more bandwidth will be used for replication.
+#
+# By default we optimize for low latency, but in very high traffic conditions
+# or when the master and slaves are many hops away, turning this to "yes" may
+# be a good idea.
+repl-disable-tcp-nodelay no
+
+# Set the replication backlog size. The backlog is a buffer that accumulates
+# slave data when slaves are disconnected for some time, so that when a slave
+# wants to reconnect again, often a full resync is not needed, but a partial
+# resync is enough, just passing the portion of data the slave missed while
+# disconnected.
+#
+# The biggest the replication backlog, the longer the time the slave can be
+# disconnected and later be able to perform a partial resynchronization.
+#
+# The backlog is only allocated once there is at least a slave connected.
+#
+# repl-backlog-size 1mb
+
+# After a master has no longer connected slaves for some time, the backlog
+# will be freed. The following option configures the amount of seconds that
+# need to elapse, starting from the time the last slave disconnected, for
+# the backlog buffer to be freed.
+#
+# A value of 0 means to never release the backlog.
+#
+# repl-backlog-ttl 3600
+
+# The slave priority is an integer number published by Redis in the INFO output.
+# It is used by Redis Sentinel in order to select a slave to promote into a
+# master if the master is no longer working correctly.
+#
+# A slave with a low priority number is considered better for promotion, so
+# for instance if there are three slaves with priority 10, 100, 25 Sentinel will
+# pick the one with priority 10, that is the lowest.
+#
+# However a special priority of 0 marks the slave as not able to perform the
+# role of master, so a slave with priority of 0 will never be selected by
+# Redis Sentinel for promotion.
+#
+# By default the priority is 100.
+slave-priority 100
+
+# It is possible for a master to stop accepting writes if there are less than
+# N slaves connected, having a lag less or equal than M seconds.
+#
+# The N slaves need to be in "online" state.
+#
+# The lag in seconds, that must be <= the specified value, is calculated from
+# the last ping received from the slave, that is usually sent every second.
+#
+# This option does not GUARANTEES that N replicas will accept the write, but
+# will limit the window of exposure for lost writes in case not enough slaves
+# are available, to the specified number of seconds.
+#
+# For example to require at least 3 slaves with a lag <= 10 seconds use:
+#
+# min-slaves-to-write 3
+# min-slaves-max-lag 10
+#
+# Setting one or the other to 0 disables the feature.
+#
+# By default min-slaves-to-write is set to 0 (feature disabled) and
+# min-slaves-max-lag is set to 10.
+
+################################## SECURITY ###################################
+
+# Require clients to issue AUTH before processing any other
+# commands. This might be useful in environments in which you do not trust
+# others with access to the host running redis-server.
+#
+# This should stay commented out for backward compatibility and because most
+# people do not need auth (e.g. they run their own servers).
+#
+# Warning: since Redis is pretty fast an outside user can try up to
+# 150k passwords per second against a good box. This means that you should
+# use a very strong password otherwise it will be very easy to break.
+#
+# requirepass foobared
+
+# Command renaming.
+#
+# It is possible to change the name of dangerous commands in a shared
+# environment. For instance the CONFIG command may be renamed into something
+# hard to guess so that it will still be available for internal-use tools
+# but not available for general clients.
+#
+# Example:
+#
+# rename-command CONFIG b840fc02d524045429941cc15f59e41cb7be6c52
+#
+# It is also possible to completely kill a command by renaming it into
+# an empty string:
+#
+# rename-command CONFIG ""
+#
+# Please note that changing the name of commands that are logged into the
+# AOF file or transmitted to slaves may cause problems.
+
+################################### LIMITS ####################################
+
+# Set the max number of connected clients at the same time. By default
+# this limit is set to 10000 clients, however if the Redis server is not
+# able to configure the process file limit to allow for the specified limit
+# the max number of allowed clients is set to the current file limit
+# minus 32 (as Redis reserves a few file descriptors for internal uses).
+#
+# Once the limit is reached Redis will close all the new connections sending
+# an error 'max number of clients reached'.
+#
+# maxclients 10000
+
+# Don't use more memory than the specified amount of bytes.
+# When the memory limit is reached Redis will try to remove keys
+# according to the eviction policy selected (see maxmemory-policy).
+#
+# If Redis can't remove keys according to the policy, or if the policy is
+# set to 'noeviction', Redis will start to reply with errors to commands
+# that would use more memory, like SET, LPUSH, and so on, and will continue
+# to reply to read-only commands like GET.
+#
+# This option is usually useful when using Redis as an LRU cache, or to set
+# a hard memory limit for an instance (using the 'noeviction' policy).
+#
+# WARNING: If you have slaves attached to an instance with maxmemory on,
+# the size of the output buffers needed to feed the slaves are subtracted
+# from the used memory count, so that network problems / resyncs will
+# not trigger a loop where keys are evicted, and in turn the output
+# buffer of slaves is full with DELs of keys evicted triggering the deletion
+# of more keys, and so forth until the database is completely emptied.
+#
+# In short... if you have slaves attached it is suggested that you set a lower
+# limit for maxmemory so that there is some free RAM on the system for slave
+# output buffers (but this is not needed if the policy is 'noeviction').
+#
+# maxmemory
+
+# MAXMEMORY POLICY: how Redis will select what to remove when maxmemory
+# is reached. You can select among five behaviors:
+#
+# volatile-lru -> remove the key with an expire set using an LRU algorithm
+# allkeys-lru -> remove any key accordingly to the LRU algorithm
+# volatile-random -> remove a random key with an expire set
+# allkeys-random -> remove a random key, any key
+# volatile-ttl -> remove the key with the nearest expire time (minor TTL)
+# noeviction -> don't expire at all, just return an error on write operations
+#
+# Note: with any of the above policies, Redis will return an error on write
+# operations, when there are not suitable keys for eviction.
+#
+# At the date of writing this commands are: set setnx setex append
+# incr decr rpush lpush rpushx lpushx linsert lset rpoplpush sadd
+# sinter sinterstore sunion sunionstore sdiff sdiffstore zadd zincrby
+# zunionstore zinterstore hset hsetnx hmset hincrby incrby decrby
+# getset mset msetnx exec sort
+#
+# The default is:
+#
+# maxmemory-policy volatile-lru
+
+# LRU and minimal TTL algorithms are not precise algorithms but approximated
+# algorithms (in order to save memory), so you can select as well the sample
+# size to check. For instance for default Redis will check three keys and
+# pick the one that was used less recently, you can change the sample size
+# using the following configuration directive.
+#
+# maxmemory-samples 3
+
+############################## APPEND ONLY MODE ###############################
+
+# By default Redis asynchronously dumps the dataset on disk. This mode is
+# good enough in many applications, but an issue with the Redis process or
+# a power outage may result into a few minutes of writes lost (depending on
+# the configured save points).
+#
+# The Append Only File is an alternative persistence mode that provides
+# much better durability. For instance using the default data fsync policy
+# (see later in the config file) Redis can lose just one second of writes in a
+# dramatic event like a server power outage, or a single write if something
+# wrong with the Redis process itself happens, but the operating system is
+# still running correctly.
+#
+# AOF and RDB persistence can be enabled at the same time without problems.
+# If the AOF is enabled on startup Redis will load the AOF, that is the file
+# with the better durability guarantees.
+#
+# Please check http://redis.io/topics/persistence for more information.
+
+appendonly no
+
+# The name of the append only file (default: "appendonly.aof")
+
+appendfilename "appendonly.aof"
+
+# The fsync() call tells the Operating System to actually write data on disk
+# instead to wait for more data in the output buffer. Some OS will really flush
+# data on disk, some other OS will just try to do it ASAP.
+#
+# Redis supports three different modes:
+#
+# no: don't fsync, just let the OS flush the data when it wants. Faster.
+# always: fsync after every write to the append only log . Slow, Safest.
+# everysec: fsync only one time every second. Compromise.
+#
+# The default is "everysec", as that's usually the right compromise between
+# speed and data safety. It's up to you to understand if you can relax this to
+# "no" that will let the operating system flush the output buffer when
+# it wants, for better performances (but if you can live with the idea of
+# some data loss consider the default persistence mode that's snapshotting),
+# or on the contrary, use "always" that's very slow but a bit safer than
+# everysec.
+#
+# More details please check the following article:
+# http://antirez.com/post/redis-persistence-demystified.html
+#
+# If unsure, use "everysec".
+
+# appendfsync always
+# appendfsync everysec
+appendfsync no
+
+# When the AOF fsync policy is set to always or everysec, and a background
+# saving process (a background save or AOF log background rewriting) is
+# performing a lot of I/O against the disk, in some Linux configurations
+# Redis may block too long on the fsync() call. Note that there is no fix for
+# this currently, as even performing fsync in a different thread will block
+# our synchronous write(2) call.
+#
+# In order to mitigate this problem it's possible to use the following option
+# that will prevent fsync() from being called in the main process while a
+# BGSAVE or BGREWRITEAOF is in progress.
+#
+# This means that while another child is saving, the durability of Redis is
+# the same as "appendfsync none". In practical terms, this means that it is
+# possible to lose up to 30 seconds of log in the worst scenario (with the
+# default Linux settings).
+#
+# If you have latency problems turn this to "yes". Otherwise leave it as
+# "no" that is the safest pick from the point of view of durability.
+
+no-appendfsync-on-rewrite no
+
+# Automatic rewrite of the append only file.
+# Redis is able to automatically rewrite the log file implicitly calling
+# BGREWRITEAOF when the AOF log size grows by the specified percentage.
+#
+# This is how it works: Redis remembers the size of the AOF file after the
+# latest rewrite (if no rewrite has happened since the restart, the size of
+# the AOF at startup is used).
+#
+# This base size is compared to the current size. If the current size is
+# bigger than the specified percentage, the rewrite is triggered. Also
+# you need to specify a minimal size for the AOF file to be rewritten, this
+# is useful to avoid rewriting the AOF file even if the percentage increase
+# is reached but it is still pretty small.
+#
+# Specify a percentage of zero in order to disable the automatic AOF
+# rewrite feature.
+
+auto-aof-rewrite-percentage 100
+auto-aof-rewrite-min-size 64mb
+
+################################ LUA SCRIPTING ###############################
+
+# Max execution time of a Lua script in milliseconds.
+#
+# If the maximum execution time is reached Redis will log that a script is
+# still in execution after the maximum allowed time and will start to
+# reply to queries with an error.
+#
+# When a long running script exceed the maximum execution time only the
+# SCRIPT KILL and SHUTDOWN NOSAVE commands are available. The first can be
+# used to stop a script that did not yet called write commands. The second
+# is the only way to shut down the server in the case a write commands was
+# already issue by the script but the user don't want to wait for the natural
+# termination of the script.
+#
+# Set it to 0 or a negative value for unlimited execution without warnings.
+lua-time-limit 5000
+
+################################## SLOW LOG ###################################
+
+# The Redis Slow Log is a system to log queries that exceeded a specified
+# execution time. The execution time does not include the I/O operations
+# like talking with the client, sending the reply and so forth,
+# but just the time needed to actually execute the command (this is the only
+# stage of command execution where the thread is blocked and can not serve
+# other requests in the meantime).
+#
+# You can configure the slow log with two parameters: one tells Redis
+# what is the execution time, in microseconds, to exceed in order for the
+# command to get logged, and the other parameter is the length of the
+# slow log. When a new command is logged the oldest one is removed from the
+# queue of logged commands.
+
+# The following time is expressed in microseconds, so 1000000 is equivalent
+# to one second. Note that a negative number disables the slow log, while
+# a value of zero forces the logging of every command.
+slowlog-log-slower-than 10000
+
+# There is no limit to this length. Just be aware that it will consume memory.
+# You can reclaim memory used by the slow log with SLOWLOG RESET.
+slowlog-max-len 128
+
+################################ LATENCY MONITOR ##############################
+
+# The Redis latency monitoring subsystem samples different operations
+# at runtime in order to collect data related to possible sources of
+# latency of a Redis instance.
+#
+# Via the LATENCY command this information is available to the user that can
+# print graphs and obtain reports.
+#
+# The system only logs operations that were performed in a time equal or
+# greater than the amount of milliseconds specified via the
+# latency-monitor-threshold configuration directive. When its value is set
+# to zero, the latency monitor is turned off.
+#
+# By default latency monitoring is disabled since it is mostly not needed
+# if you don't have latency issues, and collecting data has a performance
+# impact, that while very small, can be measured under big load. Latency
+# monitoring can easily be enalbed at runtime using the command
+# "CONFIG SET latency-monitor-threshold " if needed.
+latency-monitor-threshold 0
+
+############################# Event notification ##############################
+
+# Redis can notify Pub/Sub clients about events happening in the key space.
+# This feature is documented at http://redis.io/topics/keyspace-events
+#
+# For instance if keyspace events notification is enabled, and a client
+# performs a DEL operation on key "foo" stored in the Database 0, two
+# messages will be published via Pub/Sub:
+#
+# PUBLISH __keyspace@0__:foo del
+# PUBLISH __keyevent@0__:del foo
+#
+# It is possible to select the events that Redis will notify among a set
+# of classes. Every class is identified by a single character:
+#
+# K Keyspace events, published with __keyspace@__ prefix.
+# E Keyevent events, published with __keyevent@__ prefix.
+# g Generic commands (non-type specific) like DEL, EXPIRE, RENAME, ...
+# $ String commands
+# l List commands
+# s Set commands
+# h Hash commands
+# z Sorted set commands
+# x Expired events (events generated every time a key expires)
+# e Evicted events (events generated when a key is evicted for maxmemory)
+# A Alias for g$lshzxe, so that the "AKE" string means all the events.
+#
+# The "notify-keyspace-events" takes as argument a string that is composed
+# by zero or multiple characters. The empty string means that notifications
+# are disabled at all.
+#
+# Example: to enable list and generic events, from the point of view of the
+# event name, use:
+#
+# notify-keyspace-events Elg
+#
+# Example 2: to get the stream of the expired keys subscribing to channel
+# name __keyevent@0__:expired use:
+#
+# notify-keyspace-events Ex
+#
+# By default all notifications are disabled because most users don't need
+# this feature and the feature has some overhead. Note that if you don't
+# specify at least one of K or E, no events will be delivered.
+notify-keyspace-events ""
+
+############################### ADVANCED CONFIG ###############################
+
+# Hashes are encoded using a memory efficient data structure when they have a
+# small number of entries, and the biggest entry does not exceed a given
+# threshold. These thresholds can be configured using the following directives.
+hash-max-ziplist-entries 512
+hash-max-ziplist-value 64
+
+# Similarly to hashes, small lists are also encoded in a special way in order
+# to save a lot of space. The special representation is only used when
+# you are under the following limits:
+list-max-ziplist-entries 512
+list-max-ziplist-value 64
+
+# Sets have a special encoding in just one case: when a set is composed
+# of just strings that happens to be integers in radix 10 in the range
+# of 64 bit signed integers.
+# The following configuration setting sets the limit in the size of the
+# set in order to use this special memory saving encoding.
+set-max-intset-entries 512
+
+# Similarly to hashes and lists, sorted sets are also specially encoded in
+# order to save a lot of space. This encoding is only used when the length and
+# elements of a sorted set are below the following limits:
+zset-max-ziplist-entries 128
+zset-max-ziplist-value 64
+
+# HyperLogLog sparse representation bytes limit. The limit includes the
+# 16 bytes header. When an HyperLogLog using the sparse representation crosses
+# this limit, it is converted into the dense representation.
+#
+# A value greater than 16000 is totally useless, since at that point the
+# dense representation is more memory efficient.
+#
+# The suggested value is ~ 3000 in order to have the benefits of
+# the space efficient encoding without slowing down too much PFADD,
+# which is O(N) with the sparse encoding. The value can be raised to
+# ~ 10000 when CPU is not a concern, but space is, and the data set is
+# composed of many HyperLogLogs with cardinality in the 0 - 15000 range.
+hll-sparse-max-bytes 3000
+
+# Active rehashing uses 1 millisecond every 100 milliseconds of CPU time in
+# order to help rehashing the main Redis hash table (the one mapping top-level
+# keys to values). The hash table implementation Redis uses (see dict.c)
+# performs a lazy rehashing: the more operation you run into a hash table
+# that is rehashing, the more rehashing "steps" are performed, so if the
+# server is idle the rehashing is never complete and some more memory is used
+# by the hash table.
+#
+# The default is to use this millisecond 10 times every second in order to
+# active rehashing the main dictionaries, freeing memory when possible.
+#
+# If unsure:
+# use "activerehashing no" if you have hard latency requirements and it is
+# not a good thing in your environment that Redis can reply form time to time
+# to queries with 2 milliseconds delay.
+#
+# use "activerehashing yes" if you don't have such hard requirements but
+# want to free memory asap when possible.
+activerehashing no
+
+# The client output buffer limits can be used to force disconnection of clients
+# that are not reading data from the server fast enough for some reason (a
+# common reason is that a Pub/Sub client can't consume messages as fast as the
+# publisher can produce them).
+#
+# The limit can be set differently for the three different classes of clients:
+#
+# normal -> normal clients including MONITOR clients
+# slave -> slave clients
+# pubsub -> clients subscribed to at least one pubsub channel or pattern
+#
+# The syntax of every client-output-buffer-limit directive is the following:
+#
+# client-output-buffer-limit
+#
+# A client is immediately disconnected once the hard limit is reached, or if
+# the soft limit is reached and remains reached for the specified number of
+# seconds (continuously).
+# So for instance if the hard limit is 32 megabytes and the soft limit is
+# 16 megabytes / 10 seconds, the client will get disconnected immediately
+# if the size of the output buffers reach 32 megabytes, but will also get
+# disconnected if the client reaches 16 megabytes and continuously overcomes
+# the limit for 10 seconds.
+#
+# By default normal clients are not limited because they don't receive data
+# without asking (in a push way), but just after a request, so only
+# asynchronous clients may create a scenario where data is requested faster
+# than it can read.
+#
+# Instead there is a default limit for pubsub and slave clients, since
+# subscribers and slaves receive data in a push fashion.
+#
+# Both the hard or the soft limit can be disabled by setting them to zero.
+client-output-buffer-limit normal 0 0 0
+client-output-buffer-limit slave 256mb 64mb 60
+client-output-buffer-limit pubsub 32mb 8mb 60
+
+# Redis calls an internal function to perform many background tasks, like
+# closing connections of clients in timeout, purging expired keys that are
+# never requested, and so forth.
+#
+# Not all tasks are performed with the same frequency, but Redis checks for
+# tasks to perform accordingly to the specified "hz" value.
+#
+# By default "hz" is set to 10. Raising the value will use more CPU when
+# Redis is idle, but at the same time will make Redis more responsive when
+# there are many keys expiring at the same time, and timeouts may be
+# handled with more precision.
+#
+# The range is between 1 and 500, however a value over 100 is usually not
+# a good idea. Most users should use the default of 10 and raise this up to
+# 100 only in environments where very low latency is required.
+hz 5
+
+# When a child rewrites the AOF file, if the following option is enabled
+# the file will be fsync-ed every 32 MB of data generated. This is useful
+# in order to commit the file to the disk more incrementally and avoid
+# big latency spikes.
+aof-rewrite-incremental-fsync yes
+
diff --git a/app/config/_os/etc/samba/smb-dev.conf b/app/config/_os/etc/samba/smb-dev.conf
index 2076a7dd..fafc1dfc 100644
--- a/app/config/_os/etc/samba/smb-dev.conf
+++ b/app/config/_os/etc/samba/smb-dev.conf
@@ -1,54 +1,54 @@
-#======================= Global Settings =======================
-
-[global]
-
- workgroup = RUNENET
- server string = RuneAudio Player
- dns proxy = no
- log level = 0
- syslog = 0
- security = share
- guest account = root
- map to guest = bad user
- load printers = no
- domain master = no
- local master = no
- preferred master = no
-
-
-#======================= Share Definitions =======================
-
- directory mask = 0775
- create mask = 0775
-
-[music_store]
- comment = Music Datastore root (/mnt/MPD)
- path = /mnt/MPD/
- read only = no
- public = yes
- follow symlinks = yes
- wide links = yes
-
-[mpd]
- comment = MPD directory (/var/lib/mpd/)
- path = /var/lib/mpd/
- read only = no
- public = yes
- follow symlinks = yes
- wide links = yes
-
-[www]
- comment = RuneAudio webroot (/var/www/)
- path = /var/www/
- read only = no
- public = yes
- follow symlinks = yes
- wide links = yes
-
-[etc]
- comment = RuneAudio sys config dir (/etc)
- path = /etc/
- read only = no
- public = yes
- follow symlinks = yes
- wide links = yes
+#======================= Global Settings =======================
+
+[global]
+
+ workgroup = RUNENET
+ server string = RuneAudio Player
+ dns proxy = no
+ log level = 0
+ syslog = 0
+ security = share
+ guest account = root
+ map to guest = bad user
+ load printers = no
+ domain master = no
+ local master = no
+ preferred master = no
+
+
+#======================= Share Definitions =======================
+
+ directory mask = 0775
+ create mask = 0775
+
+[music_store]
+ comment = Music Datastore root (/mnt/MPD)
+ path = /mnt/MPD/
+ read only = no
+ public = yes
+ follow symlinks = yes
+ wide links = yes
+
+[mpd]
+ comment = MPD directory (/var/lib/mpd/)
+ path = /var/lib/mpd/
+ read only = no
+ public = yes
+ follow symlinks = yes
+ wide links = yes
+
+[www]
+ comment = RuneAudio webroot (/var/www/)
+ path = /var/www/
+ read only = no
+ public = yes
+ follow symlinks = yes
+ wide links = yes
+
+[etc]
+ comment = RuneAudio sys config dir (/etc)
+ path = /etc/
+ read only = no
+ public = yes
+ follow symlinks = yes
+ wide links = yes
diff --git a/app/config/_os/etc/samba/smb-prod.conf b/app/config/_os/etc/samba/smb-prod.conf
index b79d8d62..9d3d2f37 100644
--- a/app/config/_os/etc/samba/smb-prod.conf
+++ b/app/config/_os/etc/samba/smb-prod.conf
@@ -1,31 +1,31 @@
-#======================= Global Settings =======================
-
-[global]
-
- workgroup = RUNENET
- server string = RuneAudio Player
- dns proxy = no
- log level = 0
- syslog = 0
- security = share
- guest account = root
- map to guest = bad user
- #map untrusted to domain = yes
- load printers = no
- domain master = no
- local master = no
- preferred master = no
-
-
-#======================= Share Definitions =======================
-
- directory mask = 0775
- create mask = 0775
-
-[MPD]
- comment = MPD root (/mnt/MPD)
- path = /mnt/MPD/
- read only = no
- public = yes
- follow symlinks = yes
- wide links = yes
+#======================= Global Settings =======================
+
+[global]
+
+ workgroup = RUNENET
+ server string = RuneAudio Player
+ dns proxy = no
+ log level = 0
+ syslog = 0
+ security = share
+ guest account = root
+ map to guest = bad user
+ #map untrusted to domain = yes
+ load printers = no
+ domain master = no
+ local master = no
+ preferred master = no
+
+
+#======================= Share Definitions =======================
+
+ directory mask = 0775
+ create mask = 0775
+
+[MPD]
+ comment = MPD root (/mnt/MPD)
+ path = /mnt/MPD/
+ read only = no
+ public = yes
+ follow symlinks = yes
+ wide links = yes
diff --git a/app/config/_os/etc/samba/smb.conf b/app/config/_os/etc/samba/smb.conf
index d73dcec5..7b7876c0 100644
--- a/app/config/_os/etc/samba/smb.conf
+++ b/app/config/_os/etc/samba/smb.conf
@@ -1,54 +1,54 @@
-#======================= Global Settings =======================
-
-[global]
-
- workgroup = RUNENET
- server string = RuneAudio Player
- dns proxy = no
- log level = 0
- syslog = 0
- security = share
- guest account = root
- map to guest = bad user
- load printers = no
- domain master = no
- local master = no
- preferred master = no
-
-
-#======================= Share Definitions =======================
-
- directory mask = 0775
- create mask = 0775
-
-[mounts]
- comment = mount root (/mnt/)
- path = /mnt/
- read only = no
- public = yes
- follow symlinks = yes
- wide links = yes
-
-[mpd]
- comment = MPD directory (/var/lib/mpd/)
- path = /var/lib/mpd/
- read only = no
- public = yes
- follow symlinks = yes
- wide links = yes
-
-[www]
- comment = RuneAudio webroot (/var/www/)
- path = /var/www/
- read only = no
- public = yes
- follow symlinks = yes
- wide links = yes
-
-[etc]
- comment = RuneAudio sys config dir (/etc)
- path = /etc/
- read only = no
- public = yes
- follow symlinks = yes
- wide links = yes
+#======================= Global Settings =======================
+
+[global]
+
+ workgroup = RUNENET
+ server string = RuneAudio Player
+ dns proxy = no
+ log level = 0
+ syslog = 0
+ security = share
+ guest account = root
+ map to guest = bad user
+ load printers = no
+ domain master = no
+ local master = no
+ preferred master = no
+
+
+#======================= Share Definitions =======================
+
+ directory mask = 0775
+ create mask = 0775
+
+[mounts]
+ comment = mount root (/mnt/)
+ path = /mnt/
+ read only = no
+ public = yes
+ follow symlinks = yes
+ wide links = yes
+
+[mpd]
+ comment = MPD directory (/var/lib/mpd/)
+ path = /var/lib/mpd/
+ read only = no
+ public = yes
+ follow symlinks = yes
+ wide links = yes
+
+[www]
+ comment = RuneAudio webroot (/var/www/)
+ path = /var/www/
+ read only = no
+ public = yes
+ follow symlinks = yes
+ wide links = yes
+
+[etc]
+ comment = RuneAudio sys config dir (/etc)
+ path = /etc/
+ read only = no
+ public = yes
+ follow symlinks = yes
+ wide links = yes
diff --git a/app/config/_os/etc/security/limits.conf b/app/config/_os/etc/security/limits.conf
index bf1f80c4..cd00862a 100644
--- a/app/config/_os/etc/security/limits.conf
+++ b/app/config/_os/etc/security/limits.conf
@@ -1,57 +1,57 @@
-# /etc/security/limits.conf
-#
-#Each line describes a limit for a user in the form:
-#
-#
-#
-#Where:
-# can be:
-# - a user name
-# - a group name, with @group syntax
-# - the wildcard *, for default entry
-# - the wildcard %, can be also used with %group syntax,
-# for maxlogin limit
-#
-# can have the two values:
-# - "soft" for enforcing the soft limits
-# - "hard" for enforcing hard limits
-#
-# can be one of the following:
-# - core - limits the core file size (KB)
-# - data - max data size (KB)
-# - fsize - maximum filesize (KB)
-# - memlock - max locked-in-memory address space (KB)
-# - nofile - max number of open files
-# - rss - max resident set size (KB)
-# - stack - max stack size (KB)
-# - cpu - max CPU time (MIN)
-# - nproc - max number of processes
-# - as - address space limit (KB)
-# - maxlogins - max number of logins for this user
-# - maxsyslogins - max number of logins on the system
-# - priority - the priority to run user process with
-# - locks - max number of file locks the user can hold
-# - sigpending - max number of pending signals
-# - msgqueue - max memory used by POSIX message queues (bytes)
-# - nice - max nice priority allowed to raise to values: [-20, 19]
-# - rtprio - max realtime priority
-#
-#
-#
-
-#* soft core 0
-#* hard rss 10000
-#@student hard nproc 20
-#@faculty soft nproc 20
-#@faculty hard nproc 50
-#ftp hard nproc 0
-#@student - maxlogins 4
-
-
-* - rtprio 0
-* - nice 0
-#@audio - rtprio 65
-@audio - rtprio 99
-@audio - nice -10
-#@audio - memlock 40000
+# /etc/security/limits.conf
+#
+#Each line describes a limit for a user in the form:
+#
+#
+#
+#Where:
+# can be:
+# - a user name
+# - a group name, with @group syntax
+# - the wildcard *, for default entry
+# - the wildcard %, can be also used with %group syntax,
+# for maxlogin limit
+#
+# can have the two values:
+# - "soft" for enforcing the soft limits
+# - "hard" for enforcing hard limits
+#
+# can be one of the following:
+# - core - limits the core file size (KB)
+# - data - max data size (KB)
+# - fsize - maximum filesize (KB)
+# - memlock - max locked-in-memory address space (KB)
+# - nofile - max number of open files
+# - rss - max resident set size (KB)
+# - stack - max stack size (KB)
+# - cpu - max CPU time (MIN)
+# - nproc - max number of processes
+# - as - address space limit (KB)
+# - maxlogins - max number of logins for this user
+# - maxsyslogins - max number of logins on the system
+# - priority - the priority to run user process with
+# - locks - max number of file locks the user can hold
+# - sigpending - max number of pending signals
+# - msgqueue - max memory used by POSIX message queues (bytes)
+# - nice - max nice priority allowed to raise to values: [-20, 19]
+# - rtprio - max realtime priority
+#
+#
+#
+
+#* soft core 0
+#* hard rss 10000
+#@student hard nproc 20
+#@faculty soft nproc 20
+#@faculty hard nproc 50
+#ftp hard nproc 0
+#@student - maxlogins 4
+
+
+* - rtprio 0
+* - nice 0
+#@audio - rtprio 65
+@audio - rtprio 99
+@audio - nice -10
+#@audio - memlock 40000
@audio - memlock unlimited
\ No newline at end of file
diff --git a/app/config/_os/etc/sysctl.d/20-quiet-printk.conf b/app/config/_os/etc/sysctl.d/20-quiet-printk.conf
index 47146d2a..fd7f54ec 100644
--- a/app/config/_os/etc/sysctl.d/20-quiet-printk.conf
+++ b/app/config/_os/etc/sysctl.d/20-quiet-printk.conf
@@ -1 +1 @@
-kernel.printk = 3 3 3 3
+kernel.printk = 3 3 3 3
diff --git a/app/config/_os/etc/sysctl.d/raspberrypi.conf b/app/config/_os/etc/sysctl.d/raspberrypi.conf
index b892ead2..9a628d02 100644
--- a/app/config/_os/etc/sysctl.d/raspberrypi.conf
+++ b/app/config/_os/etc/sysctl.d/raspberrypi.conf
@@ -1,13 +1,13 @@
-vm.min_free_kbytes=32768
-vm.vfs_cache_pressure = 300
-net.core.rmem_max=12582912
-net.core.wmem_max=12582912
-net.ipv4.tcp_rmem= 10240 87380 12582912
-net.ipv4.tcp_wmem= 10240 87380 12582912
-net.ipv4.tcp_timestamps = 0
-net.ipv4.tcp_window_scaling = 1
-net.ipv4.tcp_sack = 0
-net.ipv4.tcp_no_metrics_save = 1
-net.core.netdev_max_backlog = 5000
-#vm.overcommit_memory = 2
-#vm.overcommit_ratio = 50
+vm.min_free_kbytes=32768
+vm.vfs_cache_pressure = 300
+net.core.rmem_max=12582912
+net.core.wmem_max=12582912
+net.ipv4.tcp_rmem= 10240 87380 12582912
+net.ipv4.tcp_wmem= 10240 87380 12582912
+net.ipv4.tcp_timestamps = 0
+net.ipv4.tcp_window_scaling = 1
+net.ipv4.tcp_sack = 0
+net.ipv4.tcp_no_metrics_save = 1
+net.core.netdev_max_backlog = 5000
+#vm.overcommit_memory = 2
+#vm.overcommit_ratio = 50
diff --git a/app/config/_os/etc/systemd/coredump.conf b/app/config/_os/etc/systemd/coredump.conf
index 46715dcd..eb8e88fe 100644
--- a/app/config/_os/etc/systemd/coredump.conf
+++ b/app/config/_os/etc/systemd/coredump.conf
@@ -1,17 +1,17 @@
-# This file is part of systemd.
-#
-# systemd is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation; either version 2.1 of the License, or
-# (at your option) any later version.
-#
-# See coredump.conf(5) for details
-
-[Coredump]
-Storage=none
-#Compress=yes
-#ProcessSizeMax=2G
-#ExternalSizeMax=2G
-#JournalSizeMax=767M
-#MaxUse=
-#KeepFree=
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# See coredump.conf(5) for details
+
+[Coredump]
+Storage=none
+#Compress=yes
+#ProcessSizeMax=2G
+#ExternalSizeMax=2G
+#JournalSizeMax=767M
+#MaxUse=
+#KeepFree=
diff --git a/app/config/_os/etc/systemd/journald.conf b/app/config/_os/etc/systemd/journald.conf
index 72129ef0..01c7ed76 100644
--- a/app/config/_os/etc/systemd/journald.conf
+++ b/app/config/_os/etc/systemd/journald.conf
@@ -1,35 +1,35 @@
-# This file is part of systemd.
-#
-# systemd is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation; either version 2.1 of the License, or
-# (at your option) any later version.
-#
-# See journald.conf(5) for details
-
-[Journal]
-Storage=none
-#Compress=yes
-#Seal=yes
-#SplitMode=uid
-#SyncIntervalSec=5m
-#RateLimitInterval=30s
-#RateLimitBurst=1000
-#SystemMaxUse=
-#SystemKeepFree=
-#SystemMaxFileSize=
-#RuntimeMaxUse=
-#RuntimeKeepFree=
-#RuntimeMaxFileSize=
-#MaxRetentionSec=
-#MaxFileSec=1month
-#ForwardToSyslog=yes
-#ForwardToKMsg=no
-#ForwardToConsole=no
-#ForwardToWall=yes
-#TTYPath=/dev/console
-#MaxLevelStore=debug
-#MaxLevelSyslog=debug
-#MaxLevelKMsg=notice
-#MaxLevelConsole=info
-#MaxLevelWall=emerg
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# See journald.conf(5) for details
+
+[Journal]
+Storage=none
+#Compress=yes
+#Seal=yes
+#SplitMode=uid
+#SyncIntervalSec=5m
+#RateLimitInterval=30s
+#RateLimitBurst=1000
+#SystemMaxUse=
+#SystemKeepFree=
+#SystemMaxFileSize=
+#RuntimeMaxUse=
+#RuntimeKeepFree=
+#RuntimeMaxFileSize=
+#MaxRetentionSec=
+#MaxFileSec=1month
+#ForwardToSyslog=yes
+#ForwardToKMsg=no
+#ForwardToConsole=no
+#ForwardToWall=yes
+#TTYPath=/dev/console
+#MaxLevelStore=debug
+#MaxLevelSyslog=debug
+#MaxLevelKMsg=notice
+#MaxLevelConsole=info
+#MaxLevelWall=emerg
diff --git a/app/config/_os/etc/tmpfiles.d/shairport.conf b/app/config/_os/etc/tmpfiles.d/shairport.conf
new file mode 100644
index 00000000..24a499c2
--- /dev/null
+++ b/app/config/_os/etc/tmpfiles.d/shairport.conf
@@ -0,0 +1 @@
+d /run/shairport 0777 root root
diff --git a/app/config/_os/etc/udev/rules.d/60-schedulers.rules b/app/config/_os/etc/udev/rules.d/60-schedulers.rules
index d44036cf..c965dd65 100644
--- a/app/config/_os/etc/udev/rules.d/60-schedulers.rules
+++ b/app/config/_os/etc/udev/rules.d/60-schedulers.rules
@@ -1,2 +1,2 @@
-# set deadline scheduler for non-rotating disks
-ACTION=="add|change", KERNEL=="mmcblk[0-9]", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="noop"
+# set deadline scheduler for non-rotating disks
+ACTION=="add|change", KERNEL=="mmcblk[0-9]", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="noop"
diff --git a/app/config/_os/etc/udev/rules.d/rune_usb-audio.rules b/app/config/_os/etc/udev/rules.d/rune_usb-audio.rules
index fea6dc00..1661b819 100644
--- a/app/config/_os/etc/udev/rules.d/rune_usb-audio.rules
+++ b/app/config/_os/etc/udev/rules.d/rune_usb-audio.rules
@@ -1,2 +1,2 @@
-#KERNEL=="card*", DRIVER=="snd-usb-audio", RUN+="/var/www/command/refresh_ao"
-KERNEL=="card*", SUBSYSTEM=="sound", RUN+="/var/www/command/refresh_ao"
+#KERNEL=="card*", DRIVER=="snd-usb-audio", RUN+="/var/www/command/refresh_ao"
+KERNEL=="card*", SUBSYSTEM=="sound", RUN+="/var/www/command/refresh_ao"
diff --git a/app/config/_os/etc/udev/rules.d/rune_usb-stor.rules b/app/config/_os/etc/udev/rules.d/rune_usb-stor.rules
index 076b61be..3fa7a97d 100644
--- a/app/config/_os/etc/udev/rules.d/rune_usb-stor.rules
+++ b/app/config/_os/etc/udev/rules.d/rune_usb-stor.rules
@@ -1,3 +1,3 @@
-#KERNEL=="sd*", SUBSYSTEM="usb", RUN+="/var/www/command/ui_notify.php 'Usb Storage' event simplemessage"
-KERNEL=="sd?1", ACTION=="add", RUN+="/var/www/command/ui_notify.php 'Usb Storage' connected simplemessage"
-KERNEL=="sd?1", ACTION=="remove", RUN+="/var/www/command/ui_notify.php 'Usb Storage' disconnected simplemessage"
+#KERNEL=="sd*", SUBSYSTEM="usb", RUN+="/var/www/command/ui_notify.php 'Usb Storage' event simplemessage"
+KERNEL=="sd?1", ACTION=="add", RUN+="/var/www/command/ui_notify.php 'Usb Storage' connected simplemessage"
+KERNEL=="sd?1", ACTION=="remove", RUN+="/var/www/command/ui_notify.php 'Usb Storage' disconnected simplemessage"
diff --git a/app/config/_os/etc/udevil/udevil.conf b/app/config/_os/etc/udevil/udevil.conf
index 2a2010f7..880f07c1 100644
--- a/app/config/_os/etc/udevil/udevil.conf
+++ b/app/config/_os/etc/udevil/udevil.conf
@@ -1,331 +1,331 @@
-##############################################################################
-#
-# udevil configuration file /etc/udevil/udevil.conf
-#
-# This file controls what devices, networks, and files users may mount and
-# unmount via udevil (set suid).
-#
-# IMPORTANT: IT IS POSSIBLE TO CREATE SERIOUS SECURITY PROBLEMS IF THIS FILE
-# IS MISCONFIGURED - EDIT WITH CARE
-#
-# Note: For greater control for specific users, including root, copy this
-# file to /etc/udevil/udevil-user-USERNAME.conf replacing USERNAME with the
-# desired username (eg /etc/udevil/udevil-user-jim.conf).
-#
-# Format:
-# OPTION = VALUE[, VALUE, ...]
-#
-# DO NOT USE QUOTES except literally
-# Lines beginning with # are ignored
-#
-##############################################################################
-
-
-# To log all uses of udevil, set log_file to a file path:
-# log_file = /var/log/udevil.log
-
-# Approximate number of days to retain log entries (0=forever, max=60):
-log_keep_days = 1
-
-
-# allowed_types determines what fstypes can be passed by a user to the u/mount
-# program, what device filesystems may be un/mounted implicitly, and what
-# network filesystems may be un/mounted.
-# It may also include the 'file' keyword, indicating that the user is allowed
-# to mount files (eg an ISO file). The $KNOWN_FILESYSTEMS variable may
-# be included to include common local filesystems as well as those listed in
-# /etc/filesystems and /proc/filesystems.
-# allowed_types_USERNAME, if present, is used to override allowed_types for
-# the specific user 'USERNAME'. For example, to allow user 'jim' to mount
-# only vfat filesystems, add:
-# allowed_types_jim = vfat
-# Setting allowed_types = * does NOT allow all types, as this is a security
-# risk, but does allow all recognized types.
-# allowed_types = $KNOWN_FILESYSTEMS, file, cifs, smbfs, nfs, curlftpfs, ftpfs, sshfs, davfs, tmpfs, ramfs
-allowed_types = $KNOWN_FILESYSTEMS, file, hfsplus
-
-
-# allowed_users is a list of users permitted to mount and unmount with udevil.
-# Wildcards (* or ?) may be used in the usernames. To allow all users,
-# specify "allowed_users=*". UIDs may be included using the form UID=1000.
-# For example: allowed_users = carl, UID=1000, pre*
-# Also note that permission to execute udevil may be limited to users belonging
-# to the group that owns /usr/bin/udevil, such as 'plugdev' or 'storage',
-# depending on installation.
-# allowed_users_FSTYPE, if present, is used to override allowed_users when
-# mounting or unmounting a specific fstype (eg nfs, ext3, file).
-# Note that when mounting a file, fstype will always be 'file' regardless of
-# the internal fstype of the file.
-# For example, to allow only user 'bob' to mount nfs shares, add:
-# allowed_users_nfs = bob
-# The root user is NOT automatically allowed to use udevil in some cases unless
-# listed here (except for unmounting anything or mounting fstab devices).
-allowed_users = *
-
-
-# allowed_groups is a list of groups permitted to mount and unmount with
-# udevil. The user MUST belong to at least one of these groups. Wildcards
-# or GIDs may NOT be used in group names, but a single * may be used to allow
-# all groups.
-# Also note that permission to execute udevil may be limited to users belonging
-# to the group that owns /usr/bin/udevil, such as 'plugdev' or 'storage',
-# depending on installation.
-# allowed_groups_FSTYPE, if present, is used to override allowed_groups when
-# mounting or unmounting a specific fstype (eg nfs, ext3, file). For example,
-# to allow only members of the 'network' group to mount smb and nfs shares,
-# use both of these lines:
-# allowed_groups_smbfs = network
-# allowed_groups_nfs = network
-# The root user is NOT automatically allowed to use udevil in some cases unless
-# listed here (except for unmounting anything or mounting fstab devices).
-allowed_groups = *
-
-
-# allowed_media_dirs specifies the media directories in which user mount points
-# may be located. The first directory which exists and does not contain a
-# wildcard will be used as the default media directory (normally /media or
-# /run/media/$USER).
-# The $USER variable, if included, will be replaced with the username of the
-# user running udevil. Wildcards may also be used in any directory EXCEPT the
-# default. Wildcards will not match a /
-# allowed_media_dirs_FSTYPE, if present, is used to override allowed_media_dirs
-# when mounting or unmounting a specific fstype (eg ext2, nfs). For example,
-# to cause /media/network to be used as the default media directory for
-# nfs and ftpfs mounts, use these two lines:
-# allowed_media_dirs_nfs = /media/network, /media, /run/media/$USER
-# allowed_media_dirs_ftpfs = /media/network, /media, /run/media/$USER
-# NOTE: If you want only the user who mounted a device to have access to it
-# and be allowed to unmount it, specify /run/media/$USER as the first
-# allowed media directory.
-# IMPORTANT: If an allowed file is mounted to a media directory, the user may
-# be permitted to unmount its associated loop device even though internal.
-# INCLUDING /MNT HERE IS NOT RECOMMENDED. ALL ALLOWED MEDIA DIRECTORIES
-# SHOULD BE OWNED AND WRITABLE ONLY BY ROOT.
-allowed_media_dirs = /mnt/MPD/USB
-
-
-# allowed_devices is the first criteria for what block devices users may mount
-# or unmount. If a device is not listed in allowed_devices, it cannot be
-# un/mounted (unless in fstab). However, even if a device is listed, other
-# factors may prevent its use. For example, access to system internal devices
-# will be denied to normal users even if they are included in allowed_devices.
-# allowed_devices_FSTYPE, if present, is used to override allowed_devices when
-# mounting or unmounting a specific fstype (eg ext3, ntfs). For example, to
-# prevent all block devices containing an ext4 filesystem from being
-# un/mounted use:
-# allowed_devices_ext4 =
-# Note: Wildcards may be used, but a wildcard will never match a /, except
-# for "allowed_devices=*" which allows any device. The recommended setting is
-# allowed_devices = /dev/*
-# WARNING: ALLOWING USERS TO MOUNT DEVICES OUTSIDE OF /dev CAN CAUSE SERIOUS
-# SECURITY PROBLEMS. DO NOT ALLOW DEVICES IN /dev/shm
-allowed_devices = /dev/*
-
-
-# allowed_internal_devices causes udevil to treat any listed block devices as
-# removable, thus allowing normal users to un/mount them (providing they are
-# also listed in allowed_devices).
-# allowed_internal_devices_FSTYPE, if present, is used to override
-# allowed_internal_devices when mounting or unmounting a specific fstype
-# (eg ext3, ntfs). For example, to allow block devices containing a vfat
-# filesystem to be un/mounted even if they are system internal devices, use:
-# allowed_internal_devices_vfat = /dev/sdb*
-# Some removable esata drives look like internal drives to udevil. To avoid
-# this problem, they can be treated as removable with this setting.
-# WARNING: SETTING A SYSTEM DEVICE HERE CAN CAUSE SERIOUS SECURITY PROBLEMS.
-# allowed_internal_devices =
-
-
-# allowed_internal_uuids and allowed_internal_uuids_FSTYPE work similarly to
-# allowed_internal_devices, except that UUIDs are specified instead of devices.
-# For example, to allow un/mounting of an internal filesystem based on UUID:
-# allowed_internal_uuids = cc0c4489-8def-1e5b-a304-ab87c3cb626c0
-# WARNING: SETTING A SYSTEM DEVICE HERE CAN CAUSE SERIOUS SECURITY PROBLEMS.
-# allowed_internal_uuids =
-
-
-# forbidden_devices is used to prevent block devices from being un/mounted
-# even if other settings would allow them (except devices in fstab).
-# forbidden_devices_FSTYPE, if present, is used to override
-# forbidden_devices when mounting or unmounting a specific fstype
-# (eg ext3, ntfs). For example, to prevent device /dev/sdd1 from being
-# mounted when it contains an ntfs filesystem, use:
-# forbidden_devices_ntfs = /dev/sdd1
-# NOTE: device node paths are canonicalized before being tested, so forbidding
-# a link to a device will have no effect.
-forbidden_devices =
-
-# allowed_networks determines what hosts may be un/mounted by udevil users when
-# using nfs, cifs, smbfs, curlftpfs, ftpfs, or sshfs. Hosts may be specified
-# using a hostname (eg myserver.com) or IP address (192.168.1.100).
-# Wildcards may be used in hostnames and IP addresses, but CIDR notation
-# (192.168.1.0/16) is NOT supported. IP v6 is supported. For example:
-# allowed_networks = 127.0.0.1, 192.168.1.*, 10.0.0.*, localmachine, *.okay.com
-# Or, to prevent un/mounting of any network shares, set:
-# allowed_networks =
-# allowed_networks_FSTYPE, if present, is used to override allowed_networks
-# when mounting or unmounting a specific network fstype (eg nfs, cifs, sshfs,
-# curlftpfs). For example, to limit nfs and samba shares to only local
-# networks, use these two lines:
-# allowed_networks_nfs = 192.168.1.*, 10.0.0.*
-# allowed_networks_cifs = 192.168.1.*, 10.0.0.*
-#allowed_networks = *
-
-
-# forbidden_networks and forbidden_networks_FSTYPE are used to specify networks
-# that are never allowed, even if other settings allow them (except fstab).
-# NO REVERSE LOOKUP IS PERFORMED, so including bad.com will only have an effect
-# if the user uses that hostname. IP lookup is always performed, so forbidding
-# an IP address will also forbid all corresponding hostnames.
-forbidden_networks = *
-
-
-# allowed_files is used to determine what files in what directories may be
-# un/mounted. A user must also have read permission on a file to mount it.
-# Note: Wildcards may be used, but a wildcard will never match a /, except
-# for "allowed_files=*" which allows any file. For example, to allow only
-# files in the /share directory to be mounted, use:
-# allowed_files = /share/*
-# NOTE: Specifying allowed_files_FSTYPE will NOT work because the fstype of
-# files is always 'file'.
-allowed_files = *
-
-
-# forbidden_files is used to specify files that are never allowed, even if
-# other settings allow them (except fstab). Specify a full path.
-# Note: Wildcards may be used, but a wildcard will never match a /, except
-# for "forbidden_files = *".
-# NOTE: file paths are canonicalized before being tested, so forbidding
-# a link to a file will have no effect.
-forbidden_files =
-
-
-# default_options specifies what options are always included when performing
-# a mount, in addition to any options the user may specify.
-# Note: When a device is present in /etc/fstab, and the user does not specify
-# a mount point, the device is mounted with normal user permissions using
-# the fstab entry, without these options.
-# default_options_FSTYPE, if present, is used to override default_options
-# when mounting a specific fstype (eg ext2, nfs).
-# The variables $USER, $UID, and $GID are changed to the user's username, UID,
-# and GID.
-# FOR GOOD SECURITY, default_options SHOULD ALWAYS INCLUDE: nosuid,noexec,nodev
-# WARNING: OPTIONS PRESENT OR MISSING CAN CAUSE SERIOUS SECURITY PROBLEMS.
-default_options = nosuid, noexec, nodev, noatime
-default_options_file = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID, ro
-# mount iso9660 with 'ro' to prevent mount read-only warning
-default_options_iso9660 = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID, ro, utf8
-default_options_udf = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID
-default_options_vfat = ro, iocharset=utf8, noatime, uid=$UID, gid=$GID
-default_options_exfat = ro, nonempty, uid=$UID, gid=$GID
-default_options_hfsplus = ro, uid=$UID, gid=$GID
-default_options_msdos = nosuid, noexec, nodev, noatime, fmask=0133, dmask=0022, uid=$UID, gid=$GID
-default_options_umsdos = nosuid, noexec, nodev, noatime, fmask=0133, dmask=0022, uid=$UID, gid=$GID
-default_options_ntfs = nosuid, noexec, nodev, noatime, fmask=0133, uid=$UID, gid=$GID, utf8
-default_options_cifs = nosuid, noexec, nodev, uid=$UID, gid=$GID
-default_options_smbfs = nosuid, noexec, nodev, uid=$UID, gid=$GID
-default_options_sshfs = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID, nonempty, allow_other
-default_options_curlftpfs = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID, nonempty, allow_other
-default_options_ftpfs = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID
-default_options_davfs = nosuid, noexec, nodev, uid=$UID, gid=$GID
-default_options_tmpfs = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID
-default_options_ramfs = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID
-
-
-# allowed_options determines all options that a user may specify when mounting.
-# All the options used in default_options above must be included here too, or
-# they will be rejected. If the user attempts to use an option not included
-# here, an error will result. Wildcards may be used.
-# allowed_options_FSTYPE, if present, is used to override allowed_options
-# when mounting a specific fstype (eg ext2, nfs).
-# The variables $USER, $UID, and $GID are changed to the user's username, UID,
-# and GID.
-# If you want to forbid remounts, remove 'remount' from here.
-# WARNING: OPTIONS HERE CAN CAUSE SERIOUS SECURITY PROBLEMS - CHOOSE CAREFULLY
-allowed_options = nosuid, noexec, nodev, noatime, fmask=0133, dmask=0022, uid=$UID, gid=$GID, ro, rw, sync, flush, iocharset=*, utf8, remount, nonempty
-allowed_options_nfs = nosuid, noexec, nodev, noatime, ro, rw, sync, remount, port=*, rsize=*, wsize=*, hard, proto=*, timeo=*, retrans=*
-allowed_options_cifs = nosuid, noexec, nodev, ro, rw, remount, port=*, user=*, username=*, pass=*, password=*, guest, domain=*, uid=$UID, gid=$GID, credentials=*
-allowed_options_smbfs = nosuid, noexec, nodev, ro, rw, remount, port=*, user=*, username=*, pass=*, password=*, guest, domain=*, uid=$UID, gid=$GID, credentials=*
-allowed_options_sshfs = nosuid, noexec, nodev, noatime, ro, rw, uid=$UID, gid=$GID, nonempty, allow_other, idmap=user, BatchMode=yes, port=*
-allowed_options_curlftpfs = nosuid, noexec, nodev, noatime, ro, rw, uid=$UID, gid=$GID, nonempty, allow_other, user=*
-allowed_options_ftpfs = nosuid, noexec, nodev, noatime, ro, rw, port=*, user=*, pass=*, ip=*, root=*, uid=$UID, gid=$GID
-
-
-# mount_point_mode, if present and set to a non-empty value, will cause udevil
-# to set the mode (permissions) on the moint point after mounting If not
-# specified or if left empty, the mode is not changed. Mode must be octal
-# starting with a zero (0755).
-# mount_point_mode_FSTYPE, if present, is used to override mount_point_mode
-# when mounting a specific fstype (eg ext2, nfs).
-# NOT SETTING A MODE CAN HAVE SECURITY IMPLICATIONS FOR SOME FSTYPES
-mount_point_mode = 0777
-# don't set a mode for some types:
-mount_point_mode_sshfs =
-mount_point_mode_curlftpfs =
-mount_point_mode_ftpfs =
-
-
-# Use the settings below to change the default locations of programs used by
-# udevil, or (advanced topic) to redirect commands to your scripts.
-# When substituting scripts, make sure they are root-owned and accept the
-# options used by udevil (for example, the mount_program must accept --fake,
-# -o, -v, and other options valid to mount.)
-# Be sure to specify the full path and include NO OPTIONS or other arguments.
-# These programs may also be specified as configure options when building
-# udevil.
-# THESE PROGRAMS ARE RUN AS ROOT
-# mount_program = /bin/mount
-# umount_program = /bin/umount
-# losetup_program = /sbin/losetup
-# setfacl_program = /usr/bin/setfacl
-
-
-# validate_exec specifies a program or script which provides additional
-# validation of a mount or unmount command, beyond the checks performed by
-# udevil. The program is run as a normal user (if root runs udevil,
-# validate_exec will NOT be run). The program is NOT run if the user is
-# mounting a device without root priviledges (a device in fstab).
-# The program is passed the username, a printable description of what is
-# happening, and the entire udevil command line as the first three arguments.
-# The program must return an exit status of 0 to allow the mount or unmount
-# to proceed. If it returns non-zero, the user will be denied permission.
-# For example, validate_exec might specify a script which notifies you
-# of the command being run, or performs additional steps to authenticate the
-# user.
-# Specify a full path to the program, with NO options or arguments.
-# validate_exec =
-
-
-# validate_rootexec works similarly to validate_exec, except that the program
-# is run as root. validate_rootexec will also be run if the root user runs
-# udevil. If both validate_exec and validate_rootexec are specified,
-# validate_rootexec will run first, followed by validate_exec.
-# The program must return an exit status of 0 to allow the mount or unmount
-# to proceed. If it returns non-zero, the user will be denied permission.
-# Unless you are familiar with writing root scripts, it is recommended that
-# rootexec settings NOT be used, as it is easy to inadvertently open exploits.
-# THIS PROGRAM IS ALWAYS RUN AS ROOT, even if the user running udevil is not.
-# validate_rootexec =
-
-
-# success_exec is run after a successful mount, remount, or unmount. The
-# program is run as a normal user (if root runs udevil, success_exec
-# will NOT be run).
-# The program is passed the username, a printable description of what action
-# was taken, and the entire udevil command line as the first three arguments.
-# The program's exit status is ignored.
-# For example, success_exec might run a script which informs you of what action
-# was taken, and might perform further actions.
-# Specify a full path to the program, with NO options or arguments.
-success_exec =
-
-
-# success_rootexec works similarly to success_exec, except that the program is
-# run as root. success_rootexec will also be run if the root user runs udevil.
-# If both success_exec and success_rootexec are specified, success_rootexec
-# will run first, followed by success_exec.
-# Unless you are familiar with writing root scripts, it is recommended that
-# rootexec settings NOT be used, as it is easy to inadvertently open exploits.
-# THIS PROGRAM IS ALWAYS RUN AS ROOT, even if the user running udevil is not.
-success_rootexec = /var/www/command/usbmount
-
+##############################################################################
+#
+# udevil configuration file /etc/udevil/udevil.conf
+#
+# This file controls what devices, networks, and files users may mount and
+# unmount via udevil (set suid).
+#
+# IMPORTANT: IT IS POSSIBLE TO CREATE SERIOUS SECURITY PROBLEMS IF THIS FILE
+# IS MISCONFIGURED - EDIT WITH CARE
+#
+# Note: For greater control for specific users, including root, copy this
+# file to /etc/udevil/udevil-user-USERNAME.conf replacing USERNAME with the
+# desired username (eg /etc/udevil/udevil-user-jim.conf).
+#
+# Format:
+# OPTION = VALUE[, VALUE, ...]
+#
+# DO NOT USE QUOTES except literally
+# Lines beginning with # are ignored
+#
+##############################################################################
+
+
+# To log all uses of udevil, set log_file to a file path:
+# log_file = /var/log/udevil.log
+
+# Approximate number of days to retain log entries (0=forever, max=60):
+log_keep_days = 1
+
+
+# allowed_types determines what fstypes can be passed by a user to the u/mount
+# program, what device filesystems may be un/mounted implicitly, and what
+# network filesystems may be un/mounted.
+# It may also include the 'file' keyword, indicating that the user is allowed
+# to mount files (eg an ISO file). The $KNOWN_FILESYSTEMS variable may
+# be included to include common local filesystems as well as those listed in
+# /etc/filesystems and /proc/filesystems.
+# allowed_types_USERNAME, if present, is used to override allowed_types for
+# the specific user 'USERNAME'. For example, to allow user 'jim' to mount
+# only vfat filesystems, add:
+# allowed_types_jim = vfat
+# Setting allowed_types = * does NOT allow all types, as this is a security
+# risk, but does allow all recognized types.
+# allowed_types = $KNOWN_FILESYSTEMS, file, cifs, smbfs, nfs, curlftpfs, ftpfs, sshfs, davfs, tmpfs, ramfs
+allowed_types = $KNOWN_FILESYSTEMS, file, hfsplus
+
+
+# allowed_users is a list of users permitted to mount and unmount with udevil.
+# Wildcards (* or ?) may be used in the usernames. To allow all users,
+# specify "allowed_users=*". UIDs may be included using the form UID=1000.
+# For example: allowed_users = carl, UID=1000, pre*
+# Also note that permission to execute udevil may be limited to users belonging
+# to the group that owns /usr/bin/udevil, such as 'plugdev' or 'storage',
+# depending on installation.
+# allowed_users_FSTYPE, if present, is used to override allowed_users when
+# mounting or unmounting a specific fstype (eg nfs, ext3, file).
+# Note that when mounting a file, fstype will always be 'file' regardless of
+# the internal fstype of the file.
+# For example, to allow only user 'bob' to mount nfs shares, add:
+# allowed_users_nfs = bob
+# The root user is NOT automatically allowed to use udevil in some cases unless
+# listed here (except for unmounting anything or mounting fstab devices).
+allowed_users = *
+
+
+# allowed_groups is a list of groups permitted to mount and unmount with
+# udevil. The user MUST belong to at least one of these groups. Wildcards
+# or GIDs may NOT be used in group names, but a single * may be used to allow
+# all groups.
+# Also note that permission to execute udevil may be limited to users belonging
+# to the group that owns /usr/bin/udevil, such as 'plugdev' or 'storage',
+# depending on installation.
+# allowed_groups_FSTYPE, if present, is used to override allowed_groups when
+# mounting or unmounting a specific fstype (eg nfs, ext3, file). For example,
+# to allow only members of the 'network' group to mount smb and nfs shares,
+# use both of these lines:
+# allowed_groups_smbfs = network
+# allowed_groups_nfs = network
+# The root user is NOT automatically allowed to use udevil in some cases unless
+# listed here (except for unmounting anything or mounting fstab devices).
+allowed_groups = *
+
+
+# allowed_media_dirs specifies the media directories in which user mount points
+# may be located. The first directory which exists and does not contain a
+# wildcard will be used as the default media directory (normally /media or
+# /run/media/$USER).
+# The $USER variable, if included, will be replaced with the username of the
+# user running udevil. Wildcards may also be used in any directory EXCEPT the
+# default. Wildcards will not match a /
+# allowed_media_dirs_FSTYPE, if present, is used to override allowed_media_dirs
+# when mounting or unmounting a specific fstype (eg ext2, nfs). For example,
+# to cause /media/network to be used as the default media directory for
+# nfs and ftpfs mounts, use these two lines:
+# allowed_media_dirs_nfs = /media/network, /media, /run/media/$USER
+# allowed_media_dirs_ftpfs = /media/network, /media, /run/media/$USER
+# NOTE: If you want only the user who mounted a device to have access to it
+# and be allowed to unmount it, specify /run/media/$USER as the first
+# allowed media directory.
+# IMPORTANT: If an allowed file is mounted to a media directory, the user may
+# be permitted to unmount its associated loop device even though internal.
+# INCLUDING /MNT HERE IS NOT RECOMMENDED. ALL ALLOWED MEDIA DIRECTORIES
+# SHOULD BE OWNED AND WRITABLE ONLY BY ROOT.
+allowed_media_dirs = /mnt/MPD/USB
+
+
+# allowed_devices is the first criteria for what block devices users may mount
+# or unmount. If a device is not listed in allowed_devices, it cannot be
+# un/mounted (unless in fstab). However, even if a device is listed, other
+# factors may prevent its use. For example, access to system internal devices
+# will be denied to normal users even if they are included in allowed_devices.
+# allowed_devices_FSTYPE, if present, is used to override allowed_devices when
+# mounting or unmounting a specific fstype (eg ext3, ntfs). For example, to
+# prevent all block devices containing an ext4 filesystem from being
+# un/mounted use:
+# allowed_devices_ext4 =
+# Note: Wildcards may be used, but a wildcard will never match a /, except
+# for "allowed_devices=*" which allows any device. The recommended setting is
+# allowed_devices = /dev/*
+# WARNING: ALLOWING USERS TO MOUNT DEVICES OUTSIDE OF /dev CAN CAUSE SERIOUS
+# SECURITY PROBLEMS. DO NOT ALLOW DEVICES IN /dev/shm
+allowed_devices = /dev/*
+
+
+# allowed_internal_devices causes udevil to treat any listed block devices as
+# removable, thus allowing normal users to un/mount them (providing they are
+# also listed in allowed_devices).
+# allowed_internal_devices_FSTYPE, if present, is used to override
+# allowed_internal_devices when mounting or unmounting a specific fstype
+# (eg ext3, ntfs). For example, to allow block devices containing a vfat
+# filesystem to be un/mounted even if they are system internal devices, use:
+# allowed_internal_devices_vfat = /dev/sdb*
+# Some removable esata drives look like internal drives to udevil. To avoid
+# this problem, they can be treated as removable with this setting.
+# WARNING: SETTING A SYSTEM DEVICE HERE CAN CAUSE SERIOUS SECURITY PROBLEMS.
+# allowed_internal_devices =
+
+
+# allowed_internal_uuids and allowed_internal_uuids_FSTYPE work similarly to
+# allowed_internal_devices, except that UUIDs are specified instead of devices.
+# For example, to allow un/mounting of an internal filesystem based on UUID:
+# allowed_internal_uuids = cc0c4489-8def-1e5b-a304-ab87c3cb626c0
+# WARNING: SETTING A SYSTEM DEVICE HERE CAN CAUSE SERIOUS SECURITY PROBLEMS.
+# allowed_internal_uuids =
+
+
+# forbidden_devices is used to prevent block devices from being un/mounted
+# even if other settings would allow them (except devices in fstab).
+# forbidden_devices_FSTYPE, if present, is used to override
+# forbidden_devices when mounting or unmounting a specific fstype
+# (eg ext3, ntfs). For example, to prevent device /dev/sdd1 from being
+# mounted when it contains an ntfs filesystem, use:
+# forbidden_devices_ntfs = /dev/sdd1
+# NOTE: device node paths are canonicalized before being tested, so forbidding
+# a link to a device will have no effect.
+forbidden_devices =
+
+# allowed_networks determines what hosts may be un/mounted by udevil users when
+# using nfs, cifs, smbfs, curlftpfs, ftpfs, or sshfs. Hosts may be specified
+# using a hostname (eg myserver.com) or IP address (192.168.1.100).
+# Wildcards may be used in hostnames and IP addresses, but CIDR notation
+# (192.168.1.0/16) is NOT supported. IP v6 is supported. For example:
+# allowed_networks = 127.0.0.1, 192.168.1.*, 10.0.0.*, localmachine, *.okay.com
+# Or, to prevent un/mounting of any network shares, set:
+# allowed_networks =
+# allowed_networks_FSTYPE, if present, is used to override allowed_networks
+# when mounting or unmounting a specific network fstype (eg nfs, cifs, sshfs,
+# curlftpfs). For example, to limit nfs and samba shares to only local
+# networks, use these two lines:
+# allowed_networks_nfs = 192.168.1.*, 10.0.0.*
+# allowed_networks_cifs = 192.168.1.*, 10.0.0.*
+#allowed_networks = *
+
+
+# forbidden_networks and forbidden_networks_FSTYPE are used to specify networks
+# that are never allowed, even if other settings allow them (except fstab).
+# NO REVERSE LOOKUP IS PERFORMED, so including bad.com will only have an effect
+# if the user uses that hostname. IP lookup is always performed, so forbidding
+# an IP address will also forbid all corresponding hostnames.
+forbidden_networks = *
+
+
+# allowed_files is used to determine what files in what directories may be
+# un/mounted. A user must also have read permission on a file to mount it.
+# Note: Wildcards may be used, but a wildcard will never match a /, except
+# for "allowed_files=*" which allows any file. For example, to allow only
+# files in the /share directory to be mounted, use:
+# allowed_files = /share/*
+# NOTE: Specifying allowed_files_FSTYPE will NOT work because the fstype of
+# files is always 'file'.
+allowed_files = *
+
+
+# forbidden_files is used to specify files that are never allowed, even if
+# other settings allow them (except fstab). Specify a full path.
+# Note: Wildcards may be used, but a wildcard will never match a /, except
+# for "forbidden_files = *".
+# NOTE: file paths are canonicalized before being tested, so forbidding
+# a link to a file will have no effect.
+forbidden_files =
+
+
+# default_options specifies what options are always included when performing
+# a mount, in addition to any options the user may specify.
+# Note: When a device is present in /etc/fstab, and the user does not specify
+# a mount point, the device is mounted with normal user permissions using
+# the fstab entry, without these options.
+# default_options_FSTYPE, if present, is used to override default_options
+# when mounting a specific fstype (eg ext2, nfs).
+# The variables $USER, $UID, and $GID are changed to the user's username, UID,
+# and GID.
+# FOR GOOD SECURITY, default_options SHOULD ALWAYS INCLUDE: nosuid,noexec,nodev
+# WARNING: OPTIONS PRESENT OR MISSING CAN CAUSE SERIOUS SECURITY PROBLEMS.
+default_options = nosuid, noexec, nodev, noatime
+default_options_file = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID, ro
+# mount iso9660 with 'ro' to prevent mount read-only warning
+default_options_iso9660 = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID, ro, utf8
+default_options_udf = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID
+default_options_vfat = ro, iocharset=utf8, noatime, uid=$UID, gid=$GID
+default_options_exfat = ro, nonempty, uid=$UID, gid=$GID
+default_options_hfsplus = ro, uid=$UID, gid=$GID
+default_options_msdos = nosuid, noexec, nodev, noatime, fmask=0133, dmask=0022, uid=$UID, gid=$GID
+default_options_umsdos = nosuid, noexec, nodev, noatime, fmask=0133, dmask=0022, uid=$UID, gid=$GID
+default_options_ntfs = nosuid, noexec, nodev, noatime, fmask=0133, uid=$UID, gid=$GID, utf8
+default_options_cifs = nosuid, noexec, nodev, uid=$UID, gid=$GID
+default_options_smbfs = nosuid, noexec, nodev, uid=$UID, gid=$GID
+default_options_sshfs = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID, nonempty, allow_other
+default_options_curlftpfs = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID, nonempty, allow_other
+default_options_ftpfs = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID
+default_options_davfs = nosuid, noexec, nodev, uid=$UID, gid=$GID
+default_options_tmpfs = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID
+default_options_ramfs = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID
+
+
+# allowed_options determines all options that a user may specify when mounting.
+# All the options used in default_options above must be included here too, or
+# they will be rejected. If the user attempts to use an option not included
+# here, an error will result. Wildcards may be used.
+# allowed_options_FSTYPE, if present, is used to override allowed_options
+# when mounting a specific fstype (eg ext2, nfs).
+# The variables $USER, $UID, and $GID are changed to the user's username, UID,
+# and GID.
+# If you want to forbid remounts, remove 'remount' from here.
+# WARNING: OPTIONS HERE CAN CAUSE SERIOUS SECURITY PROBLEMS - CHOOSE CAREFULLY
+allowed_options = nosuid, noexec, nodev, noatime, fmask=0133, dmask=0022, uid=$UID, gid=$GID, ro, rw, sync, flush, iocharset=*, utf8, remount, nonempty
+allowed_options_nfs = nosuid, noexec, nodev, noatime, ro, rw, sync, remount, port=*, rsize=*, wsize=*, hard, proto=*, timeo=*, retrans=*
+allowed_options_cifs = nosuid, noexec, nodev, ro, rw, remount, port=*, user=*, username=*, pass=*, password=*, guest, domain=*, uid=$UID, gid=$GID, credentials=*
+allowed_options_smbfs = nosuid, noexec, nodev, ro, rw, remount, port=*, user=*, username=*, pass=*, password=*, guest, domain=*, uid=$UID, gid=$GID, credentials=*
+allowed_options_sshfs = nosuid, noexec, nodev, noatime, ro, rw, uid=$UID, gid=$GID, nonempty, allow_other, idmap=user, BatchMode=yes, port=*
+allowed_options_curlftpfs = nosuid, noexec, nodev, noatime, ro, rw, uid=$UID, gid=$GID, nonempty, allow_other, user=*
+allowed_options_ftpfs = nosuid, noexec, nodev, noatime, ro, rw, port=*, user=*, pass=*, ip=*, root=*, uid=$UID, gid=$GID
+
+
+# mount_point_mode, if present and set to a non-empty value, will cause udevil
+# to set the mode (permissions) on the moint point after mounting If not
+# specified or if left empty, the mode is not changed. Mode must be octal
+# starting with a zero (0755).
+# mount_point_mode_FSTYPE, if present, is used to override mount_point_mode
+# when mounting a specific fstype (eg ext2, nfs).
+# NOT SETTING A MODE CAN HAVE SECURITY IMPLICATIONS FOR SOME FSTYPES
+mount_point_mode = 0777
+# don't set a mode for some types:
+mount_point_mode_sshfs =
+mount_point_mode_curlftpfs =
+mount_point_mode_ftpfs =
+
+
+# Use the settings below to change the default locations of programs used by
+# udevil, or (advanced topic) to redirect commands to your scripts.
+# When substituting scripts, make sure they are root-owned and accept the
+# options used by udevil (for example, the mount_program must accept --fake,
+# -o, -v, and other options valid to mount.)
+# Be sure to specify the full path and include NO OPTIONS or other arguments.
+# These programs may also be specified as configure options when building
+# udevil.
+# THESE PROGRAMS ARE RUN AS ROOT
+# mount_program = /bin/mount
+# umount_program = /bin/umount
+# losetup_program = /sbin/losetup
+# setfacl_program = /usr/bin/setfacl
+
+
+# validate_exec specifies a program or script which provides additional
+# validation of a mount or unmount command, beyond the checks performed by
+# udevil. The program is run as a normal user (if root runs udevil,
+# validate_exec will NOT be run). The program is NOT run if the user is
+# mounting a device without root priviledges (a device in fstab).
+# The program is passed the username, a printable description of what is
+# happening, and the entire udevil command line as the first three arguments.
+# The program must return an exit status of 0 to allow the mount or unmount
+# to proceed. If it returns non-zero, the user will be denied permission.
+# For example, validate_exec might specify a script which notifies you
+# of the command being run, or performs additional steps to authenticate the
+# user.
+# Specify a full path to the program, with NO options or arguments.
+# validate_exec =
+
+
+# validate_rootexec works similarly to validate_exec, except that the program
+# is run as root. validate_rootexec will also be run if the root user runs
+# udevil. If both validate_exec and validate_rootexec are specified,
+# validate_rootexec will run first, followed by validate_exec.
+# The program must return an exit status of 0 to allow the mount or unmount
+# to proceed. If it returns non-zero, the user will be denied permission.
+# Unless you are familiar with writing root scripts, it is recommended that
+# rootexec settings NOT be used, as it is easy to inadvertently open exploits.
+# THIS PROGRAM IS ALWAYS RUN AS ROOT, even if the user running udevil is not.
+# validate_rootexec =
+
+
+# success_exec is run after a successful mount, remount, or unmount. The
+# program is run as a normal user (if root runs udevil, success_exec
+# will NOT be run).
+# The program is passed the username, a printable description of what action
+# was taken, and the entire udevil command line as the first three arguments.
+# The program's exit status is ignored.
+# For example, success_exec might run a script which informs you of what action
+# was taken, and might perform further actions.
+# Specify a full path to the program, with NO options or arguments.
+success_exec =
+
+
+# success_rootexec works similarly to success_exec, except that the program is
+# run as root. success_rootexec will also be run if the root user runs udevil.
+# If both success_exec and success_rootexec are specified, success_rootexec
+# will run first, followed by success_exec.
+# Unless you are familiar with writing root scripts, it is recommended that
+# rootexec settings NOT be used, as it is easy to inadvertently open exploits.
+# THIS PROGRAM IS ALWAYS RUN AS ROOT, even if the user running udevil is not.
+success_rootexec = /var/www/command/usbmount
+
diff --git a/app/config/_os/etc/wpa_supplicant/wpa_supplicant.conf b/app/config/_os/etc/wpa_supplicant/wpa_supplicant.conf
index d5d66e7e..7900a500 100644
--- a/app/config/_os/etc/wpa_supplicant/wpa_supplicant.conf
+++ b/app/config/_os/etc/wpa_supplicant/wpa_supplicant.conf
@@ -1,2 +1,5 @@
-ctrl_interface=/var/run/wpa_supplicant
-update_config=1
+ctrl_interface=/var/run/wpa_supplicant
+#update_config=1
+eapol_version=1
+ap_scan=1
+fast_reauth=1
diff --git a/app/config/_os/usr/lib/systemd/system/mpd.service b/app/config/_os/usr/lib/systemd/system/mpd.service
new file mode 100644
index 00000000..3b9b0acb
--- /dev/null
+++ b/app/config/_os/usr/lib/systemd/system/mpd.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Music Player Daemon
+After=network.target sound.target
+
+[Service]
+ExecStart=/usr/bin/mpd --no-daemon
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app/config/_os/usr/lib/systemd/system/mpdscribble.service b/app/config/_os/usr/lib/systemd/system/mpdscribble.service
index 37427677..c201024a 100644
--- a/app/config/_os/usr/lib/systemd/system/mpdscribble.service
+++ b/app/config/_os/usr/lib/systemd/system/mpdscribble.service
@@ -1,12 +1,12 @@
-[Unit]
-Description=MPD Scribble
-After=sound.target
-Requires=mpd.service
-After=mpd.service
-
-[Service]
-ExecStart=/usr/local/bin/mpdscribble -D
-Restart=always
-
-[Install]
-WantedBy=multi-user.target
+[Unit]
+Description=MPD Scribble
+After=sound.target
+Requires=mpd.service
+After=mpd.service
+
+[Service]
+ExecStart=/usr/local/bin/mpdscribble -D
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app/config/_os/usr/lib/systemd/system/netctl-ifplugd@.service b/app/config/_os/usr/lib/systemd/system/netctl-ifplugd@.service
new file mode 100644
index 00000000..508f4eee
--- /dev/null
+++ b/app/config/_os/usr/lib/systemd/system/netctl-ifplugd@.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Automatic wired network connection using netctl profiles
+Documentation=man:netctl.special(7)
+BindsTo=sys-subsystem-net-devices-%i.device
+After=sys-subsystem-net-devices-%i.device
+
+[Service]
+ExecStart=/usr/bin/ifplugd -i %I -r /etc/ifplugd/netctl.action -bfIns
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app/config/_os/usr/lib/systemd/system/ntpd.service b/app/config/_os/usr/lib/systemd/system/ntpd.service
new file mode 100644
index 00000000..82186f6f
--- /dev/null
+++ b/app/config/_os/usr/lib/systemd/system/ntpd.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Network Time Service
+After=network.target nss-lookup.target
+Conflicts=systemd-timesyncd.service
+
+[Service]
+Type=forking
+PrivateTmp=true
+ExecStart=/usr/bin/ntpd -g -u ntp:ntp
+Restart=always
+RestartSec=1
+StartLimitInterval=30
+StartLimitBurst=20
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app/config/_os/usr/lib/systemd/system/php-fpm.service b/app/config/_os/usr/lib/systemd/system/php-fpm.service
new file mode 100644
index 00000000..2245a350
--- /dev/null
+++ b/app/config/_os/usr/lib/systemd/system/php-fpm.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=The PHP FastCGI Process Manager
+After=syslog.target network.target
+
+[Service]
+Type=notify
+PIDFile=/run/php-fpm/php-fpm.pid
+PrivateTmp=true
+ExecStart=/usr/bin/php-fpm --nodaemonize --pid /run/php-fpm/php-fpm.pid
+ExecReload=/bin/kill -USR2 $MAINPID
+Restart=always
+RestartSec=1
+StartLimitInterval=30
+StartLimitBurst=20
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app/config/_os/usr/lib/systemd/system/rc-local.service b/app/config/_os/usr/lib/systemd/system/rc-local.service
index 158569ae..e25d0896 100644
--- a/app/config/_os/usr/lib/systemd/system/rc-local.service
+++ b/app/config/_os/usr/lib/systemd/system/rc-local.service
@@ -1,12 +1,12 @@
-[Unit]
-Description=/etc/rc.local
-Requires=dhcpcd@eth0.service
-After=dhcpcd@eth0.service
-
-[Service]
-Type=forking
-ExecStart=/etc/rc.local
-TimeoutSec=0
-
-[Install]
-WantedBy=multi-user.target
+[Unit]
+Description=/etc/rc.local
+Requires=dhcpcd@eth0.service
+After=dhcpcd@eth0.service
+
+[Service]
+Type=forking
+ExecStart=/etc/rc.local
+TimeoutSec=0
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app/config/_os/usr/lib/systemd/system/redis.service b/app/config/_os/usr/lib/systemd/system/redis.service
index d55bf4ed..212437c0 100644
--- a/app/config/_os/usr/lib/systemd/system/redis.service
+++ b/app/config/_os/usr/lib/systemd/system/redis.service
@@ -1,15 +1,18 @@
-[Unit]
-Description=Advanced key-value store
-After=network.target
-
-[Service]
-#Type=forking
-User=redis
-PIDFile=/run/redis/redis.pid
-ExecStartPre=/bin/mkdir -p /var/lib/redis
-ExecStart=/usr/bin/redis-server /etc/redis.conf
-ExecStop=/usr/bin/redis-cli shutdown
-Restart=always
-
-[Install]
-WantedBy=multi-user.target
+[Unit]
+Description=Advanced key-value store
+After=network.target
+
+[Service]
+#Type=forking
+User=redis
+PIDFile=/run/redis/redis.pid
+ExecStartPre=/bin/mkdir -p /var/lib/redis
+ExecStart=/usr/bin/redis-server /etc/redis.conf
+ExecStop=/usr/bin/redis-cli shutdown
+Restart=always
+RestartSec=1
+StartLimitInterval=30
+StartLimitBurst=20
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app/config/_os/usr/lib/systemd/system/rune_PL_wrk.service b/app/config/_os/usr/lib/systemd/system/rune_PL_wrk.service
index 1118fe75..cc387a7f 100644
--- a/app/config/_os/usr/lib/systemd/system/rune_PL_wrk.service
+++ b/app/config/_os/usr/lib/systemd/system/rune_PL_wrk.service
@@ -1,10 +1,14 @@
-[Unit]
-Description=RuneAudio Playback Worker After=network.target
-
-[Service]
-ExecStart=/var/www/command/rune_PL_wrk
-TimeoutSec=0
-Restart=always
-
-[Install]
-WantedBy=multi-user.target
+[Unit]
+Description=RuneAudio Playback Worker
+After=network.target redis.target
+
+[Service]
+ExecStart=/var/www/command/rune_PL_wrk
+TimeoutSec=0
+Restart=always
+RestartSec=1
+StartLimitInterval=30
+StartLimitBurst=20
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app/config/_os/usr/lib/systemd/system/rune_SY_wrk.service b/app/config/_os/usr/lib/systemd/system/rune_SY_wrk.service
index f8a4eacf..093b7d58 100644
--- a/app/config/_os/usr/lib/systemd/system/rune_SY_wrk.service
+++ b/app/config/_os/usr/lib/systemd/system/rune_SY_wrk.service
@@ -1,11 +1,14 @@
-[Unit]
-Description=RuneAudio System Worker
-After=multi-user.target redis.service
-
-[Service]
-ExecStart=/var/www/command/rune_SY_wrk
-TimeoutSec=0
-Restart=always
-
-[Install]
-WantedBy=multi-user.target
+[Unit]
+Description=RuneAudio System Worker
+After=multi-user.target network.target redis.target
+
+[Service]
+ExecStart=/var/www/command/rune_SY_wrk
+TimeoutSec=0
+Restart=always
+RestartSec=1
+StartLimitInterval=30
+StartLimitBurst=20
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app/config/_os/usr/lib/systemd/system/rune_shutdown.service b/app/config/_os/usr/lib/systemd/system/rune_shutdown.service
index 775d8f36..aa58863e 100644
--- a/app/config/_os/usr/lib/systemd/system/rune_shutdown.service
+++ b/app/config/_os/usr/lib/systemd/system/rune_shutdown.service
@@ -1,14 +1,14 @@
-[Unit]
-Description=RuneAudio shutdown script
-ConditionFileIsExecutable=/var/www/command/rune_shutdown
-DefaultDependencies=no
-Before=shutdown.target reboot.target halt.target
-
-[Service]
-Type=oneshot
-RemainAfterExit=true
-ExecStart=/bin/true
-ExecStop=/var/www/command/rune_shutdown
-
-[Install]
+[Unit]
+Description=RuneAudio shutdown script
+ConditionFileIsExecutable=/var/www/command/rune_shutdown
+DefaultDependencies=no
+Before=shutdown.target reboot.target halt.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=true
+ExecStart=/bin/true
+ExecStop=/var/www/command/rune_shutdown
+
+[Install]
WantedBy=multi-user.target
\ No newline at end of file
diff --git a/app/config/_os/usr/lib/systemd/system/shairport.service b/app/config/_os/usr/lib/systemd/system/shairport.service
old mode 100755
new mode 100644
index 7da98604..f6e2c9ff
--- a/app/config/_os/usr/lib/systemd/system/shairport.service
+++ b/app/config/_os/usr/lib/systemd/system/shairport.service
@@ -1,12 +1,12 @@
-[Unit]
-Description=Shairport AirTunes receiver
-After=sound.target
-Requires=avahi-daemon.service
-After=avahi-daemon.service
-
-[Service]
-ExecStart=/usr/bin/shairport -w --on-start=/var/www/command/airplay_toggle --on-stop=/var/www/command/airplay_toggle -o alsa -- -d hw:0,0
-Restart=always
-
-[Install]
-WantedBy=multi-user.target
+[Unit]
+Description=Shairport AirTunes receiver
+After=sound.target
+Requires=avahi-daemon.service
+After=avahi-daemon.service
+
+[Service]
+ExecStart=/usr/bin/shairport -w --name=RuneAudio -M /run/shairport --on-start=/var/www/command/airplay_toggle --on-stop=/var/www/command/airplay_toggle -o alsa -- -d hw:0,0
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app/config/_os/usr/lib/systemd/system/udevil.service b/app/config/_os/usr/lib/systemd/system/udevil.service
index 7ef7b0f1..75204712 100644
--- a/app/config/_os/usr/lib/systemd/system/udevil.service
+++ b/app/config/_os/usr/lib/systemd/system/udevil.service
@@ -1,14 +1,14 @@
-[Unit]
-Description=Usb Automount (udevil)
-After=sound.target
-#Requires=mpd.service
-#After=mpd.service
-
-[Service]
-User=mpd
-Group=mpd
-ExecStart=/usr/bin/devmon
-Restart=always
-
-[Install]
-WantedBy=multi-user.target
+[Unit]
+Description=Usb Automount (udevil)
+After=sound.target
+#Requires=mpd.service
+#After=mpd.service
+
+[Service]
+User=mpd
+Group=mpd
+ExecStart=/usr/bin/devmon
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app/config/_os/usr/lib/systemd/system/wpa_supplicant@.service b/app/config/_os/usr/lib/systemd/system/wpa_supplicant@.service
deleted file mode 100644
index 15e880e5..00000000
--- a/app/config/_os/usr/lib/systemd/system/wpa_supplicant@.service
+++ /dev/null
@@ -1,13 +0,0 @@
-[Unit]
-Description=WPA supplicant daemon (interface-specific version)
-Requires=sys-subsystem-net-devices-%i.device
-After=sys-subsystem-net-devices-%i.device
-
-# NetworkManager users will probably want the dbus version instead.
-
-[Service]
-Type=simple
-ExecStart=/usr/bin/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant.conf -i%I
-
-[Install]
-Alias=multi-user.target.wants/wpa_supplicant@%i.service
diff --git a/app/config/_os/usr/share/ca-certificates/runeaudio/gd_intermediate.crt b/app/config/_os/usr/share/ca-certificates/runeaudio/gd_intermediate.crt
index 77cb1601..910e0a3f 100644
--- a/app/config/_os/usr/share/ca-certificates/runeaudio/gd_intermediate.crt
+++ b/app/config/_os/usr/share/ca-certificates/runeaudio/gd_intermediate.crt
@@ -1,30 +1,30 @@
------BEGIN CERTIFICATE-----
-MIIE3jCCA8agAwIBAgICAwEwDQYJKoZIhvcNAQEFBQAwYzELMAkGA1UEBhMCVVMx
-ITAfBgNVBAoTGFRoZSBHbyBEYWRkeSBHcm91cCwgSW5jLjExMC8GA1UECxMoR28g
-RGFkZHkgQ2xhc3MgMiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNjExMTYw
-MTU0MzdaFw0yNjExMTYwMTU0MzdaMIHKMQswCQYDVQQGEwJVUzEQMA4GA1UECBMH
-QXJpem9uYTETMBEGA1UEBxMKU2NvdHRzZGFsZTEaMBgGA1UEChMRR29EYWRkeS5j
-b20sIEluYy4xMzAxBgNVBAsTKmh0dHA6Ly9jZXJ0aWZpY2F0ZXMuZ29kYWRkeS5j
-b20vcmVwb3NpdG9yeTEwMC4GA1UEAxMnR28gRGFkZHkgU2VjdXJlIENlcnRpZmlj
-YXRpb24gQXV0aG9yaXR5MREwDwYDVQQFEwgwNzk2OTI4NzCCASIwDQYJKoZIhvcN
-AQEBBQADggEPADCCAQoCggEBAMQt1RWMnCZM7DI161+4WQFapmGBWTtwY6vj3D3H
-KrjJM9N55DrtPDAjhI6zMBS2sofDPZVUBJ7fmd0LJR4h3mUpfjWoqVTr9vcyOdQm
-VZWt7/v+WIbXnvQAjYwqDL1CBM6nPwT27oDyqu9SoWlm2r4arV3aLGbqGmu75RpR
-SgAvSMeYddi5Kcju+GZtCpyz8/x4fKL4o/K1w/O5epHBp+YlLpyo7RJlbmr2EkRT
-cDCVw5wrWCs9CHRK8r5RsL+H0EwnWGu1NcWdrxcx+AuP7q2BNgWJCJjPOq8lh8BJ
-6qf9Z/dFjpfMFDniNoW1fho3/Rb2cRGadDAW/hOUoz+EDU8CAwEAAaOCATIwggEu
-MB0GA1UdDgQWBBT9rGEyk2xF1uLuhV+auud2mWjM5zAfBgNVHSMEGDAWgBTSxLDS
-kdRMEXGzYcs9of7dqGrU4zASBgNVHRMBAf8ECDAGAQH/AgEAMDMGCCsGAQUFBwEB
-BCcwJTAjBggrBgEFBQcwAYYXaHR0cDovL29jc3AuZ29kYWRkeS5jb20wRgYDVR0f
-BD8wPTA7oDmgN4Y1aHR0cDovL2NlcnRpZmljYXRlcy5nb2RhZGR5LmNvbS9yZXBv
-c2l0b3J5L2dkcm9vdC5jcmwwSwYDVR0gBEQwQjBABgRVHSAAMDgwNgYIKwYBBQUH
-AgEWKmh0dHA6Ly9jZXJ0aWZpY2F0ZXMuZ29kYWRkeS5jb20vcmVwb3NpdG9yeTAO
-BgNVHQ8BAf8EBAMCAQYwDQYJKoZIhvcNAQEFBQADggEBANKGwOy9+aG2Z+5mC6IG
-OgRQjhVyrEp0lVPLN8tESe8HkGsz2ZbwlFalEzAFPIUyIXvJxwqoJKSQ3kbTJSMU
-A2fCENZvD117esyfxVgqwcSeIaha86ykRvOe5GPLL5CkKSkB2XIsKd83ASe8T+5o
-0yGPwLPk9Qnt0hCqU7S+8MxZC9Y7lhyVJEnfzuz9p0iRFEUOOjZv2kWzRaJBydTX
-RE4+uXR21aITVSzGh6O1mawGhId/dQb8vxRMDsxuxN89txJx9OjxUUAiKEngHUuH
-qDTMBqLdElrRhjZkAzVvb3du6/KFUJheqwNTrZEjYx8WnM25sgVjOuH0aBsXBTWV
-U+4=
------END CERTIFICATE-----
-
+-----BEGIN CERTIFICATE-----
+MIIE3jCCA8agAwIBAgICAwEwDQYJKoZIhvcNAQEFBQAwYzELMAkGA1UEBhMCVVMx
+ITAfBgNVBAoTGFRoZSBHbyBEYWRkeSBHcm91cCwgSW5jLjExMC8GA1UECxMoR28g
+RGFkZHkgQ2xhc3MgMiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNjExMTYw
+MTU0MzdaFw0yNjExMTYwMTU0MzdaMIHKMQswCQYDVQQGEwJVUzEQMA4GA1UECBMH
+QXJpem9uYTETMBEGA1UEBxMKU2NvdHRzZGFsZTEaMBgGA1UEChMRR29EYWRkeS5j
+b20sIEluYy4xMzAxBgNVBAsTKmh0dHA6Ly9jZXJ0aWZpY2F0ZXMuZ29kYWRkeS5j
+b20vcmVwb3NpdG9yeTEwMC4GA1UEAxMnR28gRGFkZHkgU2VjdXJlIENlcnRpZmlj
+YXRpb24gQXV0aG9yaXR5MREwDwYDVQQFEwgwNzk2OTI4NzCCASIwDQYJKoZIhvcN
+AQEBBQADggEPADCCAQoCggEBAMQt1RWMnCZM7DI161+4WQFapmGBWTtwY6vj3D3H
+KrjJM9N55DrtPDAjhI6zMBS2sofDPZVUBJ7fmd0LJR4h3mUpfjWoqVTr9vcyOdQm
+VZWt7/v+WIbXnvQAjYwqDL1CBM6nPwT27oDyqu9SoWlm2r4arV3aLGbqGmu75RpR
+SgAvSMeYddi5Kcju+GZtCpyz8/x4fKL4o/K1w/O5epHBp+YlLpyo7RJlbmr2EkRT
+cDCVw5wrWCs9CHRK8r5RsL+H0EwnWGu1NcWdrxcx+AuP7q2BNgWJCJjPOq8lh8BJ
+6qf9Z/dFjpfMFDniNoW1fho3/Rb2cRGadDAW/hOUoz+EDU8CAwEAAaOCATIwggEu
+MB0GA1UdDgQWBBT9rGEyk2xF1uLuhV+auud2mWjM5zAfBgNVHSMEGDAWgBTSxLDS
+kdRMEXGzYcs9of7dqGrU4zASBgNVHRMBAf8ECDAGAQH/AgEAMDMGCCsGAQUFBwEB
+BCcwJTAjBggrBgEFBQcwAYYXaHR0cDovL29jc3AuZ29kYWRkeS5jb20wRgYDVR0f
+BD8wPTA7oDmgN4Y1aHR0cDovL2NlcnRpZmljYXRlcy5nb2RhZGR5LmNvbS9yZXBv
+c2l0b3J5L2dkcm9vdC5jcmwwSwYDVR0gBEQwQjBABgRVHSAAMDgwNgYIKwYBBQUH
+AgEWKmh0dHA6Ly9jZXJ0aWZpY2F0ZXMuZ29kYWRkeS5jb20vcmVwb3NpdG9yeTAO
+BgNVHQ8BAf8EBAMCAQYwDQYJKoZIhvcNAQEFBQADggEBANKGwOy9+aG2Z+5mC6IG
+OgRQjhVyrEp0lVPLN8tESe8HkGsz2ZbwlFalEzAFPIUyIXvJxwqoJKSQ3kbTJSMU
+A2fCENZvD117esyfxVgqwcSeIaha86ykRvOe5GPLL5CkKSkB2XIsKd83ASe8T+5o
+0yGPwLPk9Qnt0hCqU7S+8MxZC9Y7lhyVJEnfzuz9p0iRFEUOOjZv2kWzRaJBydTX
+RE4+uXR21aITVSzGh6O1mawGhId/dQb8vxRMDsxuxN89txJx9OjxUUAiKEngHUuH
+qDTMBqLdElrRhjZkAzVvb3du6/KFUJheqwNTrZEjYx8WnM25sgVjOuH0aBsXBTWV
+U+4=
+-----END CERTIFICATE-----
+
diff --git a/app/config/config.php b/app/config/config.php
index 5b0564ce..00602e95 100755
--- a/app/config/config.php
+++ b/app/config/config.php
@@ -48,15 +48,18 @@
//$redis->pconnect('/tmp/redis.sock');
$devmode = $redis->get('dev');
$activePlayer = $redis->get('activePlayer');
+
// LogSettings
if ($redis->get('debug') > 0 ) {
- $activeLog=1;
+ $activeLog='1';
} else {
- $activeLog=0;
+ $activeLog='0';
}
ini_set('log_errors', $activeLog);
-ini_set('error_log', '/var/log/runeaudio/runeui.log');
+// ini_set('error_log', '/var/log/runeaudio/runeui.log');
+ini_set('error_log', '/var/log/runeaudio/runeui_error.log');
ini_set('display_errors', $activeLog);
+
// connect to MPD daemon
if ($_SERVER["SCRIPT_FILENAME"] === '/var/www/command/index.php' && $activePlayer === 'MPD') {
// debug
@@ -68,4 +71,4 @@
$mpd = openMpdSocket('/run/mpd.sock', 1);
} elseif ($redis->hGet('spotify', 'enable') === '1' && $activePlayer === 'Spotify') {
$spop = openSpopSocket('localhost', 6602, 1);
-}
+}
\ No newline at end of file
diff --git a/app/config/defaults/eth0 b/app/config/defaults/eth0
index 50480b3b..6020c6d7 100644
--- a/app/config/defaults/eth0
+++ b/app/config/defaults/eth0
@@ -1,7 +1,7 @@
-Description='eth0 connection'
-Interface=eth0
-ForceConnect=yes
-SkipNoCarrier=yes
-Connection=ethernet
-IP=dhcp
-ExecUpPost='/usr/bin/ntpd -gq || true'
+Description='eth0 connection'
+Interface=eth0
+ForceConnect=yes
+SkipNoCarrier=yes
+Connection=ethernet
+IP=dhcp
+ExecUpPost='/usr/bin/ntpd -gq || true'
diff --git a/app/config/defaults/libao.conf b/app/config/defaults/libao.conf
index ad2055b9..a3256486 100755
--- a/app/config/defaults/libao.conf
+++ b/app/config/defaults/libao.conf
@@ -1,3 +1,3 @@
-default_driver=alsa
-use_mmap=no
-dev=hw:0,0
+default_driver=alsa
+use_mmap=no
+dev=hw:0,0
diff --git a/app/config/defaults/mpdscribble.conf b/app/config/defaults/mpdscribble.conf
index 84e6a790..64159949 100644
--- a/app/config/defaults/mpdscribble.conf
+++ b/app/config/defaults/mpdscribble.conf
@@ -1,54 +1,54 @@
-## mpdscribble - an audioscrobbler for the Music Player Daemon.
-## http://mpd.wikia.com/wiki/Client:mpdscribble
-
-# HTTP proxy URL.
-#proxy = http://the.proxy.server:3128
-
-# The location of the pid file. mpdscribble saves its process id there.
-#pidfile = /var/run/mpdscribble.pid
-
-# Change to this system user after daemonization.
-#daemon_user = mpdscribble
-
-# The location of the mpdscribble log file. The special value
-# "syslog" makes mpdscribble use the local syslog daemon. On most
-# systems, log messages will appear in /var/log/daemon.log then.
-# "-" means log to stderr (the current terminal).
-log = syslog
-
-# How verbose mpdscribble's logging should be. Default is 1.
-verbose = 1
-
-# How often should mpdscribble save the journal file? [seconds]
-#journal_interval = 600
-
-# The host running MPD, possibly protected by a password
-# ([PASSWORD@]HOSTNAME). Defaults to $MPD_HOST or localhost.
-#host = localhost
-
-# The port that the MPD listens on and mpdscribble should try to
-# connect to. Defaults to $MPD_PORT or 6600.
-#port = 6600
-
-[last.fm]
-url = http://post.audioscrobbler.com/
-username = user
-password = pass
-# The file where mpdscribble should store its Last.fm journal in case
-# you do not have a connection to the Last.fm server.
-journal = /run/lastfm.journal
-
-#[libre.fm]
-#url = http://turtle.libre.fm/
-#username = my_username
-#password = my_password
-#journal = /var/cache/mpdscribble/librefm.journal
-
-#[jamendo]
-#url = http://postaudioscrobbler.jamendo.com/
-#username = my_username
-#password = my_password
-#journal = /var/cache/mpdscribble/jamendo.journal
-
-#[file]
-#file = /var/log/mpdscribble/log
+## mpdscribble - an audioscrobbler for the Music Player Daemon.
+## http://mpd.wikia.com/wiki/Client:mpdscribble
+
+# HTTP proxy URL.
+#proxy = http://the.proxy.server:3128
+
+# The location of the pid file. mpdscribble saves its process id there.
+#pidfile = /var/run/mpdscribble.pid
+
+# Change to this system user after daemonization.
+#daemon_user = mpdscribble
+
+# The location of the mpdscribble log file. The special value
+# "syslog" makes mpdscribble use the local syslog daemon. On most
+# systems, log messages will appear in /var/log/daemon.log then.
+# "-" means log to stderr (the current terminal).
+log = syslog
+
+# How verbose mpdscribble's logging should be. Default is 1.
+verbose = 1
+
+# How often should mpdscribble save the journal file? [seconds]
+#journal_interval = 600
+
+# The host running MPD, possibly protected by a password
+# ([PASSWORD@]HOSTNAME). Defaults to $MPD_HOST or localhost.
+#host = localhost
+
+# The port that the MPD listens on and mpdscribble should try to
+# connect to. Defaults to $MPD_PORT or 6600.
+#port = 6600
+
+[last.fm]
+url = http://post.audioscrobbler.com/
+username = user
+password = pass
+# The file where mpdscribble should store its Last.fm journal in case
+# you do not have a connection to the Last.fm server.
+journal = /run/lastfm.journal
+
+#[libre.fm]
+#url = http://turtle.libre.fm/
+#username = my_username
+#password = my_password
+#journal = /var/cache/mpdscribble/librefm.journal
+
+#[jamendo]
+#url = http://postaudioscrobbler.jamendo.com/
+#username = my_username
+#password = my_password
+#journal = /var/cache/mpdscribble/jamendo.journal
+
+#[file]
+#file = /var/log/mpdscribble/log
diff --git a/app/config/defaults/shairport.service b/app/config/defaults/shairport.service
index 13306ab5..1ba82904 100755
--- a/app/config/defaults/shairport.service
+++ b/app/config/defaults/shairport.service
@@ -1,12 +1,12 @@
-[Unit]
-Description=Shairport AirTunes receiver
-After=sound.target
-Requires=avahi-daemon.service
-After=avahi-daemon.service
-
-[Service]
-ExecStart=/usr/bin/shairport -w --name=RuneAudio --on-start=/var/www/command/airplay_toggle --on-stop=/var/www/command/airplay_toggle -o alsa -- -d hw:0,0
-Restart=always
-
-[Install]
-WantedBy=multi-user.target
+[Unit]
+Description=Shairport AirTunes receiver
+After=sound.target
+Requires=avahi-daemon.service
+After=avahi-daemon.service
+
+[Service]
+ExecStart=/usr/bin/shairport -w --name=RuneAudio --on-start=/var/www/command/airplay_toggle --on-stop=/var/www/command/airplay_toggle -o alsa -- -d hw:0,0
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app/config/defaults/spopd.conf b/app/config/defaults/spopd.conf
index f9380357..8006f3b3 100644
--- a/app/config/defaults/spopd.conf
+++ b/app/config/defaults/spopd.conf
@@ -1,38 +1,38 @@
-# RuneAudio SPOP configuration
-# SPOP Spotify client daemon by Thomas Jost (Schnouki)
-# GitHub repo: https://github.com/Schnouki/spop
-
-### Spotify auth settings ###
-[spop]
-spotify_username = user
-spotify_password = pass
-
-### Audio settings ###
-audio_output = ao
-high_bitrate = true
-offline_high_bitrate = true
-
-### Cache settings ###
-#cache_size = 0
-cache_path =
-settings_path = /tmp/spop
-
-### Network settings ###
-#listen_address = 127.0.0.1
-#listen_port = 6602
-## proxy_config
-#proxy=http://proxy.lan:3128
-#proxy_username=
-#proxy_password=
-
-### System settings ###
-log_file = /var/log/runeaudio/spopd.log
-#plugins = scrobble
-
-[scrobble]
-# API endpoint of the scrobbling service you're using.
-# - Last.FM: http://post.audioscrobbler.com:80/
-# - Libre.FM: http://turtle.libre.fm/
-api_endpoint = http://post.audioscrobbler.com:80/
-username = user
-password = pass
+# RuneAudio SPOP configuration
+# SPOP Spotify client daemon by Thomas Jost (Schnouki)
+# GitHub repo: https://github.com/Schnouki/spop
+
+### Spotify auth settings ###
+[spop]
+spotify_username = user
+spotify_password = pass
+
+### Audio settings ###
+audio_output = ao
+high_bitrate = true
+offline_high_bitrate = true
+
+### Cache settings ###
+#cache_size = 0
+cache_path =
+settings_path = /tmp/spop
+
+### Network settings ###
+#listen_address = 127.0.0.1
+#listen_port = 6602
+## proxy_config
+#proxy=http://proxy.lan:3128
+#proxy_username=
+#proxy_password=
+
+### System settings ###
+log_file = /var/log/runeaudio/spopd.log
+#plugins = scrobble
+
+[scrobble]
+# API endpoint of the scrobbling service you're using.
+# - Last.FM: http://post.audioscrobbler.com:80/
+# - Libre.FM: http://turtle.libre.fm/
+api_endpoint = http://post.audioscrobbler.com:80/
+username = user
+password = pass
diff --git a/app/config/defaults/wpa_supplicant.conf b/app/config/defaults/wpa_supplicant.conf
index d5d66e7e..40abe098 100644
--- a/app/config/defaults/wpa_supplicant.conf
+++ b/app/config/defaults/wpa_supplicant.conf
@@ -1,2 +1,2 @@
-ctrl_interface=/var/run/wpa_supplicant
-update_config=1
+ctrl_interface=/var/run/wpa_supplicant
+update_config=1
diff --git a/app/config_ctl.php b/app/config_ctl.php
new file mode 100644
index 00000000..4efb9ea9
--- /dev/null
+++ b/app/config_ctl.php
@@ -0,0 +1,34 @@
+.
+ *
+ * file: app/config_ctl.php
+ * version: 1.3
+ * coder: Simone De Gregori
+ *
+ */
+
\ No newline at end of file
diff --git a/app/credits_ctl.php b/app/credits_ctl.php
old mode 100644
new mode 100755
index 5a2ae29c..87eeddb6
--- a/app/credits_ctl.php
+++ b/app/credits_ctl.php
@@ -33,4 +33,5 @@
*/
$template->buildversion = $redis->get('buildversion');
+ $template->release = $redis->get('release');
\ No newline at end of file
diff --git a/app/dev_ctl.php b/app/dev_ctl.php
index 8bee4b72..b361e581 100755
--- a/app/dev_ctl.php
+++ b/app/dev_ctl.php
@@ -87,6 +87,7 @@
$template->debug = $redis->get('debug');
$template->playerid = $redis->get('playerid');
$template->opcache = $redis->get('opcache');
+$template->gitbranch = $redis->hGet('git', 'branch');
// debug
// var_dump($template->dev);
// var_dump($template->debug);
diff --git a/app/libs/composer.json b/app/libs/composer.json
index 29f3f8d6..bbf45b3b 100644
--- a/app/libs/composer.json
+++ b/app/libs/composer.json
@@ -1,5 +1,5 @@
-{
- "require": {
- "league/plates": "1.1.*",
- }
+{
+ "require": {
+ "league/plates": "1.1.*",
+ }
}
\ No newline at end of file
diff --git a/app/libs/runeaudio.php b/app/libs/runeaudio.php
index a8f1749b..85dda101 100755
--- a/app/libs/runeaudio.php
+++ b/app/libs/runeaudio.php
@@ -95,14 +95,8 @@ function sendMpdCommand($sock, $cmd)
if (isset($sock['resource'])) {
$sock = $sock['resource'];
}
- if ($cmd == 'cmediafix') {
- socket_write($sock, 'pause\n', strlen('pause\n'));
- usleep(500000);
- socket_write($sock, 'pause\n', strlen('pause\n'));
- } else {
- $cmd = $cmd."\n";
- socket_write($sock, $cmd, strlen($cmd));
- }
+ $cmd = $cmd."\n";
+ socket_write($sock, $cmd, strlen($cmd));
runelog("MPD COMMAND: (socket=".$sock.")", $cmd);
}
@@ -339,14 +333,8 @@ function sendSpopCommand($sock, $cmd)
if (isset($sock['resource'])) {
$sock = $sock['resource'];
}
- if ($cmd == 'cmediafix') {
- socket_write($sock, 'toggle\n', strlen('toggle\n'));
- usleep(500000);
- socket_write($sock, 'toggle\n', strlen('toggle\n'));
- } else {
- $cmd = $cmd."\n";
- socket_write($sock, $cmd, strlen($cmd));
- }
+ $cmd = $cmd."\n";
+ socket_write($sock, $cmd, strlen($cmd));
runelog("SPOP COMMAND: (socket=".$sock.")", $cmd);
//ui_notify('COMMAND GIVEN','CMD = '.$cmd,'','.9');
}
@@ -587,6 +575,12 @@ function deleteBookmark($redis, $id)
return $return;
}
+
+// browseDB
+// $sock = MPD Socket
+// $browsemode = ("file", etc.)
+// $query = the path ("NAS/Music", etc.)
+
function browseDB($sock,$browsemode,$query) {
switch ($browsemode) {
case 'file':
@@ -750,11 +744,17 @@ function sysCmd($syscmd)
return $output;
}
-function sysCmdAsync($syscmd) {
-exec($syscmd." > /dev/null 2>&1 &", $output);
-// runelog('sysCmdAsync($str)',$syscmd);
-// runelog('sysCmdAsync() output:',$output);
-return $output;
+function sysCmdAsync($syscmd, $waitsec = null) {
+ if (isset($waitsec)) {
+ $cmdstr = "/var/www/command/cmd_async ".base64_encode($syscmd);
+ } else {
+ $cmdstr = "/var/www/command/cmd_async ".base64_encode($syscmd);
+ }
+ exec($cmdstr." > /dev/null 2>&1 &", $output);
+ runelog('sysCmdAsync($cmdstr) decoded', $syscmd, __FUNCTION__);
+ runelog('sysCmdAsync($cmdstr) encoded', $cmdstr, __FUNCTION__);
+ runelog('sysCmdAsync() output:', $output, __FUNCTION__);
+ return $output;
}
function getMpdDaemonDetalis()
@@ -774,7 +774,9 @@ function _parseFileListResponse($resp)
if (is_null($resp)) {
return null;
} else {
+
$plistArray = array();
+ $plistAlphabet = array();
$plistLine = strtok($resp, "\n");
// $plistFile = "";
$plCounter = -1;
@@ -794,6 +796,21 @@ function _parseFileListResponse($resp)
$dirCounter++;
// $plistFile = $value;
$plistArray[$plCounter]['directory'] = $value;
+
+ //
+ // Set up server side Alphabet Navigation
+ // get the first letter, and if it is unique, send it along in the JSON for this item
+ $str = strtoupper(substr($value, strrpos($value, '/') + 1, 1));
+
+ if (!in_array($str, $plistAlphabet)) {
+ // working with only letters for now
+ if (preg_match('/^\s*[a-z,A-Z]/', $str) > 0) {
+ array_push($plistAlphabet, $str);
+ $plistArray[$plCounter]['firstLetter'] = $str;
+ };
+ }
+ //
+
} else if ($browseMode) {
if ( $element === 'Album' ) {
$plCounter++;
@@ -1197,7 +1214,11 @@ function runelog($title, $data = null, $function_name = null)
error_log($function_name.'### '.$title.' ### [\''.$key.'\'] => '.$value,0);
}
} else {
- error_log($function_name.'### '.$title.' ### '.$data,0);
+ $msg = $function_name.'### '.$title.' ### ';
+ if (isset($data)) {
+ $msg = $msg.$data;
+ }
+ error_log($msg,0);
}
}
$store->close();
@@ -1213,7 +1234,7 @@ function waitSyWrk($redis, $jobID)
}
} elseif (!empty($jobID)) {
do {
- usleep(650000);
+ usleep(650000);
} while ($redis->sIsMember('w_lock', $jobID));
}
}
@@ -1235,7 +1256,8 @@ function wrk_control($redis, $action, $data)
break;
}
// debug
- runelog('[wrk] wrk_control($redis,'.$action.','.$data.') jobID=', $jobID);
+ $msg = '[wrk] wrk_control($redis,'.$action.','.$data.') jobID='.$jobID;
+ runelog(msg); // [TODO] check this
return $jobID;
}
@@ -1298,29 +1320,24 @@ function wrk_backup($bktype)
function wrk_opcache($action, $redis)
{
+// debug
+runelog('wrk_opcache ', $action);
switch ($action) {
case 'prime':
- if ($redis->get('opcache') == 1) {
- $ch = curl_init('http://localhost/command/cachectl.php?action=prime');
- curl_exec($ch);
- curl_close($ch);
- }
- runelog('wrk_opcache ', $action);
+ opcache_reset();
+ if ($redis->get('opcache') == 1) sysCmd('curl http://127.0.0.1/command/cachectl.php?action=prime');
break;
case 'forceprime':
- $ch = curl_init('http://localhost/command/cachectl.php?action=prime');
- curl_exec($ch);
- curl_close($ch);
- runelog('wrk_opcache ', $action);
+ opcache_reset();
+ sysCmd('curl http://127.0.0.1/command/cachectl.php?action=prime');
break;
case 'reset':
- $ch = curl_init('http://localhost/command/cachectl.php?action=reset');
- curl_exec($ch);
- curl_close($ch);
- runelog('wrk_opcache ', $action);
+ // sysCmd('curl http://127.0.0.1/clear');
+ // reset cache
+ OpCacheCtl('reset', '/srv/http/');
+ opcache_reset();
break;
case 'enable':
- wrk_opcache('reset');
// opcache.ini
$file = '/etc/php/conf.d/opcache.ini';
$newArray = wrk_replaceTextLine($file, '', 'opcache.enable', 'opcache.enable=1', 'zend_extension', 1);
@@ -1328,10 +1345,9 @@ function wrk_opcache($action, $redis)
$fp = fopen($file, 'w');
fwrite($fp, implode("", $newArray));
fclose($fp);
- runelog('wrk_opcache ', $action);
+ $redis->set('opcache', 1);
break;
case 'disable':
- wrk_opcache('reset');
// opcache.ini
// -- REWORK NEEDED --
$file = '/etc/php/conf.d/opcache.ini';
@@ -1340,18 +1356,19 @@ function wrk_opcache($action, $redis)
$fp = fopen($file, 'w');
fwrite($fp, implode("", $newArray));
fclose($fp);
- runelog('wrk_opcache ', $action);
+ $redis->set('opcache', 0);
break;
}
}
function wrk_netconfig($redis, $action, $args = null, $configonly = null)
{
-$updateh = 0;
+ // nics blacklist
+ $excluded_nics = array('ifb0', 'ifb1', 'p2p0', 'bridge');
+
+ $updateh = 0;
switch ($action) {
case 'setnics':
- // nics blacklist
- $excluded_nics = array('ifb0', 'ifb1', 'p2p0', 'bridge');
// flush nics Redis hash table
$transaction = $redis->multi();
$transaction->del('nics');
@@ -1381,44 +1398,71 @@ function wrk_netconfig($redis, $action, $args = null, $configonly = null)
$transaction->hSet('nics', $interface , json_encode(array('ip' => $ip[0], 'netmask' => $netmask, 'gw' => $gw[0], 'dns1' => $dns[0], 'dns2' => $dns[1], 'speed' => $speed[0],'wireless' => 0)));
}
}
- //// if ($scanwifi) sysCmdAsync('/var/www/command/refresh_nics');
- // check wpa_supplicant auto-start and purge interface list
- $wpa_supplicant_start = sysCmd("ls -lah /etc/systemd/system/multi-user.target.wants/wpa_supplicant@*.service | cut -d '@' -f 2 | cut -d '.' -f 1");
- $disable_wpa_supplicant = array_diff($wpa_supplicant_start, $interfaces);
- if (!empty($disable_wpa_supplicant)) {
- foreach ($disable_wpa_supplicant as $interface_name) {
- unlink('/etc/systemd/system/multi-user.target.wants/wpa_supplicant@'.$interface_name.'.service');
- }
- }
$transaction->exec();
break;
case 'getnics':
- foreach ($redis->hGetAll('nics') as $interface => $details) {
- $interfaces[$interface] = json_decode($details);
+ $interfaces = sysCmd("ip addr |grep \"BROADCAST,\" |cut -d':' -f1-2 |cut -d' ' -f2");
+ $interfaces = array_diff($interfaces, $excluded_nics);
+ foreach ($interfaces as $interface) {
+ $ip = sysCmd("ip addr list ".$interface." |grep \"inet \" |cut -d' ' -f6|cut -d/ -f1");
+ $netmask = sysCmd("ip addr list ".$interface." |grep \"inet \" |cut -d' ' -f6|cut -d/ -f2");
+ if (isset($netmask[0]) && isset($ip[0])) {
+ $netmask = "255.255.255.0";//netmask($netmask[0]);
+ } else {
+ unset($netmask);
+ }
+ if (isset($netmask[0])) {
+ $gw = sysCmd("route -n |grep \"0.0.0.0\" |grep \"UG\" |cut -d' ' -f10");
+ $dns = sysCmd("cat /etc/resolv.conf |grep \"nameserver\" |cut -d' ' -f2");
+ }
+ $type = sysCmd("iwconfig ".$interface." 2>&1 | grep \"no wireless\"");
+ if (empty($type[0])) {
+ $speed = sysCmd("iwconfig ".$interface." 2>&1 | grep 'Bit Rate' | cut -d ':' -f 2 | cut -d ' ' -f 1-2");
+ $currentSSID = sysCmd("iwconfig ".$interface." | grep 'ESSID' | cut -d ':' -f 2 | cut -d '\"' -f 2");
+ $actinterfaces[$interface] = (object) ['ip' => $ip[0], 'netmask' => $netmask, 'gw' => $gw[0], 'dns1' => $dns[0], 'dns2' => $dns[1], 'speed' => $speed[0], 'wireless' => 1, 'currentssid' => $currentSSID[0]];
+ $redis->hSet('nics', $interface , json_encode(array('ip' => $ip[0], 'netmask' => $netmask, 'gw' => $gw[0], 'dns1' => $dns[0], 'dns2' => $dns[1], 'speed' => $speed[0],'wireless' => 1, 'currentssid' => $currentSSID[0])));
+ } else {
+ $speed = sysCmd("ethtool ".$interface." 2>&1 | grep -i speed | cut -d':' -f2");
+ $actinterfaces[$interface] = (object) ['ip' => $ip[0], 'netmask' => $netmask, 'gw' => $gw[0], 'dns1' => $dns[0], 'dns2' => $dns[1], 'speed' => $speed[0], 'wireless' => 0];
+ $redis->hSet('nics', $interface , json_encode(array('ip' => $ip[0], 'netmask' => $netmask, 'gw' => $gw[0], 'dns1' => $dns[0], 'dns2' => $dns[1], 'speed' => $speed[0],'wireless' => 0)));
+ }
}
- return $interfaces;
+ return $actinterfaces;
+ break;
+ case 'getstoredwlans':
+ sysCmd('/www/command/refresh_nics');
+ $wlans_profiles = json_decode($redis->Get('stored_profiles'));
+ foreach ($wlans_profiles as $profile) {
+ runelog(' Get stored wlan profiles:'.$profile);
+ if ($nicdetail->currentssid === $profile) {
+ $connected = 1;
+ } else {
+ $connected = 0;
+ }
+ $wlans[] = json_encode(array('ssid' => $profile, 'encryption' => 'on', 'connected' => $connected, 'storedprofile' => 1));
+ }
+ return $wlans;
break;
case 'writecfg':
// ArchLinux netctl config for wired ethernet
$nic = "Description='".$args->name." connection'\n";
$nic .= "Interface=".$args->name."\n";
- $nic .= "ForceConnect=yes\n";
- $nic .= "SkipNoCarrier=yes\n";
if ($args->wireless === '1') {
// Wireless configuration
$nic .= "Connection=wireless\n";
- $nic .= "Security=wpa-config\n";
- $nic .= "WPAConfigFile='/etc/wpa_supplicant/wpa_supplicant.conf'\n";
+ $nic .= "Security=wpa-configsection\n";
} else {
// Wired configuration
+ $nic .= "ForceConnect=yes\n";
+ $nic .= "SkipNoCarrier=yes\n";
$nic .= "Connection=ethernet\n";
}
if ($args->dhcp === '1') {
// DHCP configuration
$nic .= "IP=dhcp\n";
// Prepare data object for Redis record
- $args = array( 'name' => $args->name, 'dhcp' => $args->dhcp );
- $args = (object) $args;
+ $dhcpargs = array( 'name' => $args->name, 'dhcp' => $args->dhcp );
+ $dhcpargs = (object) $args;
} else {
// STATIC configuration
$nic .= "AutoWired=yes\n";
@@ -1431,8 +1475,66 @@ function wrk_netconfig($redis, $action, $args = null, $configonly = null)
$nic .= "DNS=('".$args->dns1."')\n";
}
}
- // ntp sync after connect
- $nic .= "ExecUpPost='/usr/bin/ntpd -gq || true'\n";
+ if ($args->wireless === '1') {
+ $nic .= "WPAConfigSection=(\n";
+ if ($args->newssid === "add") {
+ $nic .= " 'ssid=\"".$args->ssid."\"'\n";
+ $nic .= " 'scan_ssid=1'\n";
+ } else {
+ $nic .= " 'ssid=\"".$args->newssid."\"'\n";
+ }
+ //$key = $args->key;
+ switch ($args->encryption) {
+ case 'none':
+ $nic .= " 'key_mgmt=NONE'\n";
+ break;
+ case 'wep':
+ $nic .= " 'key_mgmt=NONE'\n";
+ $nic .= " 'wep_tx_keyidx=0'\n";
+ $wepkey = $args->key;
+ if (ctype_xdigit($wepkey) && (strlen($wepkey) == 10 OR strlen($wepkey) == 26 OR strlen($wepkey) == 32)) {
+ $nic .= " 'wep_key0=".$wepkey."'\n";
+ } elseif (strlen($wepkey) <= 16) {
+ $nic .= " 'wep_key0=\"".$wepkey."\"'\n";
+ } else {
+ $nic .= " 'wep_key0=\"* wrong wepkey *\"'\n";
+ ui_notify_async('WIFI-Config ERROR', "You entered a wrong key!\n");
+ return '';
+ }
+ // auth_alg=SHARED
+ break;
+ case 'wpa':
+ $wpakey = $args->key;
+ if (ctype_xdigit($wpakey) && strlen($wpakey) == 64) {
+ $nic .= " 'psk=".$wpakey."'\n";
+ } elseif (strlen($wpakey) >= 8 && strlen($wpakey) <= 63) {
+ $nic .= " 'psk=\"".$wpakey."\"'\n";
+ } else {
+ $nic .= " 'psk=\"* wrong wepkey *\"'\n";
+ ui_notify_async('WIFI-Config ERROR', "You entered a wrong key!\n");
+ return '';
+ }
+ $nic .= " 'key_mgmt=WPA-PSK'\n";
+ if (strpos($args->ie, "WPA2") !== false) {
+ $nic .= " 'proto=RSN'\n";
+ } else {
+ $nic .= " 'proto=WPA'\n";
+ }
+ if (strpos($args->GroupCipher, "CCMP") !== false) {
+ $nic .= " 'group=CCMP'\n";
+ } else {
+ $nic .= " 'group=TKIP'\n";
+ }
+ if (strpos($args->PairwiseCiphers1, "CCMP") !== false OR strpos($args->PairwiseCiphers2, "CCMP") !== false) {
+ $nic .= " 'pairwise=CCMP'\n";
+ } else {
+ $nic .= " 'pairwise=TKIP'\n";
+ }
+ }
+ $nic .= " 'priority=3'\n";
+ $nic .= ")\n";
+ }
+
// set advanced DNS options
$newArray = wrk_replaceTextLine('/etc/resolvconf.conf', '', 'resolv_conf_options=', "resolv_conf_options=('timeout:".$redis->hGet('resolvconf', 'timeout')." attempts:".$redis->hGet('resolvconf', 'attempts')."')", '#name_servers=127.0.0.1', 1);
// Commit changes to /etc/resolvconf.conf
@@ -1443,11 +1545,27 @@ function wrk_netconfig($redis, $action, $args = null, $configonly = null)
sysCmd('resolvconf -u');
// write current network config
- $redis->set($args->name, json_encode($args));
- $fp = fopen('/etc/netctl/'.$args->name, 'w');
+ runelog("wireless = ".$args->wireless);
+ if ($args->wireless === '1') {
+ // wireless
+ runelog("save as wireless");
+ if ($args->newssid === "add") {
+ $redis->Set($args->ssid, json_encode($args));
+ $fp = fopen('/etc/netctl/'.$args->ssid, 'w');
+ } else {
+ $redis->Set($args->newssid, json_encode($args));
+ $fp = fopen('/etc/netctl/'.$args->newssid, 'w');
+ }
+ } else {
+ // wired
+ runelog("save as wired");
+ $redis->Set($args->name, json_encode($args));
+ $fp = fopen('/etc/netctl/'.$args->name, 'w');
+ }
fwrite($fp, $nic);
fclose($fp);
if (!isset($configonly)) $updateh = 1;
+ //$updateh = 1;
break;
case 'manual':
$file = '/etc/netctl/'.$args['name'];
@@ -1466,195 +1584,68 @@ function wrk_netconfig($redis, $action, $args = null, $configonly = null)
break;
}
if ($updateh === 1) {
- runelog('wireless NIC?', $args->wireless);
+ sysCmd('mpc pause');
+ //sysCmd('systemctl stop mpd');
// activate configuration (RuneOS)
- wrk_mpdPlaybackStatus($redis, 'record');
- sysCmd('netctl stop '.$args->name);
- sysCmd('ip addr flush dev '.$args->name);
- if ($args->dhcp === '1') {
- // dhcp configuration
- if ($args->wireless !== '1') {
- // $cmd = 'systemctl enable ifplugd@'.$args->name;
- sysCmd("ln -s '/usr/lib/systemd/system/netctl-ifplugd@.service' '/etc/systemd/system/multi-user.target.wants/netctl-ifplugd@".$args->name.".service'");
- sysCmd('systemctl daemon-reload');
- sysCmd('systemctl start netctl-ifplugd@'.$args->name);
+ runelog("wireless = ".$args->wireless);
+ if ($args->wireless !== '1') {
+ sysCmd('systemctl reenable netctl-ifplugd@'.$args->name);
+ if ($args->reboot === '1') {
+ runelog('**** reboot requested ****', $args->name);
+ $return = 'reboot';
+ } else {
+ runelog('**** no reboot requested ****', $args->name);
+ sysCmd('systemctl restart netctl-ifplugd@'.$args->name);
+ $return = '';
}
- // sysCmd('systemctl daemon-reload');
} else {
- // static configuration
- if ($args->wireless !== '1') {
- // $cmd = 'systemctl disable ifplugd@'.$args->name;
- sysCmd("rm '/etc/systemd/system/multi-user.target.wants/netctl-ifplugd@".$args->name.".service'");
- sysCmd('systemctl daemon-reload');
- // kill ifplugd
- sysCmd('killall ifplugd');
- }
- // get pids of dhcpcd
- $pids = sysCmd('pgrep -xf "dhcpcd -4 -q -t 30 -L '.$args->name.'"');
- foreach ($pids as $pid) {
- // debug
- runelog('kill pid:', $pid);
- // kill dhcpcd
- sysCmd('kill '.$pid);
- }
+ sysCmd('systemctl reenable netctl-auto@'.$args->name);
+ sysCmd('systemctl restart netctl-auto@'.$args->name);
+ sysCmd('netctl-auto enable '.$args->newssid);
+ sysCmd('netctl-auto switch-to '.$args->newssid);
+ runelog('**** wireless => do not reboot ****', $args->name);
+ $return = '';
}
- // start netctl profile for wired nics
- if ($args->wireless !== '1') sysCmd('netctl start '.$args->name);
- sysCmd('systemctl restart mpd');
- // set process priority
- sysCmdAsync('sleep 1 && rune_prio nice');
}
// update hash if necessary
$updateh === 0 || $redis->set($args->name.'_hash', md5_file('/etc/netctl/'.$args->name));
if (wrk_mpdPlaybackStatus($redis, 'laststate') === 'playing') sysCmd('mpc play');
-}
-
-function wrk_wifiprofile($redis, $action, $args)
-{
- switch ($action) {
- case 'add':
- $args->id = wrk_wpa_cli('add', $args);
- if ($args->id !== false) {
- unset($args->action);
- $return = $redis->hSet('wlan_profiles', $args->ssid, json_encode($args));
- }
- break;
- case 'edit':
- if(wrk_wpa_cli('edit', $args, $redis)) {
- unset($args->action);
- unset($args->edit);
- $return = $redis->hSet('wlan_profiles', $args->ssid, json_encode($args));
- }
- break;
- case 'delete':
- if (wrk_wpa_cli('delete', $args)) $return = $redis->hDel('wlan_profiles', $args->ssid);
- break;
- case 'connect':
- if (wrk_wpa_cli('connect')) {
- $redis->Set('wlan_autoconnect', 1);
- $return = 1;
- }
- break;
- case 'disconnect':
- if (wrk_wpa_cli('disconnect')) {
- $redis->Set('wlan_autoconnect', 0);
- $return = 1;
- }
- break;
- }
return $return;
}
-function wrk_wpa_cli($action, $args = null, $redis = null)
+function wrk_wifiprofile($redis, $action, $args)
{
- $return = 0;
- // debug
- runelog('**** wrk_wpa_cli() START ****');
- runelog('----- wrk_wpa_cli() args:',$args);
- runelog('----- wrk_wpa_cli() action:',$action);
switch ($action) {
case 'add':
- // add wpa entry in the stack
- $wlanid = sysCmd('wpa_cli add_network');
- $args->id = $wlanid[1];
- // debug
- runelog('wrk_wpa_cli('.$action.'): assigned wlan ID', $args->id);
- $wpa_cli_response = wrk_wpa_cli('store', $args);
- if ($wpa_cli_response) {
- if (isset($args->connect)) {
- wrk_wpa_cli('connect');
- }
- $return = $args->id;
- } else {
- // rollback
- sysCmd('wpa_cli remove_network '.$args->id);
- $return = false;
- }
+ runelog('**** wrk_wifiprofile ADD ****', $args->ssid);
+ wrk_wifiprofile($redis, 'connect', $args);
break;
case 'edit':
- $args->edit = 1;
- if (isset($args->connect)) {
- unset($args->connect);
- $connect = 1;
- }
- if (wrk_wpa_cli('store', $args, $redis)) {
- if ($connect) wrk_wpa_cli('connect');
- $return = 1;
- }
- break;
- case 'store':
- // set default set password command
- $cmd_pass = "wpa_cli set_network ".$args->id." psk '\"".$args->key."\"'";
- if (isset($args->edit)) {
- $stored_profile = json_decode($redis->hGet('wlan_profiles',$args->ssid));
- if ($stored_profile->encryption === $args->encryption) {
- // select correct change password command
- $cmd_pass = "wpa_cli new_password ".$args->id." '\"".$args->key."\"'";
- } else {
- // remove and
- if (wrk_wpa_cli('delete', $args)) {
- unset($args->edit);
- wrk_wpa_cli('add', $args);
- } else {
- $return = false;
- break;
- }
- }
- }
- // set the SSID
- $wpa_cli_response = sysCmd("wpa_cli set_network ".$args->id." ssid '\"".$args->ssid."\"'");
- // set the encryption type
- if ($wpa_cli_response[1] === 'OK') {
- if ($args->encryption === 'open') {
- $wpa_cli_response = sysCmd('wpa_cli set_network '.$args->id.' key_mgmt NONE');
- }
- if ($args->encryption === 'wpa') {
- $wpa_cli_response = sysCmd('wpa_cli set_network '.$args->id.' key_mgmt WPA-PSK');
- // store the encryption key
- $wpa_cli_response = sysCmd($cmd_pass);
- }
- if ($args->encryption === 'wep') {
- $wpa_cli_response = sysCmd('wpa_cli set_network '.$args->id.' key_mgmt NONE');
- // store the encryption key
- if (isset($chpass)) {
- $wpa_cli_response = sysCmd("wpa_cli new_password ".$args->id." '\"".$args->key."\"'");
- } else {
- $wpa_cli_response = sysCmd("wpa_cli set_network ".$args->id." wep_key0 '\"".$args->key."\"'");
- }
- }
- }
- // enable the new network profile
- if ($wpa_cli_response[1] === 'OK') $wpa_cli_response = sysCmd('wpa_cli enable_network '.$args->id);
- // save configuration file
- if ($wpa_cli_response[1] === 'OK') $wpa_cli_response = sysCmd('wpa_cli save_config');
- if ($wpa_cli_response[1] === 'OK') {
- $return = true;
- } else {
- $return = false;
- }
+ runelog('**** wrk_wifiprofile EDIT ****', $args->ssid);
+ wrk_wifiprofile($redis, 'connect', $args);
break;
case 'delete':
- $wpa_cli_response = sysCmd('wpa_cli remove_network '.$args->id);
- if ($wpa_cli_response[1] === 'OK') $wpa_cli_response = sysCmd('wpa_cli save_config');
- if ($wpa_cli_response[1] === 'OK') {
- $return = 1;
- } else {
- $return = false;
- }
+ runelog('**** wrk_wifiprofile DELETE ****', $args->ssid);
+ wrk_wifiprofile($redis, 'disconnect', $args);
+ $redis->Del($args->ssid);
+ $redis->Del('stored_profiles');
+ sysCmd("rm /etc/netctl/".$args->ssid);
+ sysCmdAsync("systemctl restart netctl-auto@".$args->nic);
+ $return = 1;
break;
case 'connect':
- // TODO: enhance, catch the event "CTRL-EVENT-CONNECTED" instead of "OK" response from wpa_cli
- $wpa_cli_response = sysCmd('wpa_cli reconnect');
- if ($wpa_cli_response[1] === 'OK') $return = 1;
+ runelog('**** wrk_wifiprofile CONNECT ****', $args->ssid);
+ sysCmdAsync("netctl-auto switch-to ".$args->ssid);
+ $redis->Set('wlan_autoconnect', 1);
+ $return = 1;
break;
case 'disconnect':
- $wpa_cli_response = sysCmd('wpa_cli disconnect');
- if ($wpa_cli_response[1] === 'OK') $return = 1;
+ runelog('**** wrk_wifiprofile DISCONNECT ****', $args->ssid);
+ sysCmdAsync("netctl-auto disable ".$args->ssid);
+ $redis->Set('wlan_autoconnect', 0);
+ $return = 1;
break;
}
- // debug
- runelog('----- wrk_wpa_cli() exit status',$return);
- runelog('**** wrk_wpa_cli() STOP ****');
return $return;
}
@@ -1855,6 +1846,12 @@ function wrk_i2smodule($redis, $args)
}
switch ($args) {
case 'none':
+ //
+ // Not sure this section works as expected, but I added the "Remove"
+ // commands to address what could be added by selecting Transducer
+ sysCmd('rmmod snd_soc_rpi_dac').usleep(300000);
+ sysCmd('rmmod snd_soc_pcm1794a').usleep(300000);
+ //
sysCmd('rmmod snd_soc_iqaudio_dac').usleep(300000);
sysCmd('rmmod snd_soc_hifiberry_digi').usleep(300000);
sysCmd('rmmod snd_soc_hifiberry_dac').usleep(300000);
@@ -1862,7 +1859,8 @@ function wrk_i2smodule($redis, $args)
sysCmd('rmmod snd_soc_wm8804').usleep(300000);
sysCmd('rmmod snd_soc_pcm512x').usleep(300000);
sysCmd('rmmod snd_soc_pcm5102a');
- break;
+
+ break;
case 'berrynos':
sysCmd('modprobe bcm2708_dmaengine').usleep(300000);
sysCmd('modprobe snd_soc_wm8804').usleep(300000);
@@ -1919,6 +1917,16 @@ function wrk_i2smodule($redis, $args)
sysCmd('modprobe snd_soc_pcm512x').usleep(300000);
sysCmd('modprobe snd_soc_iqaudio_dac');
break;
+ //
+ // Adding an entry for the Musica Pristina Trtasnducer DAC, based on PCM 1794
+ case 'transducer':
+ sysCmd('modprobe snd_soc_bcm2708_i2s').usleep(300000);
+ sysCmd('modprobe bcm2708_dmaengine').usleep(300000);
+ sysCmd('modprobe snd_soc_pcm1794a').usleep(300000);
+ sysCmd('modprobe snd_soc_rpi_dac');
+ break;
+
+ //
}
$redis->set('i2smodule', $args);
wrk_mpdconf($redis, 'refresh');
@@ -1949,6 +1957,13 @@ function wrk_kernelswitch($redis, $args)
function wrk_mpdconf($redis, $action, $args = null, $jobID = null)
{
+// check if we are in "advanced mode" (manual edit mode)
+if ($action === 'reset') {
+ $redis->set('mpdconf_advanced', 0);
+ $mpdconf_advanced = 0;
+} else {
+ $mpdconf_advanced = $redis->get('mpdconf_advanced');
+}
// set mpd.conf file header
$header = "###################################\n";
$header .= "# Auto generated mpd.conf file\n";
@@ -2051,8 +2066,8 @@ function wrk_mpdconf($redis, $action, $args = null, $jobID = null)
// --- decoder plugin ---
$output .="\n";
$output .="decoder {\n";
- $output .="plugin \t\"ffmpeg\"\n";
- $output .="enabled \"".$value."\"\n";
+ $output .="\tplugin \t\"ffmpeg\"\n";
+ $output .="\tenabled \"".$value."\"\n";
$output .="}\n";
continue;
}
@@ -2060,17 +2075,22 @@ function wrk_mpdconf($redis, $action, $args = null, $jobID = null)
// --- input plugin ---
$output .="\n";
$output .="input {\n";
- $output .="plugin \t\"curl\"\n";
+ $output .="\tplugin \t\"curl\"\n";
if ($redis->hget('proxy','enable') === '1') {
- $output .="proxy \t\"".($redis->hget('proxy', 'host'))."\"\n";
+ $output .="\tproxy \t\"".($redis->hget('proxy', 'host'))."\"\n";
if ($redis->hget('proxy','user') !== '') {
- $output .="proxy_user \t\"".($redis->hget('proxy', 'user'))."\"\n";
- $output .="proxy_password \t\"".($redis->hget('proxy', 'pass'))."\"\n";
+ $output .="\tproxy_user \t\"".($redis->hget('proxy', 'user'))."\"\n";
+ $output .="\tproxy_password \t\"".($redis->hget('proxy', 'pass'))."\"\n";
}
}
$output .="}\n";
continue;
}
+ // if ($value === '1') {
+ // $value = 'yes';
+ // } else if ($value === '0') {
+ // $value = 'no';
+ // }
$output .= $param." \t\"".$value."\"\n";
}
$output = $header.$output;
@@ -2080,16 +2100,17 @@ function wrk_mpdconf($redis, $action, $args = null, $jobID = null)
runelog('detected ACARDS ', $acards, __FUNCTION__);
$ao = $redis->Get('ao');
$sub_count = 0;
- foreach ($acards as $card) {
+ foreach ($acards as $main_acard_name => $main_acard_details) {
$card_decoded = new stdClass();
- $card_decoded = json_decode($card);
+ $card_decoded = json_decode($main_acard_details);
// debug
- runelog('decoded ACARD ', $card_decoded, __FUNCTION__);
+ runelog('decoded ACARD '.$card_decoded->name, $card_decoded, __FUNCTION__);
+ // handle sub-interfaces
if (isset($card_decoded->integrated_sub) && $card_decoded->integrated_sub === 1) {
// record UI audio output name
$current_card = $card_decoded->name;
- if ($sub_count >= 1) continue;
- $card_decoded = json_decode($card_decoded->real_interface);
+ // if ($sub_count >= 1) continue;
+ // $card_decoded = json_decode($card_decoded->real_interface);
runelog('current AO ----> ', $ao, __FUNCTION__);
// var_dump($ao);
runelog('current card_name ----> ', $card_decoded->name, __FUNCTION__);
@@ -2101,54 +2122,61 @@ function wrk_mpdconf($redis, $action, $args = null, $jobID = null)
// debug
runelog('this is a sub_interface', __FUNCTION__);
$sub_interface = 1;
+ // debug
$sub_count++;
runelog('sub_count', $sub_count, __FUNCTION__);
}
$output .="\n";
$output .="audio_output {\n";
- $output .="name \t\t\"".$card_decoded->name."\"\n";
- $output .="type \t\t\"".$card_decoded->type."\"\n";
- $output .="device \t\t\"".$card_decoded->device."\"\n";
+ // $output .="name \t\t\"".$card_decoded->name."\"\n";
+ if (isset($sub_interface)) {
+ $output .="\tname \t\t\"".$card_decoded->name."\"\n";
+ } else {
+ $output .="\tname \t\t\"".$main_acard_name."\"\n";
+ }
+ $output .="\ttype \t\t\"".$card_decoded->type."\"\n";
+ $output .="\tdevice \t\t\"".$card_decoded->device."\"\n";
if (isset($hwmixer)) {
- $output .="mixer_type \t\"hardware\"\n";
- if (isset($card_decoded->mixer_device)) {
- $output .="mixer_device \t\"".$card_decoded->mixer_device."\"\n";
- } else {
- $output .="mixer_device \t\"hw:".$card_decoded->device."\"\n";
- }
- if (isset($card_decoded->mixer_control)) {
- $output .="mixer_control \t\"".$card_decoded->mixer_control."\"\n";
+ if (isset($card_decoded->mixer_control)) {
+ $output .="\tmixer_control \t\"".$card_decoded->mixer_control."\"\n";
+ $output .="\tmixer_type \t\"hardware\"\n";
+ $output .="\tmixer_device \t\"".substr($card_decoded->device, 0, 4)."\"\n";
} else {
- $output .="mixer_control \t\"".alsa_findHwMixerControl(substr($card_decoded->device, 4, 1)).",0\"\n";
+ if (!isset($sub_interface)) {
+ $output .="\tmixer_control \t\"".alsa_findHwMixerControl(substr($card_decoded->device, 5, 1))."\"\n";
+ }
}
- $output .="mixer_index \t\"0\"\n";"\t\t \t\"0\"\n";
- }
- if ($mpdcfg['dsd_usb'] === 'yes') $output .="dsd_usb \t\"yes\"\n";
- $output .="auto_resample \t\"no\"\n";
- $output .="auto_format \t\"no\"\n";
- if (isset($sub_interface_selected)) {
- // use UI selector name to enable a sub_interface (ex. switch between AnalogOut / HDMI on RaspberryPI)
- $output .="enabled \t\"yes\"\n";
- } else {
- // normal condition
- if ($ao === $card_decoded->name) $output .="enabled \t\"yes\"\n";
+ // $output .="\tmixer_index \t\"0\"\n";"\t\t \t\"0\"\n";
}
+ if ($mpdcfg['dsd_usb'] === 'yes') $output .="\tdsd_usb \t\"yes\"\n";
+ $output .="\tauto_resample \t\"no\"\n";
+ $output .="\tauto_format \t\"no\"\n";
+ if ($ao === $main_acard_name) $output .="\tenabled \t\"yes\"\n";
$output .="}\n";
- // unset($current_card);
- // unset($sub_interface);
- // unset($card_decoded);
+ unset($sub_interface);
// debug
- runelog('conf output (in loop)', $output, __FUNCTION__);
+ // runelog('conf output (in loop)', $output, __FUNCTION__);
}
$output .="\n";
// debug
- runelog('raw mpd.conf', $output, __FUNCTION__);
- // write mpd.conf file
- $fh = fopen('/etc/mpd.conf', 'w');
- fwrite($fh, $output);
- fclose($fh);
- // update hash
- $redis->set('mpdconfhash', md5_file('/etc/mpd.conf'));
+ // runelog('raw mpd.conf', $output, __FUNCTION__);
+ // check if mpd.conf was modified outside RuneUI (advanced mode)
+ runelog('mpd.conf advanced state', $mpdconf_advanced);
+ if ($mpdconf_advanced !== '1' OR $mpdconf_advanced === '') {
+ if ($mpdconf_advanced !== '') {
+ runelog('mpd.conf advanced mode OFF');
+ } else {
+ runelog('mpd.conf advanced mode RESET STATE');
+ }
+ // write mpd.conf file
+ $fh = fopen('/etc/mpd.conf', 'w');
+ fwrite($fh, $output);
+ fclose($fh);
+ // update hash
+ $redis->set('mpdconfhash', md5_file('/etc/mpd.conf'));
+ } else {
+ runelog('mpd.conf advanced mode ON');
+ }
break;
case 'update':
foreach ($args as $param => $value) {
@@ -2169,7 +2197,7 @@ function wrk_mpdconf($redis, $action, $args = null, $jobID = null)
sysCmd($interface_details->route_cmd);
// TODO: improove this function
sysCmd('amixer -c 0 set PCM unmute');
- $mpdout = $interface_details->sysname;
+ // $mpdout = $interface_details->sysname;
}
wrk_mpdconf($redis, 'writecfg');
wrk_shairport($redis, $args);
@@ -2355,12 +2383,20 @@ function wrk_sourcecfg($redis, $action, $args)
switch ($action) {
case 'add':
// unset($args->id);
+ runelog('KEW wrk_sourcecfg PRE redis incr(mountidx)', $args->id);
+
$args->id = $redis->incr('mountidx');
+
+ runelog('KEW wrk_sourcecfg POST', $args->id);
+
$args = (array) $args;
$redis->hMset('mount_'.$args['id'], $args);
$return = wrk_sourcemount($redis, 'mount', $args['id']);
break;
case 'edit':
+
+ runelog('KEW wrk_sourcecfg PRE edit', $args->id);
+
$mp = $redis->hGetAll('mount_'.$args->id);
$args = (array) $args;
$redis->hMset('mount_'.$args['id'], $args);
@@ -2657,6 +2693,8 @@ function alsa_findHwMixerControl($cardID)
$cmd = "amixer -c ".$cardID." |grep \"mixer control\"";
$str = sysCmd($cmd);
$hwmixerdev = substr(substr($str[0], 0, -(strlen($str[0]) - strrpos($str[0], "'"))), strpos($str[0], "'")+1);
+ runelog('Try to find HwMixer control (str): ', $str);
+ runelog('Try to find HwMixer control: (output)', $hwmixerdev);
return $hwmixerdev;
}
@@ -3054,7 +3092,7 @@ function netmask($bitcount)
}
// sort multi-dimensional array by key
-function osort(&$array, $key)
+function osort($array, $key)
{
usort($array, function($a, $b) use ($key) {
return $a->$key > $b->$key ? 1 : -1;
diff --git a/app/libs/vendor/evenement/evenement/LICENSE b/app/libs/vendor/evenement/evenement/LICENSE
index d9a37d0a..dfb5651d 100644
--- a/app/libs/vendor/evenement/evenement/LICENSE
+++ b/app/libs/vendor/evenement/evenement/LICENSE
@@ -1,19 +1,19 @@
-Copyright (c) 2011 Igor Wiedler
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is furnished
-to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
+Copyright (c) 2011 Igor Wiedler
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/app/libs/vendor/league/plates/LICENSE b/app/libs/vendor/league/plates/LICENSE
index 26357d46..e8f025cc 100644
--- a/app/libs/vendor/league/plates/LICENSE
+++ b/app/libs/vendor/league/plates/LICENSE
@@ -1,21 +1,21 @@
-The MIT License (MIT)
-
-Copyright (c) 2013 The League of Extraordinary Packages
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+The MIT License (MIT)
+
+Copyright (c) 2013 The League of Extraordinary Packages
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
\ No newline at end of file
diff --git a/app/libs/vendor/react/promise/LICENSE b/app/libs/vendor/react/promise/LICENSE
index 9bfcd411..7298c68d 100644
--- a/app/libs/vendor/react/promise/LICENSE
+++ b/app/libs/vendor/react/promise/LICENSE
@@ -1,22 +1,22 @@
-Copyright (c) 2012 Jan Sorgalla
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
+Copyright (c) 2012 Jan Sorgalla
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
diff --git a/app/libs/vendor/react/react/LICENSE b/app/libs/vendor/react/react/LICENSE
index a808108c..c5678ca9 100644
--- a/app/libs/vendor/react/react/LICENSE
+++ b/app/libs/vendor/react/react/LICENSE
@@ -1,19 +1,19 @@
-Copyright (c) 2012 Igor Wiedler, Chris Boden
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is furnished
-to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
+Copyright (c) 2012 Igor Wiedler, Chris Boden
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/app/libs/vendor/react/react/tests/Dns/Fixtures/etc/resolv.conf b/app/libs/vendor/react/react/tests/Dns/Fixtures/etc/resolv.conf
index cae093a8..c3b2b3d1 100644
--- a/app/libs/vendor/react/react/tests/Dns/Fixtures/etc/resolv.conf
+++ b/app/libs/vendor/react/react/tests/Dns/Fixtures/etc/resolv.conf
@@ -1 +1 @@
-nameserver 8.8.8.8
+nameserver 8.8.8.8
diff --git a/app/network_ctl.php b/app/network_ctl.php
index e3d7fbab..d406379a 100755
--- a/app/network_ctl.php
+++ b/app/network_ctl.php
@@ -34,40 +34,44 @@
// inspect POST
if (isset($_POST)) {
- if (isset($_POST['nic'])) {
+ if (isset($_POST['nic']) && !isset($_POST['wifiprofile'])) {
+ //ui_notify_async("'wrkcmd' => 'netcfg', 'action' => 'config'", $_POST['nic']);
$redis->get($_POST['nic']['name']) === json_encode($nic) || $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'netcfg', 'action' => 'config', 'args' => $_POST['nic']));
}
if (isset($_POST['refresh'])) {
+ //ui_notify_async("'wrkcmd' => 'netcfg', 'action' => 'refresh'", $_POST['nic']);
$jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'netcfg', 'action' => 'refresh'));
}
if (isset($_POST['wifiprofile'])) {
switch ($_POST['wifiprofile']['action']) {
case 'add':
+ //ui_notify_async("'wrkcmd' => 'wificfg', 'action' => 'add'", $_POST['wifiprofile']);
$jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'wificfg', 'action' => 'add', 'args' => $_POST['wifiprofile']));
break;
case 'edit':
+ //ui_notify_async("'wrkcmd' => 'wificfg', 'action' => 'edit'", $_POST['wifiprofile']);
$jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'wificfg', 'action' => 'edit', 'args' => $_POST['wifiprofile']));
break;
case 'delete':
+ //ui_notify_async("'wrkcmd' => 'wificfg', 'action' => 'delete'", $_POST['wifiprofile']);
$jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'wificfg', 'action' => 'delete', 'args' => $_POST['wifiprofile']));
break;
+ case 'connect':
+ //ui_notify_async("'wrkcmd' => 'wificfg', 'action' => 'connect'", $_POST['wifiprofile']);
+ $jobID[] = wrk_control($redis, 'newjob', $data = array( 'wrkcmd' => 'wificfg', 'action' => 'connect', 'args' => $_POST['wifiprofile'] ));
+ break;
case 'disconnect':
+ //ui_notify_async("'wrkcmd' => 'wificfg', 'action' => 'disconnect'", $_POST['wifiprofile']);
$jobID[] = wrk_control($redis, 'newjob', $data = array( 'wrkcmd' => 'wificfg', 'action' => 'disconnect', 'args' => $_POST['wifiprofile'] ));
break;
}
}
- // if (isset($_POST['wifidelete'])) {
- // $jobID[] = wrk_control($redis,'newjob', $data = array( 'wrkcmd' => 'wificfg', 'action' => 'delete', 'args' => $_POST['wifidelete'] ));
- // }
- if (isset($_POST['wpa_cli'])) {
- $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'wificfg', 'action' => 'wpa_cli', 'args' => $_POST['wpa_cli']));
- }
}
waitSyWrk($redis,$jobID);
$template->nics = wrk_netconfig($redis, 'getnics');
$template->wlan_autoconnect = $redis->Get('wlan_autoconnect');
-if ($redis->hExists('wlan_profiles', urldecode($template->uri(4)))) $template->stored = 1;
+if ($redis->Exists(urldecode($template->uri(4)))) $template->stored = 1;
if (isset($template->action)) {
// check if we are into interface details (ex. http://runeaudio/network/edit/eth0)
if (isset($template->arg)) {
@@ -97,8 +101,10 @@
if ($template->nic->wireless === 1) {
$template->wlans = json_decode($redis->get('wlans'));
$template->wlan_profiles = new stdClass();
- if ($wlan_profiles = $redis->hGetAll('wlan_profiles')) foreach ($wlan_profiles as $key => $value) {
- $template->wlan_profiles->{$key} = json_decode($value);
+ if ($wlan_profiles = wrk_netconfig($redis, 'getstoredwlans')) {
+ foreach ($wlan_profiles as $key => $value) {
+ $template->wlan_profiles->{$key} = json_decode($value);
+ }
}
}
// we are in the wlan subtemplate (ex. http://runeaudio/network/wlan/....)
diff --git a/app/settings_ctl.php b/app/settings_ctl.php
index ed09373a..43f9c7b8 100755
--- a/app/settings_ctl.php
+++ b/app/settings_ctl.php
@@ -147,12 +147,6 @@
$redis->hGet('spotify','enable') == 0 || $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'spotify', 'action' => 'stop'));
}
}
- // ----- C-MEDIA FIX -----
- if (isset($_POST['cmediafix'][1])){
- $redis->get('cmediafix') == 1 || $redis->set('cmediafix', 1);
- } else {
- $redis->get('cmediafix') == 0 || $redis->set('cmediafix', 0);
- }
// ----- SYSTEM COMMANDS -----
if (isset($_POST['syscmd'])){
if ($_POST['syscmd'] === 'reboot') $jobID[] = wrk_control($redis, 'newjob', $data = array('wrkcmd' => 'reboot'));
@@ -183,7 +177,6 @@
$template->coverart = $redis->get('coverart');
$template->globalrandom = $redis->get('globalrandom');
$template->lastfm = $redis->hGetAll('lastfm');
-$template->cmediafix = $redis->get('cmediafix');
$template->proxy = $redis->hGetAll('proxy');
$template->spotify = $redis->hGetAll('spotify');
$template->hwplatformid = $redis->get('hwplatformid');
diff --git a/app/sources_ctl.php b/app/sources_ctl.php
index 06586352..4026d03a 100644
--- a/app/sources_ctl.php
+++ b/app/sources_ctl.php
@@ -42,7 +42,7 @@
if ($_POST['mount']['wsize'] == '') $_POST['mount']['wsize'] = 17408;
if ($_POST['mount']['options'] == '') {
if ($_POST['mount']['type'] === 'cifs' OR $_POST['mount']['type'] === 'osx') {
- $_POST['mount']['options'] = "cache=none,ro";
+ $_POST['mount']['options'] = "cache=none,noserverino,ro";
} else {
$_POST['mount']['options'] = "nfsvers=3,ro";
}
diff --git a/app/templates/api_lo.php b/app/templates/api_lo.php
new file mode 100644
index 00000000..2ff2b278
--- /dev/null
+++ b/app/templates/api_lo.php
@@ -0,0 +1,8 @@
+error2 = error_get_last();
+
+echo json_encode($this);
+
+?>
\ No newline at end of file
diff --git a/app/templates/config.php b/app/templates/config.php
new file mode 100644
index 00000000..5bba2766
--- /dev/null
+++ b/app/templates/config.php
@@ -0,0 +1,8 @@
+
+
+
+
+
connecting...
+
+
+
\ No newline at end of file
diff --git a/app/templates/credits.php b/app/templates/credits.php
index 105ddb43..9dfb4bd2 100755
--- a/app/templates/credits.php
+++ b/app/templates/credits.php
@@ -3,7 +3,7 @@
\ No newline at end of file
+
diff --git a/app/templates/network.php b/app/templates/network.php
index 970d44e5..b01e4d88 100644
--- a/app/templates/network.php
+++ b/app/templates/network.php
@@ -11,7 +11,11 @@
List of active network interfaces. Click on an entry to configure the corresponding connection.
\ No newline at end of file
diff --git a/app/templates/network_edit.php b/app/templates/network_edit.php
index 39c2f1ba..4ca640a9 100644
--- a/app/templates/network_edit.php
+++ b/app/templates/network_edit.php
@@ -3,6 +3,7 @@
nic->wireless === 1): ?>
The list of available Wi-Fi networks is automatically refreshed while you are on this page (so don't forget it open in your browser to avoid unnecessary system load).
+ Click on an entry to connect or to generate a new profile.
+ nic->wireless === 0): ?>
+