diff --git a/CT-Build/Debian.yaml b/CT-Build/Debian.yaml index 2f5b0fe..a301e34 100644 --- a/CT-Build/Debian.yaml +++ b/CT-Build/Debian.yaml @@ -1532,7 +1532,15 @@ packages: #postgresql pkgs - packages: + - postgresql-common + action: install + early: true + variants: - postgresql + +#postgresql pkgs (part2) + - packages: + - postgresql-18 - pgadmin4-server - nano - uwsgi diff --git a/CT-Files/aptcacherng/Scripts/Init.sh b/CT-Files/aptcacherng/Scripts/Init.sh index f72015d..92e405b 100644 --- a/CT-Files/aptcacherng/Scripts/Init.sh +++ b/CT-Files/aptcacherng/Scripts/Init.sh @@ -11,4 +11,6 @@ setcap 'cap_net_bind_service=+ep' /sbin/apt-cacher-ng mv /opt/Setup/Configs/acng.conf /etc/apt-cacher-ng/acng.conf mv /opt/Setup/Scripts/UpdateMirrorList.sh /opt/UpdateMirrorList.sh #Enable apt-cacher-ng on startup -ln -s /lib/systemd/system/apt-cacher-ng.service /etc/systemd/system/multi-user.target.wants/apt-cacher-ng.service || true \ No newline at end of file +if ! [ -f /etc/systemd/system/multi-user.target.wants/apt-cacher-ng.service ]; then + ln -s /lib/systemd/system/apt-cacher-ng.service /etc/systemd/system/multi-user.target.wants/apt-cacher-ng.service || true +fi \ No newline at end of file diff --git a/CT-Files/linkwarden/Scripts/FirstRun.sh b/CT-Files/linkwarden/Scripts/FirstRun.sh index db17713..3f53685 100644 --- a/CT-Files/linkwarden/Scripts/FirstRun.sh +++ b/CT-Files/linkwarden/Scripts/FirstRun.sh @@ -24,7 +24,7 @@ sed -i "s#http://localhost:3000#$LinkwardenURL#" /opt/node/linkwarden/.env #Save PM2 statup config sudo -u node bash << EOF -(cd /opt/node/linkwarden; yarn prisma migrate deploy) +(cd /opt/node/linkwarden; yarn prisma:deploy) pm2 install pm2-logrotate pm2 start yarn --name Linkwarden --cwd /opt/node/linkwarden -- concurrently:start pm2 save diff --git a/CT-Files/linkwarden/Scripts/Init.sh b/CT-Files/linkwarden/Scripts/Init.sh index 9fa8b8a..fe4bd46 100644 --- a/CT-Files/linkwarden/Scripts/Init.sh +++ b/CT-Files/linkwarden/Scripts/Init.sh @@ -9,8 +9,6 @@ ln -s /opt/monolith-gnu-linux-x86_64 /usr/local/bin/monolith mv /opt/Setup/Scripts/Update-monolith.sh /opt/Update-monolith.sh #Install linkwarden - -rm -rf /root/.cache startpath=$(pwd) #Install Linkwarden @@ -23,10 +21,12 @@ rm -rf /root/.cache yarn install +yarn next telemetry disable +sudo -u node yarn next telemetry disable yarn prisma:generate yarn web:build -yarn next build yarn cache clean +npm cache clean --force apt clean cd $startpath @@ -34,3 +34,5 @@ cp /opt/node/linkwarden/.env.sample /opt/node/linkwarden/.env chown node: -R /opt/node/linkwarden su -c "cd /opt/node/linkwarden; npx playwright install chromium" node mv /opt/Setup/Scripts/Update-linkwarden.sh /opt/Update-linkwarden.sh + +rm -rf /root/.cache \ No newline at end of file diff --git a/CT-Files/postgresql/Configs/pgadmin-user-preferences.json b/CT-Files/postgresql/Configs/pgadmin-user-preferences.json index 03f6bd8..a7a35f5 100644 --- a/CT-Files/postgresql/Configs/pgadmin-user-preferences.json +++ b/CT-Files/postgresql/Configs/pgadmin-user-preferences.json @@ -1,6 +1,6 @@ { "preferences": { - "misc:themes:theme": "system" + "misc:user_interface:theme": "system" } } \ No newline at end of file diff --git a/CT-Files/postgresql/Scripts/FirstRun.sh b/CT-Files/postgresql/Scripts/FirstRun.sh index e7746d7..e3121c6 100644 --- a/CT-Files/postgresql/Scripts/FirstRun.sh +++ b/CT-Files/postgresql/Scripts/FirstRun.sh @@ -3,6 +3,7 @@ read -p "Enter your e-mail for pgAdmin login: " PostgressAdminMail read -p "Enter new password for pgAdmin and postgresql database admin: " -s NewPostgressPassword echo echo "Please wait..." +sleep 30 #Configure Postgresql su postgres -c "psql -c \"alter user postgres with password '$NewPostgressPassword';\"" diff --git a/CT-Files/postgresql/Scripts/Init.sh b/CT-Files/postgresql/Scripts/Init.sh index 14ddbc8..7afb78d 100644 --- a/CT-Files/postgresql/Scripts/Init.sh +++ b/CT-Files/postgresql/Scripts/Init.sh @@ -1,7 +1,8 @@ #!/bin/sh #Setup postgresql -printf "\n#User entries (Make sure to reload postgressql after updating this file) \n# TYPE DATABASE USER ADDRESS METHOD\n" >> /etc/postgresql/17/main/pg_hba.conf -sed -i "s|#listen_addresses = 'localhost'|listen_addresses = '*' |" /etc/postgresql/17/main/postgresql.conf +PGVersion=$(pg_config --version |awk '{split($2,a,"."); print a[1]}') +printf "\n#User entries (Make sure to reload postgressql after updating this file) \n# TYPE DATABASE USER ADDRESS METHOD\n" >> /etc/postgresql/$PGVersion/main/pg_hba.conf +sed -i "s|#listen_addresses = 'localhost'|listen_addresses = '*' |" /etc/postgresql/$PGVersion/main/postgresql.conf #Setup pgadmin adduser --system --shell /bin/false --ingroup www-data --disabled-password --disabled-login --home /var/lib/www/pgadmin pgadmin