Skip to content
Snippets Groups Projects
ttyd.sh 511 B
Newer Older
  • Learn to ignore specific revisions
  • Nathan Rodet's avatar
    Nathan Rodet committed
    #!/bin/sh
    
    #
    # Run ttyd service
    #
    
    mkdir -p /root/ttyd
    curl https://github.com/tsl0922/ttyd/releases/download/1.7.2/ttyd.x86_64 -o root/ttyd/ttyd.x86_64
    chmod +x /root/ttyd/ttyd.x86_64
    curl https://forge.grandlyon.com/systemes-dinformation/alpha/projects/labo-rust/-/raw/develop/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
    
    systemctl enable ttyd.service && systemctl start ttyd.service