Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
services:wetty [2024/04/24 07:05] – [Start & Autostart] willy | services:wetty [2024/08/07 14:53] (current) – willy | ||
---|---|---|---|
Line 17: | Line 17: | ||
Now, as usual, | Now, as usual, | ||
<code bash> | <code bash> | ||
- | useradd -m wetty | + | useradd |
</ | </ | ||
Line 67: | Line 67: | ||
===== Start & Autostart ===== | ===== Start & Autostart ===== | ||
- | To start WeTTY as a service, if you follow my [[gentoo:locald|Custom User Services]], | + | Using OpenRC, drop the following script into /etc/init.d: |
+ | <file - / | ||
+ | # | ||
+ | # Copyright 1999-2021 Gentoo Authors | ||
+ | # Distributed under the terms of the GNU General Public License v2 | ||
+ | |||
+ | description=" | ||
+ | pidfile="/ | ||
+ | command_background=true | ||
+ | command="/ | ||
+ | command_args="" | ||
+ | command_user=" | ||
+ | |||
+ | depend() { | ||
+ | need net | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | And you will also need to create the following script under **/ | ||
<file - wetty_start.sh> | <file - wetty_start.sh> | ||
#!/bin/bash | #!/bin/bash | ||
+ | |||
+ | export NVM_DIR=" | ||
+ | [ -s " | ||
+ | [ -s " | ||
+ | |||
wetty \ | wetty \ | ||
| | ||
Line 78: | Line 101: | ||
| | ||
</ | </ | ||
+ | |||
+ | 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 // | ||
Note: if you want to leave the user out you can omit the // | Note: if you want to leave the user out you can omit the // | ||
Line 83: | 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 / |
- | ln -s _servicer.sh 99-wetty--script.stop | + | rc-update add wetty default |
</ | </ | ||
And you are all set. | And you are all set. | ||