├── .editorconfig ├── .gitignore ├── .styleci.yml ├── LICENSE ├── README.md ├── assets ├── app.min.js ├── default.css ├── fonts │ ├── FontAwesome.otf │ ├── fontawesome-webfont.eot │ ├── fontawesome-webfont.svg │ ├── fontawesome-webfont.ttf │ ├── fontawesome-webfont.woff │ └── fontawesome-webfont.woff2 ├── img │ ├── background.png │ └── bg.png └── spiritofbonobo.css ├── composer.json ├── conf ├── config.ini └── users │ └── .gitkeep ├── index.php ├── locale ├── core.en.yml └── core.fr.yml ├── source ├── install.sh ├── kill_irssi.c ├── kill_irssi.h ├── kill_rtorrent.c ├── kill_rtorrent.h ├── main.c ├── start_irssi.c ├── start_irssi.h ├── start_rtorrent.c └── start_rtorrent.h ├── src ├── Controller │ ├── AdminController.php │ ├── DownloadController.php │ ├── HomeController.php │ └── InstallController.php ├── Middleware │ ├── Admin.php │ ├── Auth.php │ └── Installed.php ├── Seedbox │ ├── FileConfiguration.php │ ├── Install.php │ ├── Server.php │ ├── Users.php │ └── Utils.php ├── config.php ├── dependencies.php └── routes.php ├── themes ├── default │ ├── bower.json │ ├── css │ │ └── style.css │ ├── fonts │ │ └── .gitkeep │ ├── gulpfile.js │ ├── img │ │ └── background.png │ ├── js │ │ └── app.js │ └── package.json └── spiritofbonobo │ ├── bower.json │ ├── css │ └── style.css │ ├── gulpfile.js │ ├── img │ └── bg.png │ └── package.json ├── version.json └── view ├── admin.twig.html ├── index.twig.html ├── install.twig.html ├── layout.twig.html └── settings.twig.html /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | [*] 8 | end_of_line = lf 9 | charset = utf-8 10 | trim_trailing_whitespace = true 11 | insert_final_newline = true 12 | indent_style = space 13 | indent_size = 2 14 | 15 | [*.{diff,md}] 16 | trim_trailing_whitespace = false 17 | 18 | [*.{php,c,h,html}] 19 | indent_size = 4 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .htpasswd 2 | composer.lock 3 | reboot-rtorrent 4 | 5 | conf/users/*/ 6 | cache 7 | vendor 8 | bower_components 9 | node_modules 10 | 11 | !conf/users/.gitkeep 12 | 13 | roadmap.txt 14 | -------------------------------------------------------------------------------- /.styleci.yml: -------------------------------------------------------------------------------- 1 | preset: recommended 2 | 3 | enabled: 4 | - unalign_double_arrow 5 | 6 | disabled: 7 | - trailing_comma_in_multiline_array 8 | - align_double_arrow 9 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | {one line to give the program's name and a brief idea of what it does.} 635 | Copyright (C) {year} {name of author} 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | {project} Copyright (C) {year} {fullname} 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Description of seedbox-manager 2 | 3 | [![StyleCI](https://styleci.io/repos/18575839/shield?branch=master)](https://styleci.io/repos/18575839) 4 | 5 | seedbox-manager is web app for manage your seedbox. 6 | 7 | * reboot rtorrent session 8 | * custom links in navbar. 9 | * statistic server (load average, uptime) 10 | * download file config of filezilla and transdroid 11 | * admin area 12 | * logout for http basic authentication 13 | 14 | ## Installation 15 | 16 | *note : root privilege is required* 17 | 18 | ```bash 19 | cd /var/www 20 | git clone https://github.com/Magicalex/seedbox-manager.git 21 | cd seedbox-manager 22 | composer install 23 | chown -R www-data: /var/www/seedbox-manager 24 | cd source 25 | chmod +x install.sh && ./install.sh 26 | ``` 27 | 28 | ## Configuration 29 | 30 | *example : web server nginx* 31 | 32 | ```nginx 33 | server { 34 | listen 80 default_server; 35 | server_name _; 36 | 37 | charset utf-8; 38 | index index.php; 39 | 40 | access_log /var/log/nginx/seedbox-manager-access.log combined; 41 | error_log /var/log/nginx/seedbox-manager-error.log error; 42 | 43 | auth_basic "seedbox-manager"; 44 | auth_basic_user_file "/etc/nginx/passwd/password"; 45 | 46 | root /var/www; 47 | 48 | location / { 49 | try_files /seedbox-manager/$uri /seedbox-manager/index.php$is_args$args; 50 | } 51 | 52 | location ^~ /assets { 53 | alias /var/www/seedbox-manager/assets; 54 | } 55 | 56 | location ~ \.php$ { 57 | fastcgi_index index.php; 58 | include /etc/nginx/fastcgi_params; 59 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 60 | fastcgi_pass unix:/run/php/php7.0-fpm.sock; 61 | } 62 | } 63 | ``` 64 | 65 | In a uri like http://domain.tld/seedbox-manager 66 | 67 | ```nginx 68 | server { 69 | listen 80 default_server; 70 | server_name _; 71 | 72 | charset utf-8; 73 | index index.html index.php; 74 | 75 | auth_basic "seedbox"; 76 | auth_basic_user_file "/etc/nginx/passwd/password"; 77 | 78 | root /var/www; 79 | 80 | location /seedbox-manager { 81 | try_files /seedbox-manager/$uri /seedbox-manager/index.php$is_args$args; 82 | } 83 | 84 | location ~ \.php$ { 85 | fastcgi_index index.php; 86 | include /etc/nginx/fastcgi_params; 87 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 88 | fastcgi_pass unix:/run/php/php7.0-fpm.sock; 89 | } 90 | } 91 | ``` 92 | 93 | ## First connection 94 | 95 | Connect you to the interface with your rutorrent id. 96 | This will automatically generate configuration files for the current user. `./seedbox-manager/conf/users/{utilisateur}/config.ini` 97 | 98 | To obtain the admin rights : 99 | ```bash 100 | vi /var/www/seedbox-manager/conf/users/{utilisateur}/config.ini 101 | ``` 102 | and replace `admin = no` by `admin = yes` 103 | 104 | ## developement 105 | 106 | ```bash 107 | echo "127.0.0.1 sbm.dev" >> /etc/hosts 108 | php -S sbm.dev:8080 109 | ``` 110 | -------------------------------------------------------------------------------- /assets/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/al3xLvs/seedbox-manager/b14800d96cd1903315e99d28f3cc687e3a72c34c/assets/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /assets/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/al3xLvs/seedbox-manager/b14800d96cd1903315e99d28f3cc687e3a72c34c/assets/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /assets/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/al3xLvs/seedbox-manager/b14800d96cd1903315e99d28f3cc687e3a72c34c/assets/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /assets/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/al3xLvs/seedbox-manager/b14800d96cd1903315e99d28f3cc687e3a72c34c/assets/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /assets/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/al3xLvs/seedbox-manager/b14800d96cd1903315e99d28f3cc687e3a72c34c/assets/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /assets/img/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/al3xLvs/seedbox-manager/b14800d96cd1903315e99d28f3cc687e3a72c34c/assets/img/background.png -------------------------------------------------------------------------------- /assets/img/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/al3xLvs/seedbox-manager/b14800d96cd1903315e99d28f3cc687e3a72c34c/assets/img/bg.png -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "magicalex/seedbox-manager", 3 | "description": "Web app for manage your seedbox", 4 | "keywords": ["seedbox", "rtorrent"], 5 | "license": "GPL-3.0", 6 | "type": "project", 7 | "require": { 8 | "php": ">=5.6.0", 9 | "slim/slim": "^3.8", 10 | "slim/flash": "^0.2.0", 11 | "slim/twig-view": "^2.2", 12 | "symfony/translation": "^3.2", 13 | "symfony/twig-bridge": "^3.2", 14 | "symfony/config": "^3.2", 15 | "symfony/yaml": "^3.2", 16 | "magicalex/write-ini-file": "^1.2", 17 | "apfelbox/php-file-download": "^2.1" 18 | }, 19 | "authors": [ 20 | { 21 | "name": "Magicalex", 22 | "email": "magicalex@mondedie.fr" 23 | } 24 | ], 25 | "autoload": { 26 | "psr-4": { 27 | "App\\": "src" 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /conf/config.ini: -------------------------------------------------------------------------------- 1 | ; Seedbox manager 2 | ; Fichier de configuration 3 | 4 | [user] 5 | active_bloc_info = yes 6 | user_directory = "/" 7 | scgi_folder = "/RPC1" 8 | theme = "default" 9 | language = "fr" 10 | admin = no 11 | 12 | [nav] 13 | data_link = "url = https://rutorrent.domain.tld, name = rutorrent 14 | url = https://sickrage.domain.tld, name = sickrage" 15 | 16 | [ftp] 17 | active_ftp = yes 18 | port_ftp = 21 19 | port_sftp = 22 20 | 21 | [rtorrent] 22 | active_reboot = yes 23 | 24 | [support] 25 | adresse_mail = "contact@domain.tld" 26 | 27 | [logout] 28 | url = "https://mondedie.fr" 29 | -------------------------------------------------------------------------------- /conf/users/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/al3xLvs/seedbox-manager/b14800d96cd1903315e99d28f3cc687e3a72c34c/conf/users/.gitkeep -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | run(); 14 | -------------------------------------------------------------------------------- /locale/core.en.yml: -------------------------------------------------------------------------------- 1 | core: 2 | 3 | layout: 4 | information: Information 5 | enable_javascript: | 6 | Javascript isn't enabled or something stops it from running properly on your web browser
7 | To be able to use this interface, the activation of javascript is necessary 8 | modal: 9 | about_us: About us 10 | author: Web apps by MThibault, Micdu70, Magicalex and Hydrog3n 11 | contact_us: "Contact developers on github : https://github.com/Magicalex/seedbox-manager" 12 | version: Version 13 | close: Close 14 | 15 | header: 16 | logout: Log Out 17 | logout_message: Redirection to {url} 18 | about_us: About us 19 | administration: Administration 20 | settings: Settings 21 | support: Support 22 | 23 | index: 24 | dashboard: Dashboard 25 | succes_reboot_rtorrent: Your rtorrent session has been successfully started 26 | error_reboot_rtorrent: | 27 |

A problem occurred while restarting rtorrent

28 |

Check that the reboot-rtorrent is correctly compiled

29 | note: to recompile, please use the install.sh script 30 | log: Log 31 | command_exec: Command executed 32 | status: status 33 | result_command: result of the command 34 | new_version: New version available ! 35 | participants: Participants 36 | title_info_user: User account information 37 | ip_address: Your ip address 38 | disk_space: Disk space 39 | used: Used: 40 | available: Available: 41 | total: Total: 42 | octet: B 43 | kilo_octet: KB 44 | mega_octet: MB 45 | giga_octet: GB 46 | tera_octet: TB 47 | peta_octet: PB 48 | uptime_server: Server uptime 49 | days: days and 50 | hours: h 51 | minutes: min 52 | load_average: Server load 53 | load_average_1: Load average since 1 min 54 | load_average_5: Load average since 5 min 55 | load_average_15: Load average since 15 min 56 | info_load_good: Low load, optimum conditions 57 | info_load_warning: High load, risk of slowing down on the server 58 | info_load_danger: Very high load, risk of slowing down on the server 59 | title_access: FTP / SFTP / Transdroid - Access 60 | server_ftp: FTP and SFTP Server 61 | address_ftp: Address (S)FTP 62 | user_ftp: User (S)FTP 63 | port_ftp: FTP port 64 | port_sftp: SFTP port 65 | download_filezilla: Download filezilla 66 | configuration_file: Import configuration file 67 | app_transdroid: Transdroid Application 68 | folder_scgi: SCGI folder 69 | http_address: HTTP Address 70 | user_transdroid: User transdroid 71 | download_transdroid: Download Transdroid 72 | restart_rtorrent: Restart rtorrent 73 | last_restart: Last restart on 74 | modal: 75 | warning: Warning 76 | do_you_want_restart: Do you want to restart your rtorrent session ? 77 | restart_with_irssi: Restart irssi with rtorrent 78 | cancel: Cancel 79 | restart: Restart 80 | 81 | settings: 82 | setting_your_user: User setting 83 | success_update: Your preferences have been updated successfully 84 | impossible_to_update: Unable to update your setting ! 85 | check_rights: Check if you have write permission 86 | setting_interface: Interface Settings 87 | option_homepage: Home page options 88 | enable_info_user: Enable user information 89 | enable_access_ftp: Enable FTP, SFTP, Transdroid access information 90 | enable_reboot_rtorrent: Enable restarting rtorrent 91 | option_logout: Log out option 92 | url_to_redirect: Url redirection (during log out) 93 | themes: Default themes 94 | choose_theme: choose a theme 95 | language: Default language 96 | choose_language: choose a language 97 | save: Save 98 | 99 | admin: 100 | administration_area: Administration area 101 | success_update: The setting of user {username} have been successfully updated 102 | unable_to_update: Unable to update user setting {username} ! 103 | success_delete_user: The user {username} has been removed from Seedbox-Manager 104 | error_delete_user: Unable to delete user {username} 105 | list_user: Users list 106 | user: user 107 | edit: edit 108 | delete: delete 109 | setting_member: User settings 110 | legend_setting_user: User setting 111 | home_directory: User home folder 112 | folder_scgi: User scgi folder 113 | legend_navbar: Navbar 114 | follow_rules: Follow the syntax correctly to add links 115 | legend_setting_server: SFTP FTP server settings 116 | port_ftp: FTP port 117 | port_sftp: SFTP port 118 | legend_support: Support 119 | address_mail : E-mail address 120 | save: Save 121 | modal: 122 | delete_user: Deleting the user 123 | body: | 124 |

Are you sure you want to delete this user's configuration?

125 |

If your user logs in again the configuration files will be regenerated automatically (with a default configuration)

126 | cancel: Cancel 127 | delete: Delete 128 | 129 | lang: en 130 | date: "d/m/y \\a\\t h:i a" 131 | -------------------------------------------------------------------------------- /locale/core.fr.yml: -------------------------------------------------------------------------------- 1 | core: 2 | 3 | layout: 4 | information: Information 5 | enable_javascript: | 6 | Javascript n'est pas activé ou quelque chose empêche sa bonne exécution sur votre navigateur web.
7 | Pour pouvoir utiliser cette interface l'activation de javascript est nécessaire. 8 | modal: 9 | about_us: A propos 10 | author: Application web par MThibault, Micdu70, Magicalex et Hydrog3n 11 | contact_us: "Contacter les développeurs sur github : https://github.com/Magicalex/seedbox-manager" 12 | version: Version 13 | close: Fermer 14 | 15 | header: 16 | logout: Déconnexion 17 | logout_message: Redirection vers {url} 18 | about_us: A propos 19 | administration: Administration 20 | settings: Paramètres 21 | support: Support 22 | 23 | index: 24 | dashboard: Tableau de bord 25 | succes_reboot_rtorrent: Votre session rtorrent a été redémarré avec succès. 26 | error_reboot_rtorrent: | 27 |

Un problème est survenu lors du redémarrage de rtorrent

28 |

Il faut vérifier que reboot-rtorrent est correctement compilé

29 | note : pour recompiler, veuillez utiliser le script install.sh 30 | log: Log 31 | command_exec: commande exécutée 32 | status: statut 33 | result_command: résultat de la commande 34 | new_version: Nouvelle version disponible ! 35 | participants: Participants 36 | title_info_user: Information du compte utilisateur 37 | ip_address: Votre adresse ip 38 | disk_space: Espace disque 39 | used: Utilisé : 40 | available: Libre : 41 | total: Total : 42 | octet: O 43 | kilo_octet: Ko 44 | mega_octet: Mo 45 | giga_octet: Go 46 | tera_octet: To 47 | peta_octet: Po 48 | uptime_server: Temps de disponibilité du serveur 49 | days: jours et 50 | hours: h 51 | minutes: min 52 | load_average: Charge serveur 53 | load_average_1: Charge moyenne depuis 1 min 54 | load_average_5: Charge moyenne depuis 5 min 55 | load_average_15: Charge moyenne depuis 15 min 56 | info_load_good: Charge faible, conditions optimales 57 | info_load_warning: Charge élévée, risque de ralentissement sur le serveur 58 | info_load_danger: Charge très élévée, risque de gros ralentissement sur le serveur 59 | title_access: Les accès FTP - SFTP - Transdroid 60 | server_ftp: Serveur FTP et SFTP 61 | address_ftp: Adresse (s)FTP 62 | user_ftp: Utilisateur (s)FTP 63 | port_ftp: Port FTP 64 | port_sftp: Port sFTP 65 | download_filezilla: Télécharger filezilla 66 | configuration_file: Importer le fichier de configuration 67 | app_transdroid: Application Transdroid 68 | folder_scgi: Dossier SCGI 69 | http_address: Adresse HTTP 70 | user_transdroid: Utilisateur transdroid 71 | download_transdroid: Télécharger Transdroid 72 | restart_rtorrent: Redémarrer rtorrent 73 | last_restart: Dernier redémarrage le 74 | modal: 75 | warning: Avertissement 76 | do_you_want_restart: "Êtes-vous sûr de vouloir redémarrer votre session rtorrent ?" 77 | restart_with_irssi: Redémarrer irssi avec rtorrent 78 | cancel: Annuler 79 | restart: Redémarrer 80 | 81 | settings: 82 | setting_your_user: Paramètre utilisateur 83 | success_update: Vos préférences ont été mises à jour avec succès. 84 | impossible_to_update: Impossible de mettre à jour votre configuration ! 85 | check_rights: Vérifiez si vous avez les droits d'écriture. 86 | setting_interface: Paramètres de l'interface 87 | option_homepage: Options de la page d'accueil 88 | enable_info_user: Activer les informations utilisateur 89 | enable_access_ftp: "Activer les information d'accès ftp / sftp / transdroid" 90 | enable_reboot_rtorrent: Activer le redémarrage rtorrent 91 | option_logout: Option de déconnexion 92 | url_to_redirect: url de redirection (pendant la déconnexion) 93 | themes: Thèmes par defaut 94 | choose_theme: choisir un thème 95 | language: Langue par défaut 96 | choose_language: choisir une langue 97 | save: Enregistrer 98 | 99 | admin: 100 | administration_area: Espace administration 101 | success_update: Les paramètres de l'utilisateur {username} a été mise à jour avec succès. 102 | unable_to_update: Impossible de mettre à jour la configuration de l'utilisateur {username} ! 103 | success_delete_user: L'utilisateur {username} a été supprimé de Seedbox-Manager 104 | error_delete_user: Impossible de supprimer l'utilisateur {username}. 105 | list_user: Liste des utilisateurs 106 | user: utilisateur 107 | edit: éditer 108 | delete: supprimer 109 | setting_member: Paramètres de l'utilisateur 110 | legend_setting_user: Paramètres utilisateur 111 | home_directory: Dossier home de l'utilisateur 112 | folder_scgi: Dossier scgi de l'utilisateur 113 | legend_navbar: Barre de navigation 114 | follow_rules: Suivez correctement la syntaxe pour ajouter des liens 115 | legend_setting_server: Paramètres des serveurs FTP/sFTP 116 | port_ftp: Port FTP 117 | port_sftp: Port sFTP 118 | legend_support: Support 119 | address_mail : Adresse email 120 | save: Enregistrer 121 | modal: 122 | delete_user: Suppression de l'utilisateur 123 | body: | 124 |

Êtes-vous sûr de vouloir supprimer la configuration de cette utilisateur ?

125 |

Si votre utilisateur se connecte de nouveau, les fichiers de configuration seront regénéré automatiquement (avec une configuration par défaut)

126 | cancel: Annuler 127 | delete: Supprimer 128 | 129 | lang: fr 130 | date: "d/m/y à H\\hi" 131 | -------------------------------------------------------------------------------- /source/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # script pour compiler le programme c reboot-rtorrent 4 | # Auteur du programme c : backtoback 5 | 6 | gcc -v *.c -o reboot-rtorrent 7 | chown -c root:root reboot-rtorrent 8 | chmod -v 4755 reboot-rtorrent 9 | mv -v reboot-rtorrent .. 10 | -------------------------------------------------------------------------------- /source/kill_irssi.c: -------------------------------------------------------------------------------- 1 | #include "kill_irssi.h" 2 | 3 | void screen_irssi_kill(char nickname[]) 4 | { 5 | // Déclarations 6 | char chaine[100] = {0}; 7 | 8 | snprintf(chaine, 100, "su --command='screen -S irc_logger -X quit' %s\n", nickname); 9 | printf("%s", chaine); 10 | system(chaine); 11 | } 12 | -------------------------------------------------------------------------------- /source/kill_irssi.h: -------------------------------------------------------------------------------- 1 | #ifndef KILL_IRSSI_H 2 | #define KILL_IRSSI_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | // Prototypes 9 | void screen_irssi_kill(char nickname[]); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /source/kill_rtorrent.c: -------------------------------------------------------------------------------- 1 | #include "kill_rtorrent.h" 2 | 3 | void remove_lock_file(char nickname[]) 4 | { 5 | // Déclarations 6 | char chaine[100] = {0}; 7 | 8 | snprintf(chaine, 100, "rm /home/%s/.session/rtorrent.lock\n", nickname); 9 | printf("%s", chaine); 10 | system(chaine); 11 | } 12 | 13 | void screen_rtorrent_kill(char nickname[]) 14 | { 15 | // Déclarations 16 | char chaine[100] = {0}; 17 | 18 | snprintf(chaine, 100, "su --command='screen -S %s-rtorrent -X quit' %s\n", nickname, nickname); 19 | printf("%s", chaine); 20 | system(chaine); 21 | } 22 | -------------------------------------------------------------------------------- /source/kill_rtorrent.h: -------------------------------------------------------------------------------- 1 | #ifndef KILL_RTORRENT_H 2 | #define KILL_RTORRENT_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | // Prototypes 9 | void screen_rtorrent_kill(char nickname[]); 10 | void remove_lock_file(char nickname[]); 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /source/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | // Librairies Perso 7 | #include "start_rtorrent.h" 8 | #include "kill_rtorrent.h" 9 | #include "start_irssi.h" 10 | #include "kill_irssi.h" 11 | 12 | int main (int argc, char* argv[]) 13 | { 14 | // Déclarations 15 | // Chaine recevant le pseudo de l'utilisateur 16 | char nickname[20]; 17 | 18 | // On vérifie la présence d'un argument pour éviter l'erreur de segmentation 19 | if (argc < 2){ 20 | printf("ERREUR : Vous n'avez pas rentré de nom d'utilisateur en paramètre du programme.\n" 21 | "Usage : ./reboot-rtorrent \n" 22 | "Le programme va quitter, bye.\n"); 23 | return 101; 24 | } 25 | 26 | // setuid pour les droits root 27 | setuid(0); 28 | perror("setuid"); 29 | 30 | // Récupération du pseudo de l'utilisateur 31 | strncpy(nickname, argv[1], sizeof(nickname)); 32 | 33 | // Arrêt de la session rtorrent screen 34 | screen_rtorrent_kill(nickname); 35 | 36 | // Suppression du fichier rtorrent.lock 37 | remove_lock_file(nickname); 38 | 39 | // Appel de la fonction pour reboot rtorrent 40 | start_rtorrent(nickname); 41 | 42 | // Appel de la fonction pour lancer irssi si demander 43 | // Usage : ./reboot-rtorrent irssi 44 | if (argc > 2 && strcmp(argv[2], "irssi") == 0) { 45 | screen_irssi_kill (nickname); 46 | start_irssi (nickname); 47 | } 48 | 49 | return 0; 50 | } 51 | -------------------------------------------------------------------------------- /source/start_irssi.c: -------------------------------------------------------------------------------- 1 | #include "start_irssi.h" 2 | 3 | void start_irssi (char nickname[]) 4 | { 5 | // Déclarations 6 | char chaine[100] = {0}; 7 | 8 | snprintf(chaine, 100, "su --command='screen -dmS irc_logger irssi' %s\n", nickname); 9 | printf("%s", chaine); 10 | system (chaine); 11 | } 12 | -------------------------------------------------------------------------------- /source/start_irssi.h: -------------------------------------------------------------------------------- 1 | #ifndef START_IRSSI_H 2 | #define START_IRSSI_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | // Prototypes 9 | void start_irssi(char nickname[]); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /source/start_rtorrent.c: -------------------------------------------------------------------------------- 1 | #include "start_rtorrent.h" 2 | 3 | void start_rtorrent (char nickname[]) 4 | { 5 | // Déclarations 6 | char chaine[100] = {0}; 7 | 8 | snprintf(chaine, 100, "su --command='screen -dmS %s-rtorrent rtorrent' %s\n", nickname, nickname); 9 | printf("%s", chaine); 10 | system (chaine); 11 | } 12 | -------------------------------------------------------------------------------- /source/start_rtorrent.h: -------------------------------------------------------------------------------- 1 | #ifndef START_RTORRENT_H 2 | #define START_RTORRENT_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | // Prototypes 9 | void start_rtorrent(char nickname[]); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /src/Controller/AdminController.php: -------------------------------------------------------------------------------- 1 | view = $view; 26 | $this->flash = $flash; 27 | $this->router = $router; 28 | 29 | $this->username = Utils::getCurrentUser(); 30 | $this->fileini = Utils::getFileini($this->username); 31 | $this->user = new Users($this->fileini, $this->username); 32 | 33 | $translator->setLocale($this->user->language); 34 | } 35 | 36 | public function index(ServerRequestInterface $request, ResponseInterface $response) 37 | { 38 | return $this->view->render($response, 'admin.twig.html', [ 39 | 'user' => $this->user, 40 | 'member' => $this->user, 41 | 'all_users' => Utils::get_all_users(), 42 | 'notifications' => $this->flash->getMessages() 43 | ]); 44 | } 45 | 46 | public function user(ServerRequestInterface $request, ResponseInterface $response, $args) 47 | { 48 | $username = $args['username']; 49 | $member = new Users(__DIR__."/../../conf/users/{$username}/config.ini", $username); 50 | 51 | return $this->view->render($response, 'admin.twig.html', [ 52 | 'user' => $this->user, 53 | 'member' => $member, 54 | 'all_users' => Utils::get_all_users(), 55 | 'notifications' => $this->flash->getMessages() 56 | ]); 57 | } 58 | 59 | public function update(ServerRequestInterface $request, ResponseInterface $response, $args) 60 | { 61 | $param = $request->getParsedBody(); 62 | $username = $args['username']; 63 | $update = new WriteiniFile(__DIR__."/../../conf/users/{$username}/config.ini"); 64 | $update->update([ 65 | 'user' => [ 66 | 'user_directory' => $param['user_directory'], 67 | 'scgi_folder' => $param['scgi_folder'] 68 | ], 69 | 'nav' => [ 70 | 'data_link' => $param['data_link'] 71 | ], 72 | 'ftp' => [ 73 | 'port_ftp' => $param['port_ftp'], 74 | 'port_sftp' => $param['port_sftp'] 75 | ], 76 | 'support' => [ 77 | 'adresse_mail' => $param['adresse_mail'] 78 | ] 79 | ]); 80 | $logs = $update->write(); 81 | $this->flash->addMessage('admin_update_ini', $logs); 82 | 83 | return $response->withStatus(302)->withHeader('Location', $this->router->pathFor('adminProfil', ['username' => $username])); 84 | } 85 | 86 | public function delete(ServerRequestInterface $request, ResponseInterface $response) 87 | { 88 | $username = $request->getParsedBody()['deleteUserName']; 89 | $logs = Utils::delete_config_old_user(__DIR__."/../../conf/users/{$username}"); 90 | $this->flash->addMessage('admin_delete_user', $logs); 91 | $this->flash->addMessage('admin_delete_user', $username); 92 | 93 | return $response->withStatus(302)->withHeader('Location', $this->router->pathFor('admin')); 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /src/Controller/DownloadController.php: -------------------------------------------------------------------------------- 1 | getServerParams()['HTTP_HOST']; 18 | 19 | $username = Utils::getCurrentUser(); 20 | $fileini = Utils::getFileini($username); 21 | $user = new Users($fileini, $username); 22 | 23 | if ($file == 'filezilla') { 24 | $data = FileConfiguration::filezilla($user, $host); 25 | $file = 'filezilla.xml'; 26 | } elseif ($file == 'transdroid') { 27 | $data = FileConfiguration::transdroid($user, $host); 28 | $file = 'settings.json'; 29 | } else { 30 | return $response->withStatus(404); 31 | } 32 | 33 | $fileDownload = FileDownload::createFromString($data); 34 | $fileDownload->sendDownload($file); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/Controller/HomeController.php: -------------------------------------------------------------------------------- 1 | view = $view; 28 | $this->flash = $flash; 29 | $this->router = $router; 30 | 31 | $this->username = Utils::getCurrentUser(); 32 | $this->fileini = Utils::getFileini($this->username); 33 | $this->user = new Users($this->fileini, $this->username); 34 | $this->server = new Server(); 35 | 36 | $translator->setLocale($this->user->language); 37 | } 38 | 39 | public function index(ServerRequestInterface $request, ResponseInterface $response) 40 | { 41 | $read_data_reboot = Utils::readFileDataReboot(__DIR__."/../../conf/users/{$this->user->username}/data_reboot.txt"); 42 | $server = $request->getServerParams(); 43 | $host = $this->checkhttps($server); 44 | 45 | return $this->view->render($response, 'index.twig.html', [ 46 | 'host' => $host, 47 | 'ipUser' => $server['REMOTE_ADDR'], 48 | 'user' => $this->user, 49 | 'server' => $this->server, 50 | 'read_data_reboot' => $read_data_reboot, 51 | 'notifications' => $this->flash->getMessages() 52 | ]); 53 | } 54 | 55 | public function settings(ServerRequestInterface $request, ResponseInterface $response) 56 | { 57 | return $this->view->render($response, 'settings.twig.html', [ 58 | 'user' => $this->user, 59 | 'server' => $this->server, 60 | 'all_themes' => Utils::get_all_themes(), 61 | 'all_languages' => Utils::get_all_languages(), 62 | 'notifications' => $this->flash->getMessages() 63 | ]); 64 | } 65 | 66 | public function reboot(ServerRequestInterface $request, ResponseInterface $response) 67 | { 68 | $param = $request->getParsedBody(); 69 | $option = isset($param['irssi']) ? true : false; 70 | $reboot_rtorrent = $this->user->rebootRtorrent($option); 71 | $this->flash->addMessage('rtorrent', $reboot_rtorrent); 72 | 73 | return $response->withStatus(302)->withHeader('Location', $this->router->pathFor('home')); 74 | } 75 | 76 | public function update(ServerRequestInterface $request, ResponseInterface $response) 77 | { 78 | $param = $request->getParsedBody(); 79 | $update = new WriteiniFile($this->fileini); 80 | $update->update([ 81 | 'user' => [ 82 | 'active_bloc_info' => isset($param['active_bloc_info']) ? true : false, 83 | 'theme' => $param['theme'], 84 | 'language' => $param['language'] 85 | ], 86 | 'ftp' => [ 87 | 'active_ftp' => isset($param['active_ftp']) ? true : false 88 | ], 89 | 'rtorrent' => [ 90 | 'active_reboot' => isset($param['active_reboot']) ? true : false 91 | ], 92 | 'logout' => [ 93 | 'url' => $param['url'] 94 | ] 95 | ]); 96 | 97 | $logs = $update->write(); 98 | $this->flash->addMessage('update_ini_file', $logs); 99 | 100 | return $response->withStatus(302)->withHeader('Location', $this->router->pathFor('setting')); 101 | } 102 | 103 | protected function checkhttps($param) 104 | { 105 | $host = $param['HTTP_HOST']; 106 | if (isset($param['HTTPS'])) { 107 | $url = "https://{$host}"; 108 | } else { 109 | $url = "http://{$host}"; 110 | } 111 | 112 | return [ 113 | 'url' => $url, 114 | 'hostname' => $host 115 | ]; 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /src/Controller/InstallController.php: -------------------------------------------------------------------------------- 1 | view = $view; 21 | $this->router = $router; 22 | $this->username = Utils::getCurrentUser(); 23 | } 24 | 25 | public function index(ServerRequestInterface $request, ResponseInterface $response) 26 | { 27 | if (false === $this->isAlreadyInstalled()) { 28 | return $response->withStatus(302)->withHeader('Location', $this->router->pathFor('home')); 29 | } 30 | 31 | $user_name_php = Install::get_user_php(); 32 | $root_path = getcwd(); 33 | 34 | return $this->view->render($response, 'install.twig.html', [ 35 | 'username' => $this->username, 36 | 'user_php' => $user_name_php, 37 | 'root_path' => $root_path, 38 | 'theme' => 'default' 39 | ]); 40 | } 41 | 42 | protected function isAlreadyInstalled() 43 | { 44 | $path_conf = __DIR__.'/../../conf/users'; 45 | $path_reboot = __DIR__.'/../../reboot-rtorrent'; 46 | 47 | if (is_writable($path_conf) && Install::getChmod($path_reboot, 4) == 4755) { 48 | $result = true; 49 | } 50 | 51 | return isset($result) ? false : true; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/Middleware/Admin.php: -------------------------------------------------------------------------------- 1 | isAdmin === false) { 19 | return $response->withStatus(403); 20 | } 21 | 22 | return $next($request, $response); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Middleware/Auth.php: -------------------------------------------------------------------------------- 1 | getServerParams(); 13 | $auth = self::auth($server); 14 | 15 | if ($auth === false) { 16 | $response->getBody()->write('Error authentication'); 17 | 18 | return $response->withStatus(401); 19 | } 20 | 21 | return $next($request, $response); 22 | } 23 | 24 | protected function auth($server) 25 | { 26 | if (isset($_SERVER['REMOTE_USER']) || isset($_SERVER['PHP_AUTH_USER'])) { 27 | $auth = true; 28 | } 29 | 30 | return isset($auth) ? true : false; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Middleware/Installed.php: -------------------------------------------------------------------------------- 1 | router = $router; 17 | } 18 | 19 | public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next) 20 | { 21 | $username = Utils::getCurrentUser(); 22 | 23 | if (false === is_writable(__DIR__.'/../../conf/users')) { 24 | return $response->withStatus(302)->withHeader('Location', $next->router->pathFor('install')); 25 | } elseif (Install::getChmod(__DIR__.'/../../reboot-rtorrent', 4) != 4755) { 26 | return $response->withStatus(302)->withHeader('Location', $this->router->pathFor('install')); 27 | } elseif (false === file_exists(__DIR__."/../../conf/users/{$username}/config.ini")) { 28 | Install::create_new_user($username); 29 | } 30 | 31 | return $next($request, $response); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/Seedbox/FileConfiguration.php: -------------------------------------------------------------------------------- 1 | '."\n". 10 | ''."\n". 11 | ''."\n". 12 | ''."\n". 13 | ''.$host.''."\n". 14 | ''.$user->portFtp.''."\n". 15 | '0'."\n". 16 | '0'."\n". 17 | ''.$user->username.''."\n". 18 | ''."\n". 19 | '1'."\n". 20 | '0'."\n". 21 | 'MODE_DEFAULT'."\n". 22 | '0'."\n". 23 | 'UTF-8'."\n". 24 | '0'."\n". 25 | 'seedbox-'.$user->username.'-ftp'."\n". 26 | ''."\n". 27 | ''."\n". 28 | ''."\n". 29 | '0seedbox-'.$user->username.'-ftp '."\n". 30 | ''."\n". 31 | ''."\n". 32 | ''.$host.''."\n". 33 | ''.$user->portSftp.''."\n". 34 | '1'."\n". 35 | '0'."\n". 36 | ''.$user->username.''."\n". 37 | ''."\n". 38 | '1'."\n". 39 | '0'."\n". 40 | 'MODE_DEFAULT'."\n". 41 | '0'."\n". 42 | 'Auto'."\n". 43 | '0'."\n". 44 | 'seedbox-'.$user->username.'-sftp'."\n". 45 | ''."\n". 46 | ''."\n". 47 | ''."\n". 48 | '0seedbox-'.$user->username.'-sftp '."\n". 49 | ''."\n". 50 | ''."\n". 51 | ''; 52 | 53 | return $filezilla_xml; 54 | } 55 | 56 | public static function transdroid(Users $user, $host) 57 | { 58 | $trandroid_data = [ 59 | 'ui_swipe_labels' => false, 60 | 'alarm_vibrate' => false, 61 | 'alarm_enabled' => false, 62 | 'alarm_check_rss_feeds' => false, 63 | 'websites' => [], 64 | 'ui_refresh_interval' => '60', 65 | 'ui_hide_refresh' => false, 66 | 'search_sort_by' => 'sort_seeders', 67 | 'alarm_play_sound' => false, 68 | 'ui_enable_ads' => true, 69 | 'ui_only_show_transferring' => false, 70 | 'search_num_results' => '25', 71 | 'servers' => [[ 72 | 'port' => '443', 73 | 'host' => $host, 74 | 'ssl' => true, 75 | 'type' => 'daemon_rtorrent', 76 | 'password' => '', 77 | 'os_type' => 'type_linux', 78 | 'folder' => $user->scgi_folder, 79 | 'username' => $user->username, 80 | 'use_auth' => true, 81 | 'name' => 'seedbox-'.$user->username, 82 | 'base_ftp_url' => 'ftp://'.$user->username.'@'.$host.'/torrents/', 83 | 'download_alarm' => true, 84 | 'new_torrent_alarm' => true, 85 | 'ssl_accept_all' => true 86 | ]], 87 | 'alarm_interval' => '600000', 88 | 'rssfeeds' => [], 89 | 'ui_ask_before_remove' => true 90 | ]; 91 | 92 | return json_encode($trandroid_data, JSON_PRETTY_PRINT); 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /src/Seedbox/Install.php: -------------------------------------------------------------------------------- 1 | $name_user_php['name'], 'num_uid' => $uid_user_php]; 13 | } 14 | 15 | public static function check_uid_file($path_file) 16 | { 17 | if (false === file_exists($path_file)) { 18 | return false; 19 | } else { 20 | $uid = fileowner($path_file); 21 | 22 | return $uid; 23 | } 24 | } 25 | 26 | public static function getChmod($file, $precision) 27 | { 28 | if (false === file_exists($file)) { 29 | return false; 30 | } else { 31 | $precision = $precision * -1; 32 | $chmod = substr(sprintf('%o', fileperms($file)), $precision); 33 | 34 | return $chmod; 35 | } 36 | } 37 | 38 | public static function create_new_user($username) 39 | { 40 | $result = mkdir(__DIR__."/../../conf/users/{$username}", 0755, false); 41 | 42 | if (file_exists(__DIR__."/../../conf/users/{$username}")) { 43 | copy(__DIR__.'/../../conf/config.ini', __DIR__."/../../conf/users/{$username}/config.ini"); 44 | } 45 | 46 | return $result; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/Seedbox/Server.php: -------------------------------------------------------------------------------- 1 | $time['days'], 29 | 'hours' => $time['hours'], 30 | 'minutes' => $time['min'] 31 | ]; 32 | } 33 | 34 | public static function load_average() 35 | { 36 | $load_average = sys_getloadavg(); 37 | for ($i = 0; isset($load_average[$i]); $i++) { 38 | $load_average[$i] = round($load_average[$i], 2); 39 | } 40 | 41 | return $load_average; 42 | } 43 | 44 | public static function CheckUpdate() 45 | { 46 | $lifetime_cookie = time() + 3600 * 24; 47 | if (!isset($_COOKIE['seedbox-manager'])) { 48 | setcookie('seedbox-manager', 'check-update', $lifetime_cookie, '/', null, false, true); 49 | $url_repository = 'https://raw.githubusercontent.com/Magicalex/seedbox-manager/master/version.json'; 50 | $remote = json_decode(file_get_contents($url_repository)); 51 | if (self::VERSION !== $remote->version) { 52 | return $remote; 53 | } 54 | } 55 | 56 | return false; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/Seedbox/Users.php: -------------------------------------------------------------------------------- 1 | username = $user; 28 | $this->hydrate($setting_user_array); 29 | } 30 | 31 | private function hydrate(array $array) 32 | { 33 | $this->navbarLinks = (string) $array['nav']['data_link']; 34 | $this->enableInfo = (bool) $array['user']['active_bloc_info']; 35 | $this->isAdmin = (bool) $array['user']['admin']; 36 | $this->enableFtp = (bool) $array['ftp']['active_ftp']; 37 | $this->enableRtorrent = (bool) $array['rtorrent']['active_reboot']; 38 | $this->directory = (string) $array['user']['user_directory']; 39 | $this->scgi_folder = (string) $array['user']['scgi_folder']; 40 | $this->theme = (string) $array['user']['theme']; 41 | $this->language = (string) $array['user']['language']; 42 | $this->supportMail = (string) $array['support']['adresse_mail']; 43 | $this->logoutUrl = (string) $array['logout']['url']; 44 | $this->portFtp = (int) $array['ftp']['port_ftp']; 45 | $this->portSftp = (int) $array['ftp']['port_sftp']; 46 | $this->currentPath = getcwd(); 47 | } 48 | 49 | private static function convertFileSize($octets) 50 | { 51 | $unit = [ 52 | 'octet', 53 | 'kilo_octet', 54 | 'mega_octet', 55 | 'giga_octet', 56 | 'tera_octet', 57 | 'peta_octet' 58 | ]; 59 | for ($i = 0; $octets >= 1024; $i++) { 60 | $octets = $octets / 1024; 61 | } 62 | 63 | return [ 64 | 'octets' => round($octets, 2), 65 | 'unit' => $unit[$i] 66 | ]; 67 | } 68 | 69 | public function userdisk() 70 | { 71 | $total_disk = disk_total_space($this->directory); 72 | $used_disk = $total_disk - disk_free_space($this->directory); 73 | $percentage_used = round(($used_disk * 100) / $total_disk, 2); 74 | $free_disk = self::convertFileSize($total_disk - $used_disk); 75 | $used_disk = self::convertFileSize($used_disk); 76 | $total_disk = self::convertFileSize($total_disk); 77 | 78 | return [ 79 | 'used_disk' => $used_disk, 80 | 'free_disk' => $free_disk, 81 | 'total_disk' => $total_disk, 82 | 'percentage_used' => $percentage_used 83 | ]; 84 | } 85 | 86 | public function rebootRtorrent($irssi = false) 87 | { 88 | if ($irssi === true) { 89 | $command = "{$this->currentPath}/reboot-rtorrent {$this->username} irssi 2>&1"; 90 | } else { 91 | $command = "{$this->currentPath}/reboot-rtorrent {$this->username} 2>&1"; 92 | } 93 | exec($command, $log, $status); 94 | file_put_contents("{$this->currentPath}/conf/users/{$this->username}/data_reboot.txt", time()); 95 | 96 | return [ 97 | 'command' => $command, 98 | 'logReboot' => $log, 99 | 'statusReboot' => $status 100 | ]; 101 | } 102 | 103 | public function get_all_links() 104 | { 105 | $data_links = $this->navbarLinks; 106 | $data_links = preg_split("/\n/", $data_links); 107 | for ($i = 0; isset($data_links[$i]); $i++) { 108 | $array_link[] = preg_split("/\, /", $data_links[$i]); 109 | foreach ($array_link[$i] as $value) { 110 | $match_url = (bool) preg_match('#url =#', $value); 111 | $match_name = (bool) preg_match('#name =#', $value); 112 | if ($match_url === true) { 113 | $value = preg_replace('#url =#', '', $value); 114 | $value = trim($value); 115 | $data_url = ['url' => $value]; 116 | } 117 | if ($match_name === true) { 118 | $value = preg_replace('#name =#', '', $value); 119 | $value = trim($value); 120 | $data_name = ['name' => $value]; 121 | } 122 | } 123 | if (is_array(@$data_name) && is_array(@$data_url)) { 124 | $all_links[] = array_merge($data_name, $data_url); 125 | unset($data_name, $data_url); 126 | } 127 | } 128 | 129 | return isset($all_links) ? $all_links : null; 130 | } 131 | } 132 | -------------------------------------------------------------------------------- /src/Seedbox/Utils.php: -------------------------------------------------------------------------------- 1 | $date_reboot_rtorrent, 33 | 'file_exist' => $exist_reboot_rtorrent 34 | ]; 35 | } 36 | 37 | public static function get_all_users() 38 | { 39 | $scan = scandir(__DIR__.'/../../conf/users/'); 40 | foreach ($scan as $file_name) { 41 | if ($file_name != '.' && $file_name != '..' && is_dir(__DIR__."/../../conf/users/{$file_name}")) { 42 | $all_users[] = $file_name; 43 | } 44 | } 45 | 46 | return $all_users; 47 | } 48 | 49 | public static function delete_config_old_user($path_conf_user) 50 | { 51 | $scan = scandir($path_conf_user); 52 | foreach ($scan as $file_name) { 53 | if ($file_name != '.' && $file_name != '..') { 54 | $delete_file_log = @unlink($path_conf_user.'/'.$file_name); 55 | if ($delete_file_log === false) { 56 | return false; 57 | } 58 | } 59 | } 60 | 61 | $delete_folder_log = @rmdir($path_conf_user); 62 | if ($delete_folder_log === false) { 63 | return false; 64 | } 65 | 66 | return true; 67 | } 68 | 69 | public static function get_all_themes() 70 | { 71 | $scan = scandir(__DIR__.'/../../themes'); 72 | foreach ($scan as $folder_name) { 73 | if ($folder_name != '.' && $folder_name != '..' && is_dir(__DIR__."/../../themes/{$folder_name}")) { 74 | $all_themes[] = $folder_name; 75 | } 76 | } 77 | 78 | return $all_themes; 79 | } 80 | 81 | public static function get_all_languages() 82 | { 83 | $scan = scandir(__DIR__.'/../../locale'); 84 | foreach ($scan as $file_name) { 85 | if ($file_name != '.' && $file_name != '..' && is_file(__DIR__."/../../locale/{$file_name}")) { 86 | $var = explode('.', $file_name); 87 | $languages[] = $var[1]; 88 | } 89 | } 90 | 91 | return $languages; 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /src/config.php: -------------------------------------------------------------------------------- 1 | [ 5 | 'displayErrorDetails' => true, 6 | 'addContentLengthHeader' => true 7 | ] 8 | ]; 9 | -------------------------------------------------------------------------------- /src/dependencies.php: -------------------------------------------------------------------------------- 1 | getContainer(); 12 | 13 | $container['view'] = function ($container) { 14 | $view = new Twig(__DIR__.'/../view', ['cache' => __DIR__.'/../cache']); 15 | $basePath = rtrim(str_ireplace('index.php', '', $container['request']->getUri()->getBasePath()), '/'); 16 | $translator = $container->get('translate'); 17 | $view->addExtension(new TwigExtension($container['router'], $basePath)); 18 | $view->addExtension(new TranslationExtension($translator)); 19 | 20 | return $view; 21 | }; 22 | 23 | $container['flash'] = function () { 24 | return new Messages(); 25 | }; 26 | 27 | $container['translate'] = function () { 28 | $translator = new Translator('fr', new MessageSelector()); 29 | $translator->addLoader('yaml', new YamlFileLoader()); 30 | $files = glob(__DIR__.'/../locale/*.yml'); 31 | 32 | foreach ($files as $file) { 33 | $info = pathinfo($file); 34 | $lang = explode('.', $info['filename']); 35 | $lang = $lang[1]; 36 | 37 | $translator->addResource('yaml', $file, $lang); 38 | } 39 | 40 | return $translator; 41 | }; 42 | 43 | $container['\App\Controller\HomeController'] = function ($container) { 44 | $view = $container->get('view'); 45 | $flash = $container->get('flash'); 46 | $translator = $container->get('translate'); 47 | $router = $container->get('router'); 48 | 49 | return new \App\Controller\HomeController($view, $flash, $translator, $router); 50 | }; 51 | 52 | $container['\App\Controller\AdminController'] = function ($container) { 53 | $view = $container->get('view'); 54 | $flash = $container->get('flash'); 55 | $translator = $container->get('translate'); 56 | $router = $container->get('router'); 57 | 58 | return new \App\Controller\AdminController($view, $flash, $translator, $router); 59 | }; 60 | 61 | $container['\App\Controller\InstallController'] = function ($container) { 62 | $view = $container->get('view'); 63 | $router = $container->get('router'); 64 | 65 | return new \App\Controller\InstallController($view, $router); 66 | }; 67 | 68 | $container['\App\Controller\DownloadController'] = function () { 69 | return new \App\Controller\DownloadController(); 70 | }; 71 | -------------------------------------------------------------------------------- /src/routes.php: -------------------------------------------------------------------------------- 1 | add(new isAuth()); 8 | 9 | $app->group('/', function () { 10 | $this->get('', '\App\Controller\HomeController:index')->setName('home'); 11 | $this->get('settings', '\App\Controller\HomeController:settings')->setName('setting'); 12 | $this->get('admin', '\App\Controller\AdminController:index')->add(new isAdmin())->setname('admin'); 13 | $this->get('admin/{username:[a-z]+}', '\App\Controller\AdminController:user')->add(new isAdmin())->setname('adminProfil'); 14 | $this->get('download/{file:[a-z]+}', '\App\Controller\DownloadController:download')->setName('download'); 15 | $this->post('reboot', '\App\Controller\HomeController:reboot')->setName('reboot'); 16 | $this->post('settings/update', '\App\Controller\HomeController:update')->setName('updateSettingUser'); 17 | $this->post('admin/update/{username:[a-z]+}', '\App\Controller\AdminController:update')->add(new isAdmin())->setName('updateAdminUser'); 18 | $this->post('admin/delete', '\App\Controller\AdminController:delete')->add(new isAdmin())->setName('updateDeleteUser'); 19 | })->add(new checkInstall($container->get('router'))); 20 | 21 | $app->get('/install', '\App\Controller\InstallController:index')->setName('install'); 22 | -------------------------------------------------------------------------------- /themes/default/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "seedbox-manager", 3 | "version": "3.0.1", 4 | "authors": [ 5 | "Magicalex " 6 | ], 7 | "description": "Web app for manage your seedbox", 8 | "private": true, 9 | "dependencies": { 10 | "bootstrap": "3.3.x", 11 | "font-awsome": "4.x.x", 12 | "jquery-loader-plugin": "2.1.x" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /themes/default/css/style.css: -------------------------------------------------------------------------------- 1 | /* CODE CSS THEME DEFAULT */ 2 | 3 | @font-face { 4 | font-family: 'FontAwesome'; 5 | src: url('../assets/fonts/fontawesome-webfont.eot?v=4.7.0'); 6 | src: url('../assets/fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'), url('../assets/fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'), url('../assets/fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'), url('../assets/fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'), url('../assets/fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg'); 7 | font-weight: normal; 8 | font-style: normal; 9 | } 10 | 11 | ::-moz-selection { 12 | background: #ff3c78; 13 | color: #fff; 14 | } 15 | 16 | ::selection { 17 | background: #ff3c78; 18 | color: #fff; 19 | } 20 | 21 | body { 22 | background: url('../assets/img/background.png'); 23 | } 24 | 25 | ul { 26 | color: #5a5a5a; 27 | } 28 | 29 | .marg { 30 | padding: 15px; 31 | margin-bottom: 50px; 32 | background-color: #fff; 33 | border-radius: 2px; 34 | } 35 | 36 | .fa, .glyphicon, .label { 37 | margin-right: 4px; 38 | } 39 | 40 | button[data-dismiss="modal"] { 41 | margin-right: 4px; 42 | } 43 | 44 | .dashboard { 45 | margin-top: 5px !important; 46 | margin-bottom: 20px !important; 47 | } 48 | 49 | .user { 50 | font-weight: bold; 51 | } 52 | 53 | .fix-progress { 54 | border: 1px solid rgba(0,0,0,.15); 55 | } 56 | 57 | .titre-head { 58 | margin-top: 5px; 59 | margin-bottom: 5px; 60 | } 61 | 62 | .trait { 63 | background-color: #e5e5e5; 64 | border-bottom: 1px solid #fff; 65 | height: 2px; 66 | margin: 9px 1px; 67 | overflow: hidden; 68 | } 69 | 70 | /* ajustement popup et formulaire */ 71 | .modal-footer form { 72 | display: inline-block; 73 | margin: 0; 74 | margin-left: 5px; 75 | padding: 0; 76 | } 77 | 78 | .btn-reboot{ 79 | margin-top: 20px; 80 | } 81 | 82 | #logout { 83 | color: #b94a48; 84 | } 85 | 86 | .text-defaut-color { 87 | color: #5a5a5a; 88 | } 89 | 90 | .textmodaleabout { 91 | color: #646464; 92 | } 93 | 94 | .progress-bar { 95 | min-width: 2em; 96 | } 97 | 98 | #load-info{ 99 | margin-top: 10px; 100 | } 101 | 102 | .uptime { 103 | margin-top: 8px; 104 | } 105 | 106 | .load-average { 107 | font-size: 11px; 108 | cursor: default; 109 | } 110 | 111 | #popupfilezilla, #popuptransdroid { 112 | margin-top: 4px; 113 | } 114 | 115 | #bloc-ftp li { 116 | margin-bottom: 2px; 117 | } 118 | 119 | .fix-marg-input { 120 | margin-bottom: 0; 121 | } 122 | 123 | .alert-sm { 124 | padding: 7px; 125 | } 126 | 127 | fieldset { 128 | border: 1px solid #b4b4b4; 129 | padding: 0 10px 0 10px; 130 | margin-bottom: 10px; 131 | border-radius: 5px; 132 | } 133 | 134 | legend { 135 | color: #5a5a5a; 136 | padding-left: 7px; 137 | padding-right: 7px; 138 | border-bottom: none; 139 | width: auto; 140 | margin-bottom: 8px; 141 | font-size: 18px; 142 | } 143 | 144 | textarea { 145 | margin-bottom: 15px; 146 | } 147 | 148 | .device { 149 | color: #5a5a5a; 150 | } 151 | 152 | .device .fa-android { 153 | font-size: 18px; 154 | } 155 | 156 | #jquery-loader { 157 | background-color: transparent; 158 | border: none; 159 | width: 250px !important; 160 | } 161 | 162 | #jquery-loader p { 163 | text-align: center; 164 | color: #fff; 165 | font-size: 13px; 166 | } 167 | 168 | #jquery-loader-background { 169 | background-color: rgba(0,0,0,.9); 170 | } 171 | 172 | .modal-body label { 173 | font-weight: normal; 174 | cursor: pointer; 175 | } 176 | 177 | .modal-body label input { 178 | margin-right: 2px; 179 | } 180 | 181 | /* install */ 182 | 183 | #install { 184 | margin-top: 50px; 185 | } 186 | 187 | code { 188 | display: block; 189 | padding: 6px; 190 | background-color: black; 191 | color: white; 192 | font-size: 14px; 193 | border-radius: 0; 194 | margin-bottom: 10px; 195 | } 196 | -------------------------------------------------------------------------------- /themes/default/fonts/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/al3xLvs/seedbox-manager/b14800d96cd1903315e99d28f3cc687e3a72c34c/themes/default/fonts/.gitkeep -------------------------------------------------------------------------------- /themes/default/gulpfile.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var gulp = require('gulp'); 4 | var bower = require('gulp-bower'); 5 | var concat = require('gulp-concat'); 6 | var cssmin = require('gulp-clean-css'); 7 | var uglify = require('gulp-uglify'); 8 | 9 | // ---------------------------- 10 | // Files 11 | // ---------------------------- 12 | var files = { 13 | js: [ 14 | 'bower_components/jquery/dist/jquery.min.js', 15 | 'bower_components/bootstrap/dist/js/bootstrap.min.js', 16 | 'bower_components/jquery-loader-plugin/min/jquery.loader.min.js', 17 | 'js/app.js' 18 | ], 19 | 20 | css: [ 21 | 'bower_components/bootstrap/dist/css/bootstrap.min.css', 22 | 'bower_components/font-awsome/css/font-awesome.min.css', 23 | 'bower_components/jquery-loader-plugin/min/jquery.loader.min.css', 24 | 'css/style.css' 25 | ], 26 | 27 | fonts: [ 28 | 'bower_components/font-awsome/fonts/*' 29 | ], 30 | 31 | images: [ 32 | 'img/background.png' 33 | ] 34 | } 35 | 36 | // ---------------------------- 37 | // Configuration 38 | // ---------------------------- 39 | var option = { 40 | cssmin: { 41 | keepSpecialComments: 0, 42 | compatibility: 'ie9,-properties.zeroUnits', 43 | advanced: false 44 | }, 45 | } 46 | 47 | // ---------------------------- 48 | // Gulp task definitions 49 | // ---------------------------- 50 | gulp.task('default', ['css', 'js', 'fonts', 'img']); 51 | 52 | gulp.task('bower', function() { 53 | return bower(); 54 | }); 55 | 56 | gulp.task('fonts', function() { 57 | return gulp.src(files.fonts) 58 | .pipe(gulp.dest('../../assets/fonts')); 59 | }); 60 | 61 | gulp.task('img', function() { 62 | return gulp.src(files.images) 63 | .pipe(gulp.dest('../../assets/img')); 64 | }); 65 | 66 | gulp.task('css', ['bower'],function() { 67 | return gulp.src(files.css) 68 | .pipe(cssmin(option.cssmin)) 69 | .pipe(concat('default.css')) 70 | .pipe(gulp.dest('../../assets')); 71 | }); 72 | 73 | gulp.task('js', ['bower'], function() { 74 | return gulp.src(files.js) 75 | .pipe(uglify()) 76 | .pipe(concat('app.min.js')) 77 | .pipe(gulp.dest('../../assets')); 78 | }); 79 | 80 | gulp.task('watch', ['default'], function() { 81 | gulp.watch('js/*.js', ['js']); 82 | gulp.watch('css/*.css', ['css']); 83 | }); 84 | -------------------------------------------------------------------------------- /themes/default/img/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/al3xLvs/seedbox-manager/b14800d96cd1903315e99d28f3cc687e3a72c34c/themes/default/img/background.png -------------------------------------------------------------------------------- /themes/default/js/app.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | (function ($) { 4 | $('.load-average').tooltip({ 5 | placement: 'top', 6 | trigger: 'hover' 7 | }).tooltip('hide'); 8 | 9 | $('.popup-delete-user').click(function () { 10 | var username = $(this).data('user'); 11 | $('#deleteUserName').val(username); 12 | $('#target-delete-user').html(username); 13 | }); 14 | 15 | $('#logout').click(function () { 16 | var logout_url = $(this).data('logouturl'); 17 | var logout_message = $(this).data('logoutmessage'); 18 | var protocol = window.location.protocol; 19 | var host = window.location.host; 20 | var uri = window.location.pathname; 21 | 22 | $.ajax({ 23 | xhrFields: { 24 | withCredentials: true 25 | }, 26 | headers: { 27 | 'Authorization': 'Basic ' + btoa('logout:logout') 28 | }, 29 | url: protocol + '//' + host + uri 30 | }); 31 | 32 | $.loader({ 33 | id: 'jquery-loader', 34 | className: '', 35 | content: '

'+logout_message+'

', 36 | height: 60, 37 | width: 200, 38 | background: {id:'jquery-loader-background'} 39 | }); 40 | 41 | setTimeout(function () { 42 | window.location.href = logout_url; 43 | }, 2000); 44 | }); 45 | })(jQuery); 46 | -------------------------------------------------------------------------------- /themes/default/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "seedbox-manager", 3 | "version": "3.0.1", 4 | "private": true, 5 | "dependencies": { 6 | }, 7 | "devDependencies": { 8 | "gulp": "3.9.*", 9 | "gulp-bower": "0.0.*", 10 | "gulp-clean-css": "3.0.*", 11 | "gulp-concat": "2.6.*", 12 | "gulp-uglify": "2.1.*" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /themes/spiritofbonobo/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "seedbox-manager", 3 | "version": "3.0.1", 4 | "authors": [ 5 | "Magicalex " 6 | ], 7 | "description": "Web app for manage your seedbox", 8 | "private": true, 9 | "dependencies": { 10 | "bootstrap": "3.3.x", 11 | "font-awsome": "4.x.x" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /themes/spiritofbonobo/css/style.css: -------------------------------------------------------------------------------- 1 | /* CODE CSS THEME SPIRITOFBONOBO */ 2 | 3 | @font-face { 4 | font-family: 'FontAwesome'; 5 | src: url('../assets/fonts/fontawesome-webfont.eot?v=4.7.0'); 6 | src: url('../assets/fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'), url('../assets/fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'), url('../assets/fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'), url('../assets/fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'), url('../assets/fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg'); 7 | font-weight: normal; 8 | font-style: normal; 9 | } 10 | 11 | ::-moz-selection { 12 | background: #ff3c78; 13 | color: #fff; 14 | } 15 | 16 | ::selection { 17 | background: #ff3c78; 18 | color: #fff; 19 | } 20 | 21 | body { 22 | background: url('../assets/img/bg.png'); 23 | } 24 | 25 | ul { 26 | color: #5a5a5a; 27 | } 28 | 29 | .marg { 30 | padding: 15px; 31 | margin-bottom: 50px; 32 | background-color: #fff; 33 | box-shadow: 0 0 15px 0 #fff; 34 | } 35 | 36 | .fa, .glyphicon, .label { 37 | margin-right: 4px; 38 | } 39 | 40 | button[data-dismiss="modal"] { 41 | margin-right: 4px; 42 | } 43 | 44 | .dashboard { 45 | margin-top: 5px !important; 46 | margin-bottom: 20px !important; 47 | } 48 | 49 | .user { 50 | font-weight: bold; 51 | } 52 | 53 | .fix-progress { 54 | border: 1px solid rgba(0,0,0,.15); 55 | } 56 | 57 | .titre-head { 58 | margin-top: 5px; 59 | margin-bottom: 5px; 60 | } 61 | 62 | .trait { 63 | background-color: #e5e5e5; 64 | border-bottom: 1px solid #fff; 65 | height: 2px; 66 | margin: 9px 1px; 67 | overflow: hidden; 68 | } 69 | 70 | /* ajustement popup et formulaire */ 71 | .modal-footer form { 72 | display: inline-block; 73 | margin: 0; 74 | margin-left: 5px; 75 | padding: 0; 76 | } 77 | 78 | .btn-reboot{ 79 | margin-top: 20px; 80 | } 81 | 82 | #logout { 83 | color: #b94a48; 84 | } 85 | 86 | .text-defaut-color { 87 | color: #5a5a5a; 88 | } 89 | 90 | .textmodaleabout { 91 | color: #646464; 92 | } 93 | 94 | #load-info{ 95 | margin-top: 10px; 96 | font-weight: bold; 97 | } 98 | 99 | .load-average { 100 | font-size: 11px; 101 | } 102 | 103 | .uptime { 104 | margin-top: 10px; 105 | } 106 | 107 | .glyphicon-refresh { 108 | margin-right: 7px; 109 | } 110 | 111 | #popupfilezilla, #popuptransdroid { 112 | margin-top: 4px; 113 | } 114 | 115 | .fix-marg-input { 116 | margin-bottom: 0; 117 | } 118 | 119 | .reply-ticket-h6 { 120 | margin-top: 0; 121 | margin-bottom: 10px; 122 | } 123 | 124 | .reply-ticket-h6 .form-group { 125 | margin-bottom: 10px; 126 | } 127 | 128 | .alert-sm { 129 | padding: 7px; 130 | } 131 | 132 | fieldset { 133 | border: 1px solid #b4b4b4; 134 | padding: 0 10px 0 10px; 135 | margin-bottom: 10px; 136 | border-radius: 5px; 137 | } 138 | 139 | legend { 140 | color: #5a5a5a; 141 | padding-left: 7px; 142 | padding-right: 7px; 143 | border-bottom: none; 144 | width: auto; 145 | margin-bottom: 8px; 146 | font-size: 18px; 147 | } 148 | 149 | textarea { 150 | margin-bottom: 15px; 151 | } 152 | 153 | .device { 154 | color: #5a5a5a; 155 | } 156 | 157 | .device .fa-android { 158 | font-size: 18px; 159 | } 160 | 161 | #jquery-loader { 162 | background-color: transparent; 163 | border: none; 164 | width: 250px !important; 165 | } 166 | 167 | #jquery-loader p { 168 | text-align: center; 169 | color: #fff; 170 | font-size: 13px; 171 | } 172 | 173 | #jquery-loader-background { 174 | background-color: rgba(0,0,0,.9); 175 | } 176 | 177 | .modal-body label { 178 | font-weight: normal; 179 | cursor: pointer; 180 | } 181 | 182 | .modal-body label input { 183 | margin-right: 2px; 184 | } 185 | 186 | /* Modif Jed */ 187 | 188 | @font-face { 189 | font-family: 'Ubuntu'; 190 | font-style: normal; 191 | font-weight: 400; 192 | src: local('Ubuntu'), url('https://themes.googleusercontent.com/static/fonts/ubuntu/v5/_xyN3apAT_yRRDeqB3sPRg.woff') format('woff'); 193 | } 194 | 195 | body { 196 | font-family: 'Ubuntu'; 197 | } 198 | 199 | h2 { 200 | text-align: center; 201 | color: #8bbcfe; 202 | font-family: 'Ubuntu'; 203 | font-size: 24px; 204 | font-weight: 400; 205 | text-decoration: none; 206 | } 207 | 208 | .navbar-default { 209 | background-image: linear-gradient(to bottom, #3a3a3a 0, grey 200%); 210 | background-repeat: repeat-x; 211 | box-shadow: 1px 1px 10px #000; 212 | border-color: #3a3a3a; 213 | } 214 | 215 | .navbar-default .navbar-nav > li > a { 216 | font-family: 'Ubuntu'; 217 | font-size: 22px; 218 | color: #fff; 219 | } 220 | 221 | .navbar-default .navbar-nav > li > a:hover { 222 | font-family: 'Ubuntu'; 223 | color: #8bbcfe; 224 | font-size: 22px; 225 | z-index: 15000; 226 | } 227 | 228 | .navbar-default .navbar-brand { 229 | font-family: 'Ubuntu'; 230 | font-size: 22px; 231 | color: #8bbcfe; 232 | font-weight: normal; 233 | font-style: normal; 234 | opacity: .9; 235 | } 236 | 237 | .navbar-default .navbar-brand:hover { 238 | color: #8bbcfe; 239 | } 240 | 241 | .btn-info { 242 | color: #fff; 243 | background-color: #8bbcfe; 244 | border-color: #77b3fd; 245 | border-radius: 20px; 246 | } 247 | 248 | .btn-info:hover { 249 | color: #fff; 250 | background-color: #77b3fd; 251 | border-color: #8bbcfe; 252 | } 253 | 254 | .well-sm { 255 | padding: 9px; 256 | border-radius: 20px; 257 | } 258 | 259 | .navbar-default .navbar-nav > .open > a, 260 | .navbar-default .navbar-nav > .open > a:hover, 261 | .navbar-default .navbar-nav > .open > a:focus { 262 | background-color: #2c2c2c; 263 | color: #8bbcfe; 264 | } 265 | 266 | .page-header { 267 | background: #595a5a; 268 | text-align: center; 269 | color: #8bbcfe; 270 | font-size: 60px; 271 | font-family: 'Ubuntu', Arial, Helvetica, sans-serif; 272 | text-decoration: none; 273 | box-shadow: 0 0 5px 0 #000; 274 | text-shadow: 1px 1px 5px #000; 275 | border: 2px solid #868585; 276 | border-radius: 20px; 277 | margin: 5px 0 20px; 278 | padding: 10px 0; 279 | } 280 | 281 | .container.marg { 282 | background: #616161; 283 | } 284 | 285 | .marg { 286 | padding: 15px; 287 | margin-bottom: 50px; 288 | background-color: #fff; 289 | box-shadow: 0 0 15px 0 #000; 290 | border-radius: 20px; 291 | opacity: .9; 292 | } 293 | 294 | .dropdown-menu { 295 | background-color: #616161; 296 | } 297 | 298 | .dropdown-menu > li > a { 299 | color: #fff; 300 | } 301 | 302 | #logout { 303 | color: red; 304 | } 305 | 306 | .modal-body label { 307 | font-weight: normal; 308 | cursor: pointer; 309 | } 310 | 311 | .modal-body label input { 312 | margin-right: 2px; 313 | } 314 | -------------------------------------------------------------------------------- /themes/spiritofbonobo/gulpfile.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var gulp = require('gulp'); 4 | var bower = require('gulp-bower'); 5 | var concat = require('gulp-concat'); 6 | var cssmin = require('gulp-clean-css'); 7 | 8 | // ---------------------------- 9 | // Files 10 | // ---------------------------- 11 | var files = { 12 | 13 | css: [ 14 | 'bower_components/bootstrap/dist/css/bootstrap.min.css', 15 | 'bower_components/font-awsome/css/font-awesome.min.css', 16 | 'bower_components/jquery-loader-plugin/min/jquery.loader.min.css', 17 | 'css/style.css' 18 | ], 19 | 20 | fonts: [ 21 | 'bower_components/font-awsome/fonts/*' 22 | ], 23 | 24 | images: [ 25 | 'img/**/*.png', 26 | 'img/**/*.jpg' 27 | ] 28 | } 29 | 30 | // ---------------------------- 31 | // Configuration 32 | // ---------------------------- 33 | var option = { 34 | cssmin: { 35 | keepSpecialComments: 0, 36 | compatibility: 'ie9,-properties.zeroUnits', 37 | advanced: false 38 | }, 39 | } 40 | 41 | // ---------------------------- 42 | // Gulp task definitions 43 | // ---------------------------- 44 | gulp.task('default', ['css', 'fonts', 'img']); 45 | 46 | gulp.task('bower', function() { 47 | return bower(); 48 | }); 49 | 50 | gulp.task('fonts', function() { 51 | return gulp.src(files.fonts) 52 | .pipe(gulp.dest('../../assets/fonts')); 53 | }); 54 | 55 | gulp.task('img', function() { 56 | return gulp.src(files.images) 57 | .pipe(gulp.dest('../../assets/img')); 58 | }); 59 | 60 | gulp.task('css', ['bower'],function() { 61 | return gulp.src(files.css) 62 | .pipe(cssmin(option.cssmin)) 63 | .pipe(concat('spiritofbonobo.css')) 64 | .pipe(gulp.dest('../../assets')); 65 | }); 66 | 67 | gulp.task('watch', ['default'], function() { 68 | gulp.watch('css/*.css', ['css']); 69 | }); 70 | -------------------------------------------------------------------------------- /themes/spiritofbonobo/img/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/al3xLvs/seedbox-manager/b14800d96cd1903315e99d28f3cc687e3a72c34c/themes/spiritofbonobo/img/bg.png -------------------------------------------------------------------------------- /themes/spiritofbonobo/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "seedbox-manager", 3 | "version": "3.0.1", 4 | "private": true, 5 | "dependencies": { 6 | }, 7 | "devDependencies": { 8 | "gulp": "3.9.*", 9 | "gulp-bower": "0.0.*", 10 | "gulp-clean-css": "3.0.*", 11 | "gulp-concat": "2.6.*" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /version.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "seedbox-manager", 3 | "version": "3.0.1", 4 | "contributors": "magicalex", 5 | "news": [ 6 | "Correction de bug", 7 | "Amélioration de la page d'installation", 8 | "Voir les changements : https://github.com/Magicalex/seedbox-manager/compare/v3.0.0...master" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /view/admin.twig.html: -------------------------------------------------------------------------------- 1 | {% extends 'layout.twig.html' %} 2 | 3 | {% block content %} 4 |

{{ 'core.admin.administration_area'|trans }}

5 | {% if notifications.admin_update_ini is defined and notifications.admin_update_ini.0 == true %} 6 |
7 | 8 | {{ 'core.admin.success_update'|trans({'{username}': member.username })|raw }} 9 |
10 | {% elseif notifications.admin_update_ini is defined and notification_update_ini_file == false %} 11 |
12 | 13 | {{ 'core.admin.unable_to_update'|trans({'{username}': member.username })|raw }} 14 |
15 | {% endif %} 16 | {% if notifications.admin_delete_user is defined and notifications.admin_delete_user.0 == true %} 17 |
18 | 19 | {{ 'core.admin.success_delete_user'|trans({'{username}': notifications.admin_delete_user.1 })|raw }} 20 |
21 | {% elseif notifications.admin_delete_user is defined and notifications.admin_delete_user.0 == false %} 22 |
23 | 24 | {{ 'core.admin.error_delete_user'|trans({'{username}': notifications.admin_delete_user.1 })|raw }} 25 |
26 | {% endif %} 27 |
28 |
29 |
30 |

{{ 'core.admin.list_user'|trans }}

31 |
32 |
33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | {% for users in all_users %} 44 | 45 | 46 | 47 | 52 | 63 | 64 | {% endfor %} 65 | 66 |
#{{ 'core.admin.user'|trans|capitalize }}{{ 'core.admin.edit'|trans|capitalize }}{{ 'core.admin.delete'|trans|capitalize }}
{{ loop.index }}{{ users }} 48 | 49 | {{ 'core.admin.edit'|trans }} 50 | 51 | 53 | {% if users != user.username %} 54 | 55 | {{ 'core.admin.delete'|trans }} 56 | 57 | {% else %} 58 | 59 | {{ 'core.admin.delete'|trans }} 60 | 61 | {% endif %} 62 |
67 |
68 |
69 |
70 |
71 |
72 |

{{ 'core.admin.setting_member'|trans }} {{ member.username }}

73 |
74 |
75 |
76 | {{ 'core.admin.legend_setting_user'|trans }} 77 |
78 | 79 | 80 |
81 |
82 | 83 | 84 |
85 |
86 |
87 | {{ 'core.admin.legend_navbar'|trans }} 88 | 92 | 93 |
94 |
95 | {{ 'core.admin.legend_setting_server'|trans }} 96 |
97 | 98 | 99 |
100 |
101 | 102 | 103 |
104 |
105 |
106 | {{ 'core.admin.legend_support'|trans }} 107 |
108 | 109 | 110 |
111 |
112 |

113 | 114 | 115 |

116 |
117 |
118 |
119 |
120 | {% endblock %} 121 | 122 | {% block modal %} 123 | 143 | {% endblock %} 144 | -------------------------------------------------------------------------------- /view/index.twig.html: -------------------------------------------------------------------------------- 1 | {% extends 'layout.twig.html' %} 2 | 3 | {% block content %} 4 |

{{ 'core.index.dashboard'|trans }}

5 | {% if notifications.rtorrent.0.statusReboot is defined and notifications.rtorrent.0.statusReboot == 0 %} 6 |
7 | 8 | {{ 'core.index.succes_reboot_rtorrent'|trans }} 9 |
10 | {% elseif notifications.rtorrent is defined or notifications.rtorrent.0.statusReboot != 0 %} 11 |
12 | 13 | {{ 'core.index.error_reboot_rtorrent'|trans|raw }} 14 |
15 | {% endif %} 16 | {% if notifications.rtorrent.0.statusReboot is defined and notifications.rtorrent.0.statusReboot == 0 %} 17 |
18 | 19 |

{{ 'core.index.log'|trans }}

20 | {{ 'core.index.command_exec'|trans }} : {{ notifications.rtorrent.0.command }}
21 | {{ 'core.index.status'|trans }} : {{ notifications.rtorrent.0.statusReboot }}
22 | {{ 'core.index.result_command'|trans }} :
23 | {% for logs in notifications.rtorrent.0.logReboot %} 24 | # {{ logs }}
25 | {% endfor %} 26 |
27 | {% endif %} 28 | {% if server.CheckUpdate != false and user.isAdmin == true %} 29 |
30 | 31 |

{{ 'core.index.new_version'|trans }} (v{{ server.CheckUpdate.version }})

32 |
    {% for new in server.CheckUpdate.news %}
  • {{ new }}
  • {% endfor %}
33 | {{ 'core.index.participants'|trans }}: {{ server.CheckUpdate.contributors }} 34 |
35 | {% endif %} 36 |
37 | {% if user.enableInfo == true %} 38 |
39 |
40 |

{{ 'core.index.title_info_user'|trans }}

41 |
42 |

{{ 'core.index.ip_address'|trans }}

43 |
    44 |
  • {{ ipUser }}
  • 45 |
46 |

{{ 'core.index.disk_space'|trans }}

47 |

48 | {{ 'core.index.used'|trans }} {{ user.userdisk.used_disk.octets }} {{ 'core.index.%s'|format(user.userdisk.used_disk.unit)|trans }}, 49 | {{ 'core.index.available'|trans }} {{ user.userdisk.free_disk.octets }} {{ 'core.index.%s'|format(user.userdisk.free_disk.unit)|trans }}, 50 | {{ 'core.index.total'|trans }} {{ user.userdisk.total_disk.octets }} {{ 'core.index.%s'|format(user.userdisk.total_disk.unit)|trans }} 51 |

52 |
53 | {% if user.userdisk.percentage_used < 95 and user.userdisk.percentage_used >= 85 %}{% set color = 'progress-bar-warning' %}{% elseif user.userdisk.percentage_used >= 95 %}{% set color = 'progress-bar-danger' %}{% endif %} 54 |
55 | {{ user.userdisk.percentage_used }}% 56 |
57 |
58 |

{{ 'core.index.uptime_server'|trans }}

59 |
    60 |
  • 61 | 62 | {% if server.getUptime.days != 0 %}{{ server.getUptime.days }} {{ 'core.index.days'|trans }}{% endif %} 63 | {% if server.getUptime.hours != 0 %}{{ server.getUptime.hours }} {{ 'core.index.hours'|trans }}{% endif %} 64 | {{ server.getUptime.minutes }} {{ 'core.index.minutes'|trans }} 65 | 66 |
  • 67 |
68 |

{{ 'core.index.load_average'|trans }}

69 |
    70 |
  • 71 | {{ server.load_average.0 }} 72 | {{ server.load_average.1 }} 73 | {{ server.load_average.2 }} 74 |
  • 75 |
  • 76 | 77 | {% if server.load_average.0 < 5 %} 78 | {{ 'core.index.info_load_good'|trans }} 79 | {% elseif server.load_average.0 < 10 %} 80 | {{ 'core.index.info_load_warning'|trans }} 81 | {% else %} 82 | {{ 'core.index.info_load_danger'|trans }} 83 | {% endif %} 84 | 85 |
  • 86 |
87 |
88 |
89 | {% endif %} 90 | {% if user.enableFtp == true %} 91 |
92 |
93 |

{{ 'core.index.title_access'|trans }}

94 |
95 |
{{ 'core.index.server_ftp'|trans }}
96 | 104 |
{{ 'core.index.app_transdroid'|trans }}
105 | 112 |
113 |
114 | {% endif %} 115 |
116 |
117 | {% if user.enableRtorrent == true %} 118 |
119 |
120 |

{{ 'core.index.restart_rtorrent'|trans }}

121 |
122 |

123 | 124 | {{ 'core.index.restart_rtorrent'|trans }} 125 | 126 |

127 | {% if read_data_reboot.file_exist %} 128 | {{ 'core.index.last_restart'|trans }} {{ read_data_reboot.read_file|date('core.date'|trans) }} 129 | {% endif %} 130 |
131 |
132 | {% endif %} 133 |
134 | {% endblock %} 135 | 136 | {% block modal %} 137 | 158 | {% endblock %} 159 | -------------------------------------------------------------------------------- /view/install.twig.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Installation - Seedbox Manager 6 | 7 | 8 | 9 | 10 |
11 |

Guide d'installation

12 |
13 |
14 |
15 |

Démarrage de l'application

16 |
17 |

Indiquez le bon propriétaire des fichiers de l'application, copiez cette commande et l'exécuter en ROOT (super utilisateur).

18 | chown -R {{ user_php.name }}:{{ user_php.name }} {{ root_path }} 19 |

Exécutez le script install.sh pour compiler le programme de reboot en ROOT.

20 | cd {{ root_path }}/source/ 21 | chmod +x install.sh && ./install.sh 22 |
23 |
24 |
25 |
26 |

Comment obtenir les droits administrateurs ?

27 |
28 |

Pour obtenir les droits administrateurs il faut avant cela exécuter les commandes ci-dessus.

29 |

Ensuite rafraîchir cette page avec F5 par exemple. Cela aura pour conséquence de générer vos fichiers de configuration.

30 |

Puis ouvrez votre fichier de configuration avec un éditeur de texte.

31 | vim {{ root_path }}/conf/users/{{ username }}/config.ini 32 | Je vous conseille de copier cette commande après rafraichissement normalement cette page ne s'affichera plus jamais. 33 |

Pour terminer, il vous suffit de mettre admin = yes à la place de no et de quitter en enregistrant.

34 |
35 |
36 |
37 |
38 | 39 | 40 | -------------------------------------------------------------------------------- /view/layout.twig.html: -------------------------------------------------------------------------------- 1 | {% spaceless %} 2 | 3 | 4 | 5 | 6 | Seedbox Manager 7 | 8 | 9 | 10 | 11 | 47 |
48 | 54 | {% block content %}{% endblock %} 55 |
56 | 74 | {% block modal %}{% endblock %} 75 | 76 | 77 | 78 | {% endspaceless %} 79 | -------------------------------------------------------------------------------- /view/settings.twig.html: -------------------------------------------------------------------------------- 1 | {% extends 'layout.twig.html' %} 2 | 3 | {% block content %} 4 |

{{ 'core.settings.setting_your_user'|trans }}

5 | {% if notifications.update_ini_file is defined and notifications.update_ini_file.0 == true %} 6 |
7 | 8 | {{ 'core.settings.success_update'|trans }} 9 |
10 | {% elseif notifications.update_ini_file is defined and notification_update_ini_file == false %} 11 |
12 | 13 |

{{ 'core.settings.impossible_to_update'|trans }}

14 |
    15 |
  • {{ 'core.settings.check_rights'|trans }}
  • 16 |
17 |
18 | {% endif %} 19 |
20 |
21 |
22 |

{{ 'core.settings.setting_interface'|trans }}

23 |
24 |
25 |
26 |
27 | {{ 'core.settings.option_homepage'|trans }} 28 |
29 | 33 |
34 |
35 | 39 |
40 |
41 | 45 |
46 |
47 |
48 |
49 |
50 | {{ 'core.settings.option_logout'|trans }} 51 |
52 | 53 |
54 |
55 | 56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 | {{ 'core.settings.themes'|trans }} 64 |
65 | 66 |
67 |
68 | 73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 | {{ 'core.settings.language'|trans }} 81 |
82 | 83 |
84 |
85 | 90 |
91 |
92 |
93 |
94 |
95 |

96 | 97 |

98 |
99 |
100 |
101 |
102 | {% endblock %} 103 | --------------------------------------------------------------------------------