Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Req] Add support for LinuxMint 20 Cinnamon #535

Open
i2sly opened this issue Oct 12, 2020 · 29 comments
Open

[Req] Add support for LinuxMint 20 Cinnamon #535

i2sly opened this issue Oct 12, 2020 · 29 comments
Labels

Comments

@i2sly
Copy link

i2sly commented Oct 12, 2020

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.

@V33m
Copy link
Collaborator

V33m commented Oct 12, 2020

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 👍

@i2sly
Copy link
Author

i2sly commented Oct 13, 2020

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
Copy link
Author

i2sly commented Oct 13, 2020

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

@V33m
Copy link
Collaborator

V33m commented Oct 13, 2020

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 V33m changed the title LinuxMint 20 Cinnamon Support [Req] Add support for LinuxMint 20 Cinnamon Oct 13, 2020
@V33m V33m added the request label Oct 13, 2020
@i2sly
Copy link
Author

i2sly commented Oct 13, 2020

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
Copy link
Author

i2sly commented Oct 13, 2020

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

@V33m
Copy link
Collaborator

V33m commented Oct 13, 2020

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 '"'

@i2sly
Copy link
Author

i2sly commented Oct 13, 2020

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
Copy link
Author

i2sly commented Oct 14, 2020

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.

V33m added a commit that referenced this issue Oct 14, 2020
@V33m
Copy link
Collaborator

V33m commented Oct 14, 2020

@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.

@i2sly
Copy link
Author

i2sly commented Oct 14, 2020

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
Copy link
Author

i2sly commented Oct 14, 2020

rtinst.log

Found it 👍

@V33m
Copy link
Collaborator

V33m commented Oct 14, 2020

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.

@i2sly
Copy link
Author

i2sly commented Oct 14, 2020

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
Copy link
Author

i2sly commented Oct 14, 2020

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

@V33m
Copy link
Collaborator

V33m commented Oct 14, 2020

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.

@i2sly
Copy link
Author

i2sly commented Oct 14, 2020

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
Copy link
Author

i2sly commented Oct 14, 2020

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
Copy link
Author

i2sly commented Oct 14, 2020

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

@V33m
Copy link
Collaborator

V33m commented Oct 14, 2020

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?

@i2sly
Copy link
Author

i2sly commented Oct 14, 2020

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.

@SSamiK
Copy link

SSamiK commented Jan 11, 2021

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

@i2sly
Copy link
Author

i2sly commented Jan 11, 2021 via email

@SSamiK
Copy link

SSamiK commented Jan 11, 2021

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.

@i2sly
Copy link
Author

i2sly commented Jan 11, 2021 via email

@SSamiK
Copy link

SSamiK commented Jan 11, 2021

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

@i2sly
Copy link
Author

i2sly commented Jan 11, 2021 via email

@SSamiK
Copy link

SSamiK commented Jan 14, 2024

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
Copy link

SSamiK commented Jan 14, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants