Skip to content

Commit 2306531

Browse files
authored
[core] Rebase Scripts (formatting, highlighting & remove old deps) (#3378)
* Big Refactor: Remove Deps / Formatting & Correct End Of Line Sequence * f
1 parent 316a671 commit 2306531

File tree

290 files changed

+794
-1891
lines changed

Some content is hidden

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

290 files changed

+794
-1891
lines changed

ct/ghost.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
2-
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
2+
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
33
# Copyright (c) 2021-2025 community-scripts ORG
44
# Author: fabrice1236
55
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
@@ -25,7 +25,7 @@ function update_script() {
2525
check_container_resources
2626
msg_info "Updating ${APP} LXC"
2727

28-
if command -v ghost &> /dev/null; then
28+
if command -v ghost &>/dev/null; then
2929
current_version=$(ghost version | grep 'Ghost-CLI version' | awk '{print $3}')
3030
latest_version=$(npm show ghost-cli version)
3131
if [ "$current_version" != "$latest_version" ]; then
@@ -49,4 +49,4 @@ description
4949
msg_ok "Completed Successfully!\n"
5050
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
5151
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
52-
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:2368${CL}"
52+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:2368${CL}"

ct/gitea.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ description
4646
msg_ok "Completed Successfully!\n"
4747
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
4848
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
49-
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"
49+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"

ct/glance.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,4 @@ description
6464
msg_ok "Completed Successfully!\n"
6565
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
6666
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
67-
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8080${CL}"
67+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8080${CL}"

ct/gokapi.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ description
3838
msg_ok "Completed Successfully!\n"
3939
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
4040
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
41-
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:53842/setup${CL}"
41+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:53842/setup${CL}"

ct/hev-socks5-server.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@ msg_ok "Completed Successfully!\n"
6161
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
6262
echo -e "${INFO}${YW} Access it with a SOCKS5 client using the following URL:${CL}"
6363
echo -e "${TAB}${GATEWAY}${BGN}${IP}:1080${CL}"
64-
echo -e "${INFO}${YW} and the credentials stored at /root/hev.creds${CL}"
64+
echo -e "${INFO}${YW} and the credentials stored at /root/hev.creds${CL}"

install/2fauth-install.sh

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
66
# Source: https://docs.2fauth.app/
77

8-
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
8+
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
99
color
1010
verb_ip6
1111
catch_errors
@@ -15,13 +15,10 @@ update_os
1515

1616
msg_info "Installing Dependencies"
1717
$STD apt-get install -y \
18-
curl \
19-
sudo \
20-
mc \
21-
nginx \
22-
composer \
23-
php8.2-{bcmath,common,ctype,curl,fileinfo,fpm,gd,mbstring,mysql,xml,cli} \
24-
mariadb-server
18+
nginx \
19+
composer \
20+
php8.2-{bcmath,common,ctype,curl,fileinfo,fpm,gd,mbstring,mysql,xml,cli} \
21+
mariadb-server
2522
msg_ok "Installed Dependencies"
2623

2724
msg_info "Setting up Database"
@@ -32,30 +29,30 @@ $STD mysql -u root -e "CREATE DATABASE $DB_NAME;"
3229
$STD mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD('$DB_PASS');"
3330
$STD mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
3431
{
35-
echo "2FAuth Credentials"
36-
echo "Database User: $DB_USER"
37-
echo "Database Password: $DB_PASS"
38-
echo "Database Name: $DB_NAME"
39-
} >> ~/2FAuth.creds
32+
echo "2FAuth Credentials"
33+
echo "Database User: $DB_USER"
34+
echo "Database Password: $DB_PASS"
35+
echo "Database Name: $DB_NAME"
36+
} >>~/2FAuth.creds
4037
msg_ok "Set up Database"
4138

4239
msg_info "Setup 2FAuth"
4340
RELEASE=$(curl -s https://api.github.com/repos/Bubka/2FAuth/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
4441
wget -q "https://github.com/Bubka/2FAuth/archive/refs/tags/${RELEASE}.zip"
4542
unzip -q "${RELEASE}.zip"
46-
mv "2FAuth-${RELEASE//v}/" /opt/2fauth
43+
mv "2FAuth-${RELEASE//v/}/" /opt/2fauth
4744

4845
cd "/opt/2fauth" || return
4946
cp .env.example .env
5047
IPADDRESS=$(hostname -I | awk '{print $1}')
5148

5249
sed -i -e "s|^APP_URL=.*|APP_URL=http://$IPADDRESS|" \
53-
-e "s|^DB_CONNECTION=$|DB_CONNECTION=mysql|" \
54-
-e "s|^DB_DATABASE=$|DB_DATABASE=$DB_NAME|" \
55-
-e "s|^DB_HOST=$|DB_HOST=127.0.0.1|" \
56-
-e "s|^DB_PORT=$|DB_PORT=3306|" \
57-
-e "s|^DB_USERNAME=$|DB_USERNAME=$DB_USER|" \
58-
-e "s|^DB_PASSWORD=$|DB_PASSWORD=$DB_PASS|" .env
50+
-e "s|^DB_CONNECTION=$|DB_CONNECTION=mysql|" \
51+
-e "s|^DB_DATABASE=$|DB_DATABASE=$DB_NAME|" \
52+
-e "s|^DB_HOST=$|DB_HOST=127.0.0.1|" \
53+
-e "s|^DB_PORT=$|DB_PORT=3306|" \
54+
-e "s|^DB_USERNAME=$|DB_USERNAME=$DB_USER|" \
55+
-e "s|^DB_PASSWORD=$|DB_PASSWORD=$DB_PASS|" .env
5956

6057
export COMPOSER_ALLOW_SUPERUSER=1
6158
$STD composer update --no-plugins --no-scripts

install/actualbudget-install.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
66
# Source: https://actualbudget.org/
77

8-
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
8+
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
99
color
1010
verb_ip6
1111
catch_errors
@@ -15,9 +15,6 @@ update_os
1515

1616
msg_info "Installing Dependencies"
1717
$STD apt-get install -y \
18-
curl \
19-
sudo \
20-
mc \
2118
tini \
2219
gpg \
2320
build-essential
@@ -46,7 +43,7 @@ mkdir -p /opt/actualbudget-data/{server-files,upload,migrate,user-files,migratio
4643
chown -R root:root /opt/actualbudget-data
4744
chmod -R 755 /opt/actualbudget-data
4845

49-
cat <<EOF > /opt/actualbudget-data/.env
46+
cat <<EOF >/opt/actualbudget-data/.env
5047
ACTUAL_UPLOAD_DIR=/opt/actualbudget-data/upload
5148
ACTUAL_DATA_DIR=/opt/actualbudget-data
5249
ACTUAL_SERVER_FILES_DIR=/opt/actualbudget-data/server-files

install/adguard-install.sh

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,14 @@
55
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
66
# Source: https://adguard.com/
77

8-
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
8+
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
99
color
1010
verb_ip6
1111
catch_errors
1212
setting_up_container
1313
network_check
1414
update_os
1515

16-
msg_info "Installing Dependencies"
17-
$STD apt-get install -y curl
18-
$STD apt-get install -y sudo
19-
$STD apt-get install -y mc
20-
msg_ok "Installed Dependencies"
21-
2216
msg_info "Installing AdGuard Home"
2317
$STD tar zxvf <(curl -fsSL https://static.adtidy.org/adguardhome/release/AdGuardHome_linux_amd64.tar.gz) -C /opt
2418
msg_ok "Installed AdGuard Home"

install/adventurelog-install.sh

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
77
# Source: https://github.com/seanmorley15/AdventureLog
88

9-
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
9+
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
1010
color
1111
verb_ip6
1212
catch_errors
@@ -17,9 +17,6 @@ update_os
1717
msg_info "Installing Dependencies"
1818
$STD apt-get install -y \
1919
gpg \
20-
curl \
21-
sudo \
22-
mc \
2320
gdal-bin \
2421
libgdal-dev \
2522
git \
@@ -57,12 +54,12 @@ $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8'
5754
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';"
5855
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC';"
5956
{
60-
echo "AdventureLog-Credentials"
61-
echo "AdventureLog Database User: $DB_USER"
62-
echo "AdventureLog Database Password: $DB_PASS"
63-
echo "AdventureLog Database Name: $DB_NAME"
64-
echo "AdventureLog Secret: $SECRET_KEY"
65-
} >> ~/adventurelog.creds
57+
echo "AdventureLog-Credentials"
58+
echo "AdventureLog Database User: $DB_USER"
59+
echo "AdventureLog Database Password: $DB_PASS"
60+
echo "AdventureLog Database Name: $DB_NAME"
61+
echo "AdventureLog Secret: $SECRET_KEY"
62+
} >>~/adventurelog.creds
6663
msg_ok "Set up PostgreSQL"
6764

6865
msg_info "Installing AdventureLog (Patience)"
@@ -74,7 +71,7 @@ RELEASE=$(curl -s https://api.github.com/repos/seanmorley15/AdventureLog/release
7471
wget -q "https://github.com/seanmorley15/AdventureLog/archive/refs/tags/v${RELEASE}.zip"
7572
unzip -q v${RELEASE}.zip
7673
mv AdventureLog-${RELEASE} /opt/adventurelog
77-
cat <<EOF > /opt/adventurelog/backend/server/.env
74+
cat <<EOF >/opt/adventurelog/backend/server/.env
7875
PGHOST='localhost'
7976
PGDATABASE='${DB_NAME}'
8077
PGUSER='${DB_USER}'
@@ -103,7 +100,7 @@ $STD pip install -r requirements.txt
103100
$STD python3 manage.py collectstatic --noinput
104101
$STD python3 manage.py migrate
105102
$STD python3 manage.py download-countries
106-
cat <<EOF > /opt/adventurelog/frontend/.env
103+
cat <<EOF >/opt/adventurelog/frontend/.env
107104
PUBLIC_SERVER_URL=http://$LOCAL_IP:8000
108105
BODY_SIZE_LIMIT=Infinity
109106
ORIGIN='http://$LOCAL_IP:3000'
@@ -115,7 +112,7 @@ echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
115112
msg_ok "Installed AdventureLog"
116113

117114
msg_info "Setting up Django Admin"
118-
$STD python3 /opt/adventurelog/backend/server/manage.py shell << EOF
115+
$STD python3 /opt/adventurelog/backend/server/manage.py shell <<EOF
119116
from django.contrib.auth import get_user_model
120117
UserModel = get_user_model()
121118
user = UserModel.objects.create_user('$DJANGO_ADMIN_USER', password='$DJANGO_ADMIN_PASS')
@@ -124,11 +121,11 @@ user.is_staff = True
124121
user.save()
125122
EOF
126123
{
127-
echo ""
128-
echo "Django-Credentials"
129-
echo "Django Admin User: $DJANGO_ADMIN_USER"
130-
echo "Django Admin Password: $DJANGO_ADMIN_PASS"
131-
} >> ~/adventurelog.creds
124+
echo ""
125+
echo "Django-Credentials"
126+
echo "Django Admin User: $DJANGO_ADMIN_USER"
127+
echo "Django Admin Password: $DJANGO_ADMIN_PASS"
128+
} >>~/adventurelog.creds
132129
msg_ok "Setup Django Admin"
133130

134131
msg_info "Creating Service"
@@ -171,4 +168,4 @@ msg_info "Cleaning up"
171168
rm -rf /opt/v${RELEASE}.zip
172169
$STD apt-get -y autoremove
173170
$STD apt-get -y autoclean
174-
msg_ok "Cleaned"
171+
msg_ok "Cleaned"

install/agentdvr-install.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
66
# Source: https://www.ispyconnect.com/
77

8-
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
8+
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
99
color
1010
verb_ip6
1111
catch_errors
@@ -14,9 +14,6 @@ network_check
1414
update_os
1515

1616
msg_info "Installing Dependencies"
17-
$STD apt-get install -y curl
18-
$STD apt-get install -y sudo
19-
$STD apt-get install -y mc
2017
$STD apt-get install -y unzip
2118
$STD apt-get install -y apt-transport-https
2219
$STD apt-get install -y alsa-utils

0 commit comments

Comments
 (0)