Postgres server on Debian should run on Windows 11 boot.
Debian was installed using
wsl --install Debian
Postgres in Debian using
sudo apt install postgresql-12
Created /etc/wsl.conf as described in this answer:
[boot]
command="service postgresql start"
Created task scheduler task which runs on startup. Tried to run commands from it
wsl
and
wsl -u root
I tried to run VB script from here:
set object = createobject("wscript.shell")
object.run "wsl.exe", 0
However WSL and Postgres and are not started if Windows is re-booted.
Solutions in this answer seem to be outdated since /etc/wsl.conf should used to run daemons in WSL.
If VBS script is run from command line, Postgres server is started.
How to run Debian/Postgres as service in Windows 11 boot? Should SrvAny, NSSM or Startup Scheduled Task used?
wsl --version returns
Verze WSL: 1.0.3.0
Verze jádra: 5.15.79.1
Verze WSLg: 1.0.47
Verze MSRDC: 1.2.3575
Verze Direct3D: 1.606.4
Verze DXCore: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
verze Windows: 10.0.22621.1105
