rtinst icon indicating copy to clipboard operation
rtinst copied to clipboard

[Req] Add support for LinuxMint 20 Cinnamon

Open i2sly opened this issue 3 years ago • 29 comments

Sorry to ask about it here but I am new to GitHub and cannot figure out how to email or send a question. Is there any chance it could be made to work with LinuxMint 20 Cinnamon https://linuxmint.com/ . It is based off Ubuntu/Debian and I know all of these things individually can be installed but the script does not work as it is. I am not sure if it is just doing a check to see if it is using one of your tested working systems and since it is not it fails it or if it is just actually not able to work. Thank You for your time.

i2sly avatar Oct 12 '20 03:10 i2sly

Let's give this a try. Download rtinst as usual, open the script named rtinst in /etc/rtinst/scripts and change code lines 202-203 to:

osname=ubuntu
relno=20

Do the same for the files rtupdate and rtletsencrypt (line 13-14). Then make the files executable by sudo chmod +x /etc/rtinst/scripts/{rtinst,rtupdate,rtletsencrypt}. Run rtinst again and let us know if you faced any issues 👍

V33m avatar Oct 12 '20 08:10 V33m

That still left me with it saying invalid version, I commented out 304-312 on rtinst and it is currently installing. I have it logging the install so I will check it out tomorrow after work and let you know if worked or what didn't work.

i2sly avatar Oct 13 '20 07:10 i2sly

Ok, it finished faster than I expected. It looks like everything but rtorrent installed. It did not create a log so I am unsure why that one failed but I think its because of the way I bypassed the os version check and for rtorrent you have it set to install versions based on OS build. How hard would it be to add "Linux Mint 20" as being valid? I poked around but couldn't see where to add it myself on a quick glance.

Below is the install notes that it showed on CLI

