Commit graph

95 commits

Author SHA1 Message Date
Nicolas Roman f3fa182dc7 delete methods updating the vhost after cert installation is completed 2019-07-17 17:20:32 +02:00
Nicolas Roman 4b5a020993 port 443 by default in vhost template 2019-07-17 17:11:52 +02:00
Nicolas Roman c5c1648a58 delete previous cert if it already exists before invoking evoacme 2019-07-17 15:38:59 +02:00
Nicolas Roman 7d026c907b add optional SSL configuration by default in vhost 2019-07-15 17:44:41 +02:00
Nicolas Roman c218aebaae bugfixes for the evoacme part 2019-07-15 17:06:50 +02:00
Nicolas Roman 4eaf3ad6d1 fix acme-challenge subfolder creation 2019-07-11 16:54:21 +02:00
Nicolas Roman 78d0293b44 create the acme-challenge subfolder correctly for the HTTP challenge 2019-07-11 15:24:17 +02:00
Nicolas Roman 37e5ca6484 generate-ssl-certificate and update-ssl-configuration methods for web-add.sh 2019-07-10 16:56:50 +02:00
Nicolas Roman 1b4231e1a9 make-csr function and confirmation button when warning is displayed 2019-07-09 18:07:47 +02:00
Nicolas Roman bd6d70fbfe change http challenge filename 2019-06-07 15:22:42 +02:00
Nicolas Roman b25639c3aa add manage-http-challenge-file function 2019-06-07 14:10:07 +02:00
Nicolas Roman a907137e27 block non-standard vhost modification 2019-06-05 16:34:16 +02:00
Nicolas Roman ad452aad6a delete list-servername function 2019-06-05 16:33:37 +02:00
Nicolas Roman b1bab0b40c normalize add-alias with del-alias 2019-06-05 16:33:23 +02:00
Nicolas Roman 5a738c4e2e revert multiple virtualhosts mgmt for ITK 2019-06-05 16:33:23 +02:00
Nicolas Roman ad3c31fb96 added force-confirm option for del script 2019-06-05 16:29:19 +02:00
Nicolas Roman 7a0d307f23 first draft 2019-06-05 16:29:19 +02:00
Ludovic Poujol d00ecea964 web-add.sh - Ensure the FPM pools uses the www-XXX user 2019-04-02 15:15:51 +02:00
Jérémy Lecour 7faf647185 replace chained conditionals by regular if/else + configtest before reload 2019-03-27 15:42:53 +01:00
Nicolas Roman d3e5cc7b4c fix case when using multiple time disable-user-itk and enable-user-itk 2019-03-26 17:46:31 +01:00
Nicolas Roman e15e03c36b enhance enable/disable for itk 2019-03-26 15:42:35 +01:00
Nicolas Roman 89858a6bbd first draft itk mgmt 2019-03-26 15:42:35 +01:00
Nicolas Roman fed8a1fc84 Added function to search occurence of given name in vhosts 2019-03-26 15:41:53 +01:00
Nicolas Roman 38308afcf7 list servername and relace previous servername with new one 2019-03-26 15:41:53 +01:00
Nicolas Roman 794defa907 retrieve first ServerName and change it with the new one in all the conf file 2019-03-26 15:41:52 +01:00
Nicolas Roman 6e8ea737de replace ServerName inside Rewrite rules 2019-03-26 15:41:52 +01:00
Nicolas Roman b6fcb25b3b added servernameupdate function 2019-03-26 15:41:52 +01:00
Benoît S. 9209aae0d1 bind-add-ng: grep -E is not working for tabulations
We need to use grep -P, to use pcrepattern(3).
2019-03-21 17:08:54 +01:00
Ludovic Poujol 87c08696e3 web-add.sh: Ensure op_setphpversion even when there tabs or no spaces 2019-03-21 10:59:59 +01:00
Ludovic Poujol 7f1af3a8fe Ensure that dbadmin.sh is executable 2019-03-18 15:35:16 +01:00
Ludovic Poujol 52c7cfb888 Support express de containers PHP7.3
(pas très joli... oui :/)
2019-03-15 16:44:42 +01:00
Ludovic Poujol 614de20c34 Fix deletion using wrong path 2019-03-15 16:42:13 +01:00
Ludovic Poujol 249a3ac1e9 Fix: web-add.sh not properly listing vhosts' aliases 2019-02-28 18:01:46 +01:00
Ludovic Poujol 2935b771cb Fix #19 - Do not enforce md5 for password 2019-02-28 16:19:54 +01:00
Gregory Colpart 2125055409 Fix when multiples SetHandler lines in VHOST file 2019-02-21 02:31:04 +01:00
Patrick Marchand ea359880cc New check-vhosts command for web-add.sh
Checks whether the enabled vhosts are all symbolic links, also offers the -f flag to fix any problems automatically.
2018-12-13 23:29:06 +01:00
Patrick Marchand 21f5f011da Fixed mistake with getopts(1) in web-add.sh 2018-12-13 13:21:13 -05:00
Ludovic Poujol 8429351213 Do not list evoadmin in the vhost list
Fixes #34
2018-12-11 15:30:06 +01:00
Patrick Marchand c135807010 Changed API for web-add.sh fix-vhosts
check-vhosts now only applies changes when it is passed the -f flag,
otherwise it simply lists the suggested fixes.
2018-12-04 11:25:45 -05:00
Patrick Marchand 53335ee4ef Apply first and third benpro review of web-add fix command
Simplify sed(1) command by getting rid of echo(1)

