Skip to content

Commit 7e02569

Browse files
authored
Trim all whitespace (hestiacp#3038)
1 parent 2459e7b commit 7e02569

File tree

397 files changed

+2829
-2829
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

397 files changed

+2829
-2829
lines changed

.drone.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
---
22
kind: pipeline
33
type: ssh
4-
name: Ubuntu | Nginx + Apache2
4+
name: Ubuntu | Nginx + Apache2
55

66
concurrency:
77
limit: 1
88

99
server:
1010
host:
1111
from_secret: server_address
12-
user:
12+
user:
1313
from_secret: username
14-
ssh_key:
14+
ssh_key:
1515
from_secret: ssh_key
1616

1717
platform:
1818
os: linux
1919
arch: amd64
20-
20+
2121
steps:
2222
- name: Download submodules
2323
image: alpine/git
@@ -32,7 +32,7 @@ steps:
3232
- name: Run restore tests
3333
commands:
3434
- bats ./test/restore.bats
35-
- name: Run config tests
35+
- name: Run config tests
3636
commands:
3737
- bats ./test/config-tests.bats
3838

@@ -48,23 +48,23 @@ trigger:
4848
---
4949
kind: pipeline
5050
type: ssh
51-
name: Debian | Nginx
51+
name: Debian | Nginx
5252

5353
concurrency:
5454
limit: 1
5555

5656
server:
5757
host:
5858
from_secret: server_address2
59-
user:
59+
user:
6060
from_secret: username
61-
ssh_key:
61+
ssh_key:
6262
from_secret: ssh_key
6363

6464
platform:
6565
os: linux
6666
arch: amd64
67-
67+
6868
steps:
6969
- name: Download submodules
7070
image: alpine/git
@@ -83,10 +83,10 @@ steps:
8383
commands:
8484
- cp /root/le-env.sh /tmp/hestia-le-env.sh
8585
- bats ./test/letsencrypt.bats
86-
- name: Run config tests
86+
- name: Run config tests
8787
commands:
8888
- bats ./test/config-tests.bats
89-
89+
9090
trigger:
9191
event: [ pull_request, push ]
9292
ref:
@@ -161,9 +161,9 @@ steps:
161161
- freight-add ./hestia/*.deb apt/bionic apt/focal apt/jammy apt/stretch apt/buster apt/bullseye
162162
- freight-cache
163163
- rm -fr ./hestia/
164-
164+
165165
trigger:
166-
event: [ promote]
166+
event: [ promote]
167167

168168
---
169169
kind: signature

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Ways to contribute
99
- **Code review and bug fixes**:
1010
- Read over the code and if you notice errors (even spelling mistakes), submit a pull request with your changes.
1111
- **New features**:
12-
- Is there an awesome feature that you'd love to see included? Submit a pull request with your changes, and if approved your PR will be reviewed and merged for inclusion in an upcoming release. While our development team tries to accomodate all reasonable requests please remember that it does take time to develop, implement and test new features and as such we may not be able to fulfill all requests or may have to put a feature on backlog for a later date.
12+
- Is there an awesome feature that you'd love to see included? Submit a pull request with your changes, and if approved your PR will be reviewed and merged for inclusion in an upcoming release. While our development team tries to accomodate all reasonable requests please remember that it does take time to develop, implement and test new features and as such we may not be able to fulfill all requests or may have to put a feature on backlog for a later date.
1313
- **Translations**:
1414
- If you are a non-English speaker and would like to improve the quality of the translations used in Hestia Control Panel's web interface, please go to [Hestia Translate](https://translate.hestiacp.com/projects/hestiacp/) to review the translations database. For more information please read [How to contribute with Translations](https://forum.hestiacp.com/t/how-to-contribute-with-translations/1664) on our forum. You can also open an issue report [GitHub](https://www.github.com/hestiacp/hestiacp/issues) highlighting the issue with the current translation so that it can be corrected.
1515
- **Donations**:
@@ -25,7 +25,7 @@ Development for this project takes place in branches to effectively develop, man
2525

2626
We have three primary or "evergreen" branches, which exist throughout our product's lifetime. Please refer to the following table for a description:
2727

28-
| Branch | Description
28+
| Branch | Description
2929
|---------------|:---------------:|
3030
| `main` | Contains a snapshot of the latest development code.<br>**Not intended for production use and contains code from a merge snapshot.**
3131
| `beta` | Contains a snapshot of the next version which is currently in testing.<br>**Not intended for production use, however code from this branch should be stable.**
@@ -48,7 +48,7 @@ Branch name examples:
4848
* `test/mail-domain-ssl`
4949

5050
### Squashing commits for smaller changes
51-
To aid other developers and keep the project's commit history clean, please **squash your commits** when it's appropriate. For example with smaller commits related to the same piece of code, such as commits labelled "Fixed item 1", "Adjusted color of button XYZ", "Adjusted alignment of button XYZ" can be squashed into one commit with the title "Fixed button issues in item".
51+
To aid other developers and keep the project's commit history clean, please **squash your commits** when it's appropriate. For example with smaller commits related to the same piece of code, such as commits labelled "Fixed item 1", "Adjusted color of button XYZ", "Adjusted alignment of button XYZ" can be squashed into one commit with the title "Fixed button issues in item".
5252

5353
### What happens when I submit a pull request?
5454
- Our internal development team will review your work and validate your request.

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ If you are unable to use [Huntr.dev](https://huntr.dev/bounties/disclose/?target
1111

1212
We ask you to include a detailed description of the vulnerability, a list of services involved (e.g. exim, dovecot) and the versions which you've tested, full steps to reproduce the vulnerability, and include your findings and expected results.
1313

14-
Please do not open any public issue on Github or any other social media before the report has been published and a fix has been released.
14+
Please do not open any public issue on Github or any other social media before the report has been published and a fix has been released.
1515

1616
With that, good luck hacking us ;)
1717

bin/v-add-backup-host

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# example: v-add-backup-host sftp backup.acme.com admin p4$$w@Rd
66
# v-add-backup-host b2 bucketName keyID applicationKey
77
#
8-
# Add a new remote backup location. Currently SFTP, FTP and Backblaze are supported
8+
# Add a new remote backup location. Currently SFTP, FTP and Backblaze are supported
99

1010
#----------------------------------------------------------#
1111
# Variables & Functions #
@@ -50,7 +50,7 @@ EOF
5050

5151
# Defining sftp command function
5252
sftpc() {
53-
if [ "$privatekey" != "yes" ]; then
53+
if [ "$privatekey" != "yes" ]; then
5454
expect -f "-" <<EOF "$@"
5555
set count 0
5656
spawn /usr/bin/sftp -o StrictHostKeyChecking=no -o Port=$port $user@$host
@@ -109,19 +109,19 @@ else
109109
set count 0
110110
spawn /usr/bin/sftp -o StrictHostKeyChecking=no -o Port=$port -i $raw_password $user@$host
111111
expect {
112-
112+
113113
-re "Couldn't|(.*)disconnect|(.*)stalled|(.*)not found" {
114114
set count \$argc
115115
set output "Disconnected."
116116
set rc $E_FTP
117117
exp_continue
118118
}
119-
119+
120120
-re ".*denied.*(publickey|password)." {
121121
set output "Permission denied, wrong publickey or password."
122122
set rc $E_CONNECT
123123
}
124-
124+
125125
"sftp>" {
126126
if {\$count < \$argc} {
127127
set arg [lindex \$argv \$count]
@@ -136,17 +136,17 @@ else
136136
}
137137
exp_continue
138138
}
139-
139+
140140
timeout {
141141
set output "Connection timeout."
142142
set rc $E_CONNECT
143143
}
144144
}
145-
145+
146146
if {[info exists output] == 1} {
147147
puts "\$output"
148148
}
149-
149+
150150
exit \$rc
151151
EOF
152152
fi
@@ -167,13 +167,13 @@ if [ "$type" != 'local' ];then
167167
privatekey="yes"
168168
password="$raw_password"
169169
else
170-
is_password_valid
171-
fi
170+
is_password_valid
171+
fi
172172
else
173173
is_password_valid
174174
fi
175175
format_no_quotes "$password" "password"
176-
176+
177177
if [ "$type" = 'sftp' ]; then
178178
which expect >/dev/null 2>&1
179179
check_result $? "expect command not found" "$E_NOTEXIST"
@@ -273,11 +273,11 @@ if [ "$type" = 'b2' ]; then
273273
echo "Error: Binary download failed, b2 doesnt work as expected."
274274
exit 3
275275
fi
276-
276+
277277
b2 clear-account > /dev/null 2>&1
278278
b2 authorize-account "$user" "$raw_password"> /dev/null 2>&1
279279
b2 ls --long "$host" "$user" > /dev/null 2>&1
280-
280+
281281
if [ $? -ne 0 ]; then
282282
check_result "$E_CONNECT" "b2 failed to verify connection"
283283
fi
@@ -286,7 +286,7 @@ fi
286286
if [ "$type" = 'rclone' ]; then
287287
curl -s https://rclone.org/install.sh | bash /dev/null > /dev/null 2>&1
288288
# Verify account exists
289-
if [ ! -z "$(cat /root/.config/rclone/rclone.conf | grep "\[$host\]")" ]; then
289+
if [ ! -z "$(cat /root/.config/rclone/rclone.conf | grep "\[$host\]")" ]; then
290290
echo "test" > /tmp/hestia-backup.txt
291291
# Try to upload a single file
292292
if [ -z "$path" ]; then

bin/v-add-database

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ source_conf "$HESTIA/conf/hestia.conf"
3838

3939
if [ "$type" = "pgsql" ]; then
4040
database=$(echo "$user"_"$2" | tr '[:upper:]' '[:lower:]');
41-
dbuser=$(echo "$user"_"$3" | tr '[:upper:]' '[:lower:]');
41+
dbuser=$(echo "$user"_"$3" | tr '[:upper:]' '[:lower:]');
4242
fi
4343

4444
#----------------------------------------------------------#
@@ -60,7 +60,7 @@ is_object_unsuspended "../../../conf/$type" 'DBHOST' "$host"
6060
is_package_full 'DATABASES'
6161
is_password_valid
6262

63-
if [ "$type" = "pgsql" ]; then
63+
if [ "$type" = "pgsql" ]; then
6464
exclude="-"
6565
if [[ "$dbuser" =~ $exclude ]]; then
6666
check_result "$E_INVALID" "invalid database user format"

bin/v-add-database-host

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ is_mysql_host_alive() {
4141
echo "user='$dbuser'" >> $mycnf
4242
echo "password='$password'" >> $mycnf
4343
echo "port='$port'" >> $mycnf
44-
44+
4545
chmod 600 $mycnf
4646
mysql --defaults-file=$mycnf -e 'SELECT VERSION()' >/dev/null 2>&1
4747
rm $mycnf
48-
48+
4949
if [ "$?" -ne '0' ]; then
5050
echo "Error: MySQL connection to $host failed"
5151
log_event "$E_CONNECT" "$ARGUMENTS"

bin/v-add-database-temp-user

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
#
55
# example: v-add-database-temp-user wordress wordpress_db mysql
66
#
7-
# This function creates an temporary database user mysql_sso_db_XXXXXXXX and a random password
8-
# The user has an limited validity and only granted access to the specific database
7+
# This function creates an temporary database user mysql_sso_db_XXXXXXXX and a random password
8+
# The user has an limited validity and only granted access to the specific database
99
# Returns json to be read SSO Script
1010

1111
#----------------------------------------------------------#
@@ -57,7 +57,7 @@ check_hestia_demo_mode
5757
# Get database values
5858
get_database_values
5959

60-
#generate password and unique user
60+
#generate password and unique user
6161
dbpass=$(generate_password);
6262
dbuser="hestia_sso_$(generate_password)";
6363

bin/v-add-dns-domain

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ else
6565
is_domain_new 'dns' "$domain"
6666
fi
6767
if [ -z "$(is_ip_format_valid $domain)" ]; then
68-
echo "Error: Invalid domain format. IP address detected as input."
68+
echo "Error: Invalid domain format. IP address detected as input."
6969
exit 1
7070
fi
7171

72-
if [ -n "$restart" ]; then
72+
if [ -n "$restart" ]; then
7373
is_format_valid 'restart'
7474
fi
7575

bin/v-add-dns-record

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ fi
6666
# - [SRV] will be stripped of double quotes even when containing spaces
6767
# - [DNSKEY] will be stripped of double quotes even when containing spaces
6868
# - Rest of record types will be striped of quotes and the final string
69-
# will be enclosed in double quotes if containing spaces or semicolons
69+
# will be enclosed in double quotes if containing spaces or semicolons
7070

7171
if [ "$rtype" != "CAA" ]; then
7272
dvalue=${dvalue//\"/}
7373
# Add support for DS key
74-
if [ "$rtype" != "DNSKEY" ] && [ "$rtype" != "DS" ] ; then
74+
if [ "$rtype" != "DNSKEY" ] && [ "$rtype" != "DS" ] ; then
7575
if [ "$rtype" != 'SRV' ] && [[ "$dvalue" =~ [\;[:space:]] ]]; then
7676
dvalue='"'"$dvalue"'"'
7777
fi

bin/v-add-fastcgi-cache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ EOF
8080
chown root:$user $fastcgi
8181
chmod 640 $fastcgi
8282

83-
str="fastcgi_cache_path /var/cache/nginx/micro/$domain levels=1:2"
84-
str="$str keys_zone=$domain:10m max_size=512m inactive=30m use_temp_path=off;"
83+
str="fastcgi_cache_path /var/cache/nginx/micro/$domain levels=1:2"
84+
str="$str keys_zone=$domain:10m max_size=512m inactive=30m use_temp_path=off;"
8585
conf='/etc/nginx/conf.d/fastcgi_cache_pool.conf'
8686
if [ -f "$conf" ]; then
8787
if [ -z "$(grep "=${domain}:" $conf)" ]; then

0 commit comments

Comments
 (0)