User Tools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
services:wetty [2024/04/24 07:54] – [Installation] willyservices:wetty [2024/08/07 14:53] (current) willy
Line 67: Line 67:
 ===== Start & Autostart ===== ===== Start & Autostart =====
  
-To start WeTTY as a serviceif you follow my [[gentoo:locald|Custom User Services]], create the following script under **/data/daemons/wetty/wetty_start.sh**:+Using OpenRCdrop the following script into /etc/init.d: 
 +<file - /etc/init.d/wetty> 
 +#!/sbin/openrc-run 
 +# Copyright 1999-2021 Gentoo Authors 
 +# Distributed under the terms of the GNU General Public License v2 
 + 
 +description="Web SSH console" 
 +pidfile="/run/wetty.pid" 
 +command_background=true 
 +command="/home/wetty/wetty_start.sh" 
 +command_args="" 
 +command_user="wetty:wetty" 
 + 
 +depend() { 
 +        need net 
 +
 +</file> 
 + 
 +And you will also need to create the following script under **/data/daemons/wetty/wetty_start.sh**:
 <file - wetty_start.sh> <file - wetty_start.sh>
 #!/bin/bash #!/bin/bash
Line 84: Line 102:
 </file> </file>
  
-You need to copy the last lines of the **.bashrc** in the script because NVM requires those lines and the _servicer.sh script will run as non-interactive shell, thus bypassing the //.bashrc//.+You need to copy the last lines of the **.bashrc** in the script because NVM requires those lines and OpenRC will run as non-interactive shell, thus bypassing the //.bashrc//.
  
 Note: if you want to leave the user out you can omit the //--ssh-user// part, but then you will need to point your browser to **https://mydomain.com/wetty/ssh/user** to access your console. Note: if you want to leave the user out you can omit the //--ssh-user// part, but then you will need to point your browser to **https://mydomain.com/wetty/ssh/user** to access your console.
Line 90: Line 108:
 And make it executable, then create the links: And make it executable, then create the links:
 <code bash> <code bash>
-cd /etc/local.d +chmod +x /etc/init.d/wetty 
-ln -s _servicer.sh 99-wetty--script.start +chmod +x /home/wetty/wetty_start.sh 
-ln -s _servicer.sh 99-wetty--script.stop+rc-update add wetty default
 </code> </code>
  
 And you are all set. And you are all set.