Use a2ensite(1) instead of ln(1) to link vhosts.
2018-11-29 18:42:20 +01:00
Patrick Marchand 5fe9762c53 Inverse userdel(1) calls in scripts/web-add.sh
When a user has the same name as his primary group, userdel(1) tries
to remove it as well, but stops and prints an error message if that
group is being used by any other users as their primary group. By
deleting the www user first, the group is properly deleted. This
means we can get rid of the subsequent call to groupdel(1).

Tested by adding / removing a vhost on my testing vm.
2018-11-29 18:35:17 +01:00
Patrick Marchand 547235ea7e Audited scripts/stats.sh
Shellcheck pass and code cleanup.

Set stricter error handling with sh options.

Removes the for loop and cat(1) in favor of directly calling the
file with cut(1) and piping the output to a while read loop. Read
https://github.com/koalaman/shellcheck/wiki/SC2002 for more info.

Adds proper variable globbing.

Removes the large block of commented code, if this turns out to be
necessary, we can add a condition check to the script instead of
uncommenting on a per case basis.
2018-11-29 17:25:13 +01:00
Patrick Marchand b693075f39 Adds command to fix vhost linking problems in web-add.sh
Some people forget to use the --follow-symlinks flag with sed(1),
thus not carrying changes over to /etc/apache2/sites-available.

This new command makes sure all vhosts in /etc/apache2/sites-enabled
are symlinks. It assumes that we always want to overwrite the file in
/etc/apache2/sites-available with the file in /etc/apache2/sites-enabled.
2018-11-22 20:15:06 +01:00
Patrick Marchand d64cfa4e8b Fix problems with web-add.sh add-alias
All uses of the VHOST_PATH variable in the code append a slash to
it, so it is easier to remove the trailing slash in it's instantiation.

Also simplifies the sed(1) invocation.
2018-11-22 20:14:05 +01:00
Patrick Marchand d3be332ba4 Shellcheck on delete_account in ftpadmin
Removed useless echo and added variable quoting.
2018-11-09 17:48:35 -05:00
Patrick Marchand 58642ec0ac Made ftpadmin more usable from the commandline
Adds more portable bash invocation.

Adds more severe bash evaluation.

Added h flag and made improper use print the usage function.

Added checks that make sure the parameters are okay.

Proper variable quoting, tests and $() use.
2018-11-09 17:45:01 -05:00
Patrick Marchand 2ab5a60906 Shellcheck pass on edit_password in ftpadmin
Removed useless echo and used proper variable quoting.
2018-11-09 17:42:47 -05:00
Patrick Marchand 66c2c8ab35 Shellcheck pass on add_account in ftpadmin
Simple variable quoting and more modern shell constructs.
2018-11-09 17:41:32 -05:00
Patrick Marchand e97ddd8be0 Simplification of list_account_by_UID in ftpadmin
Setting / unsetting IFS variables can be removed by setting it only
in the loop context.

The for cat can be replaced by a simpler while read loop.

Proper variable quoting was added.

Changed the way modif was optionally passed, this removes the
extraneous ':' at the end.

echo(1) the lines as we go instead of building an array, this removes
the possibility of sub-shell screwups.
2018-11-09 17:33:44 -05:00
Patrick Marchand e3a50177c8 Cleanup get_user_login_by_UID() in ftpadmin.sh
Adds proper variable quoting
2018-11-07 17:27:03 -05:00