Skip to content
Snippets Groups Projects
ttyd.sh 581 B
Newer Older
Nathan Rodet's avatar
Nathan Rodet committed
#!/bin/sh

#
# Run ttyd service
#

mkdir -p /root/ttyd
Nathan Rodet's avatar
Nathan Rodet committed
curl -k -L -s https://github.com/tsl0922/ttyd/releases/download/1.7.3/ttyd.x86_64 -o root/ttyd/ttyd.x86_64
Nathan Rodet's avatar
Nathan Rodet committed
chmod +x /root/ttyd/ttyd.x86_64
Nathan Rodet's avatar
Nathan Rodet committed
curl https://forge.grandlyon.com/systemes-dinformation/alpha/pocs/cloud-machinist/cloud-machinist-templates/scaleway-attack-instances-template/-/raw/main/instance-scripts/config-files/ttyd.service -o etc/systemd/system/ttyd.service
Nathan Rodet's avatar
Nathan Rodet committed
sed -i "s|%user_password%|$(scw-userdata user_password)|g" /etc/systemd/system/ttyd.service
Nathan Rodet's avatar
Nathan Rodet committed

Nathan Rodet's avatar
Nathan Rodet committed
systemctl enable ttyd.service && systemctl start ttyd.service