2024-05-30 13:10:20 +02:00
|
|
|
# Check if already installed
|
|
|
|
if [[ $(which deno) == "/usr/local/bin/deno" ]]; then
|
|
|
|
# Upgrade deno
|
|
|
|
deno upgrade
|
|
|
|
else
|
|
|
|
# Install deno
|
|
|
|
curl -fsSL https://deno.land/install.sh | DENO_INSTALL=/usr/local sh
|
2024-05-29 14:03:17 +02:00
|
|
|
|
2024-05-30 13:10:20 +02:00
|
|
|
# Create group and user
|
|
|
|
groupadd --system deno
|
2024-05-29 14:03:17 +02:00
|
|
|
|
2024-05-30 13:10:20 +02:00
|
|
|
useradd --system \
|
|
|
|
--gid deno \
|
|
|
|
--create-home \
|
|
|
|
--home-dir /var/lib/deno \
|
|
|
|
--shell /usr/sbin/nologin \
|
|
|
|
--comment "Deno js engine" \
|
|
|
|
deno
|
|
|
|
fi
|
2024-05-29 14:03:17 +02:00
|
|
|
|
|
|
|
# Clone website repo
|
|
|
|
mkdir -p /srv/www
|
2024-05-29 14:06:50 +02:00
|
|
|
git clone -b main --depth 1 https://git.cohabit.fr/cohabit/website.git /srv/www
|