Summary of Installation (Important Information, please read

SSH Configured SSH port set to 26482 root login directly from SSH disabled login with i2sly and switch to root using: sudo su

FTP Server vsftpd 3.0.3-12 installed ftp port set to 48975 ftp client should be set to explicit ftp over tls using port 48975

rtorrent torrent client rtorrent was not installed

RuTorrent Web GUI RuTorrent 3.10 installed rutorrent can be accessed at https://192.168.1.5/rutorrent rutorrent password as set by user to change rutorrent password enter: rtpass

If enabled, access https downloads at https://192.168.1.5/download/i2sly

IMPORTANT: SSH Port set to 26482 IMPORTANT: SSH Port set to 26482 IMPORTANT: SSH Port set to 26482 Please ensure you can login BEFORE closing this session

The above information is stored in rtinst.info in your home directory. To see contents enter: cat /home/i2sly/rtinst.info

i2sly avatar Oct 13 '20 07:10 i2sly

It's easy to add support for it, but by adding support for it, the devs needs to maintain more. I don't mind adding it, but I think that we should have at least five requests before we include it. Unless arkasi72 approves to add it.

V33m avatar Oct 13 '20 10:10 V33m

That would be great if Linux Mint 20 got official support. But I meant for the time being for me, how hard would it be to add it to the script to see if it works? Thanks

i2sly avatar Oct 13 '20 12:10 i2sly

Also, cinnamon is just the GUI choice so it would just be Linux Mint 20

i2sly avatar Oct 13 '20 13:10 i2sly

It can easily be added to the script. I'll make a new branch and do that when I receive the correct output from you. Run each line below and post the output

lsb_release -sd
lsb_release -si
lsb_release -sr | cut -d. -f1
grep -oP '(?<=^ID=).+' /etc/os-release | tr -d '"'
grep -oP '(?<=^VERSION_ID=).+' /etc/os-release | tr -d '"'

V33m avatar Oct 13 '20 21:10 V33m

lsb_release -sd Linux Mint 20

lsb_release -si Linuxmint

lsb_release -sr | cut -d. -f1 20

grep -oP '(?<=^ID=).+' /etc/os-release | tr -d '"' linuxmint

grep -oP '(?<=^VERSION_ID=).+' /etc/os-release | tr -d '"' 20

i2sly avatar Oct 13 '20 22:10 i2sly

Played with it a bit more, should work fine if I can get logging to work and see where the minor bugs are. If I manually go with apt-get install rtorrent and then tell rtinst to redo rtorrent install it seems to work but I am not 100% sure. Also I looked and mint 20 is based off ubuntu 20 lts so it should be pretty compatible as is. Also, thank you for all your help.

i2sly avatar Oct 14 '20 08:10 i2sly

@i2sly, can you download the updated scripts from the Linux-Mint-20-Support branch and try to do a install with logging enabled? Remember to make the scripts executable with sudo chmod +x FILE before running rtinst.

V33m avatar Oct 14 '20 10:10 V33m

It installed perfectly but I can't find a log. Did I do something wrong in my options switch's?

I used sudo rtinst -d -l -t

i2sly avatar Oct 14 '20 15:10 i2sly

rtinst.log

Found it 👍

i2sly avatar Oct 14 '20 15:10 i2sly

Glad to hear that it worked! It needs further testing with a clean install etc. so I'll not close the issue or merge it to master yet.

V33m avatar Oct 14 '20 19:10 V33m

Just for your knowledge this was a clean install. Only thing I had installed after fresh was ZNC, VIM and OpenSSH. If you would like I have a test server I can re-install fresh and let you TeamViewer into. I will get you the TeamViewer ID here shortly.

Also, is there a way to log the rtwebmin install. That isn't working, but it also didn't work on my Ubuntu 18 install I tested so not sure what the problem is there.

i2sly avatar Oct 14 '20 20:10 i2sly

I have TeamViewer login info for you, do you have an email or chat I can send it to you in? This install was just done clean from usb boot, only installed teamviewer and chrome and updated system files. It is a spare pc so you can go in and fully test it however you see fit. Once I have somewhere to send the info I will get it to you.

If you need anything at all or want me to try anything just ask. Thanks

i2sly avatar Oct 14 '20 21:10 i2sly

Good. Then we only need more people who want this so it can be added. Add set -e -x to the third line in the webmin script. Then make the script executable and run sudo rtwebmin.

V33m avatar Oct 14 '20 21:10 V33m

Like this?

PATH=/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/bin:/sbin
serverip=$(ip route get 8.8.8.8 | awk 'NR==1 {print $7}')
set -e -x
if [ "$(id -u)" != "0" ]; then
  echo "Must be run as root, directly or with sudo"
  exit 1
fi

i2sly avatar Oct 14 '20 21:10 i2sly

i2sly@Blackout-Server:/etc/rtinst/scripts$ sudo rtwebmin
++ id -u
+ '[' 0 '!=' 0 ']'
++ dpkg-query -W '-f=${Status}' webmin
++ grep -c 'ok installed'
+ '[' 1 -eq 0 ']'
+ echo 'Webmin is already installed'
Webmin is already installed
++ grep '^referers_none=' /etc/webmin/config
+ '[' -z referers_none=1 ']'
+ sed -i '/^referers_none=/ c\referers_none=1' /etc/webmin/config
++ grep '^referers=' /etc/webmin/config
+ '[' -z referers=localhost ']'
+ sed -i '/^referers=/ c\referers=localhost' /etc/webmin/config
++ grep '^webprefix=' /etc/webmin/config
+ '[' -z webprefix=/webmin ']'
+ sed -i '/^webprefix=/ c\webprefix=\/webmin' /etc/webmin/config
++ grep '^webprefixnoredir=' /etc/webmin/config
+ '[' -z webprefixnoredir=1 ']'
+ sed -i '/^webprefixnoredir=/ c\webprefixnoredir=1' /etc/webmin/config
++ grep '^referer=' /etc/webmin/config
+ '[' -z referer=1 ']'
+ sed -i '/^referer=/ c\referer=1' /etc/webmin/config
++ grep '^ssl=' /etc/webmin/miniserv.conf
+ '[' -z ssl=0 ']'
+ sed -i '/^ssl=/ c\ssl=0' /etc/webmin/miniserv.conf
+ echo 'Setting up Nginx Reverse Proxy'
Setting up Nginx Reverse Proxy
+ echo 'proxy_redirect off;'
+ echo 'proxy_set_header Host $host;'
+ echo 'proxy_set_header X-Real-IP $remote_addr;'
+ echo 'proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;'
+ echo 'proxy_cache off;'
+ echo 'proxy_buffering off;'
+ sed -i /webmin-loc/d /etc/nginx/sites-available/default
+ sed -i '/^$/N;/^\n$/D' /etc/nginx/sites-available/default
++ grep -Fn 'location ~ /\.ht' /etc/nginx/sites-available/default
++ cut -d : -f 1
++ tail -1
+ lineno=67
+ sed -i '67i\        include \/etc\/nginx\/sites-available\/webmin-loc;\n' /etc/nginx/sites-available/default
+ echo 'location /webmin/ {'
+ echo '       proxy_pass http://localhost:10000/;'
+ echo '       proxy_redirect http://$host:10000/ /webmin/;'
+ echo '}'
+ service webmin restart
+ service nginx restart
+ echo Completed
Completed
+ echo

+ echo 'Webmin can be accessed at https://192.168.1.5/webmin'
Webmin can be accessed at https://192.168.1.5/webmin
+ echo 'login using root, or sudo user credentials'
login using root, or sudo user credentials

i2sly avatar Oct 14 '20 21:10 i2sly

Get a 404 Not Found error when going to localhost/webmin though

i2sly avatar Oct 14 '20 21:10 i2sly

No, after #!/bin/bash:

#!/bin/bash
set -e -x
######################################################################
#
#  Copyright (c) 2015 arakasi72 (https://github.com/arakasi72)
...

It should be fine regardless with the output you have provided. Use the address: https://192.168.1.5/webmin. Does it work now?

V33m avatar Oct 14 '20 21:10 V33m

shit, yes, it was not in https. I was working on it remotely earlier and apparently missed that. So it is working just fine as well.

i2sly avatar Oct 14 '20 21:10 i2sly

Yes, please. Add support for Linux Mint, not just for Mint 20, but also future versions - version 20.1 just got released.

SSamiK avatar Jan 11 '21 16:01 SSamiK

It works on new version

On Mon, Jan 11, 2021, 10:27 AM SSamiK [email protected] wrote:

Yes, please. Add support for Linux Mint, not just for Mint 20, but also future versions - version 20.1 just got released.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/arakasi72/rtinst/issues/535#issuecomment-758067373, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARKZ7HEFLOFHZSVXT4ZI3ATSZMRIHANCNFSM4SMHJSQA .

i2sly avatar Jan 11 '21 16:01 i2sly

I tried it just a few minutes ago on Linux Mint 20.1 and it dit not work.. Too old version of Ubuntu, it said.

SSamiK avatar Jan 11 '21 16:01 SSamiK

Did you download the Mint fork? It's not supported fully yet but he modified it to show Mint and it works great

On Mon, Jan 11, 2021, 10:38 AM SSamiK [email protected] wrote:

I tried it just a few minutes ago on Linux Mint 20.1 and it dit not work.. Too old version of Ubuntu, it said.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/arakasi72/rtinst/issues/535#issuecomment-758073906, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARKZ7HH2N5HMDM2VYYHXRV3SZMSQ7ANCNFSM4SMHJSQA .

i2sly avatar Jan 11 '21 16:01 i2sly

You are right! Downloaded the fork now, and it worked like a charm. Thanks!

SSamiK avatar Jan 11 '21 17:01 SSamiK

Glad to hear it!

On Mon, Jan 11, 2021, 11:36 AM SSamiK [email protected] wrote:

You are right! Downloaded the fork now, and it worked like a charm. Thanks!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/arakasi72/rtinst/issues/535#issuecomment-758108095, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARKZ7HBUDPPTQ3JDOH6KXWDSZMZJFANCNFSM4SMHJSQA .

i2sly avatar Jan 11 '21 17:01 i2sly

Here we are, a couple of years later.. Any hope getting this to work in latest Mint? Since last time a couple of updates have come. Ubuntu is newer, Mint is newer, and libcrypto.so.1.1 is deprecated although installable via Debian libssl1.1 deb.

SSamiK avatar Jan 14 '24 19:01 SSamiK

lsb_release -sd Linux Mint 21.3 lsb_release -si Linuxmint lsb_release -sr | cut -d. -f1 21 grep -oP '(?<=^ID=).+' /etc/os-release | tr -d '"' linuxmint grep -oP '(?<=^VERSION_ID=).+' /etc/os-release | tr -d '"' 21.3

SSamiK avatar Jan 14 '24 20:01 SSamiK