LMDE 4 Auto Maintenance v1.3 Last Edit

Forum rules
Before you post please read how to get help
User avatar
vonMos
Level 1
Level 1
Posts: 46
Joined: Sat Mar 21, 2015 8:19 am
Location: Romania

LMDE 4 Auto Maintenance v1.3 Last Edit

Post by vonMos »

It can be modified for your own needs. :D
Also adblock is included, adblock at hosts level so you don't need ANY adblock in BROWSER...
To run the script:

Code: Select all

sudo su 
sh LMDE4FCv1.3.sh
Code explained: LMDE4FCv1.3

Code: Select all

#!/usr/bin
# LMDE 4 Auto Update + ADBLOCK HOSTS LEVEL + TRASH CLEANER & Firewall Rules Config V1.3
# Programs from base distro are not removed, you can add programs and remove them if you want
# Also update script is set to run every 60 minutes at minute 2 ex: 10:02, 11:02, 12:02 ..etc you can change that from crontab see script below
# RedShift setting are storred in .config folder, put that config file there, ex: ./home/user/.config (it's hidden)

# Remember to change NAME in autodelete.sh and the drive datails if you have many drives-> YOUR USERNAME !!!

#------------------------------------------------
#sudo apt-get remove celluloid -y
#sudo apt-get remove hexchat -y
#sudo apt-get remove thunderbird -y
#sudo apt-get remove transmission-gtk -y
#sudo apt-get remove rhythmbox -y
#sudo apt-get remove libreoffice -y
#------------------------------------------------

#LibreOffice
#sudo apt-get remove libreoffice-base -y
#sudo apt-get remove libreoffice-base-core -y
#sudo apt-get remove libreoffice-base-drivers -y
#sudo apt-get remove libreoffice-math -y
#sudo apt-get remove libreoffice-help-common -y
#sudo apt-get remove libreoffice-java-common -y
#sudo apt-get remove libreoffice-gtk3 -y
#sudo apt-get remove libreoffice-gnome -y
#sudo apt-get remove libreoffice-draw -y
#sudo apt-get remove libreoffice-impress -y
#sudo apt-get remove libreoffice-olgtrans -y
#sudo apt-get remove libreoffice-core -y
#sudo apt-get remove libreoffice-sdbc-hsqldb -y
#sudo apt-get remove libreoffice-style-tango -y
#sudo apt-get remove libreoffice-help-en-us -y
#sudo apt-get remove libreoffice-style-colibre -y
#sudo apt-get remove python3-uno -y

#Programs form starts
#sudo apt-get remove mintbackup -y
#sudo apt-get remove synaptic -y
#sudo apt-get remove mintwelcome -y
#sudo apt-get remove timeshift -y

#ADBLOCK at hosts level (you don't need any adblock in browser)
#-----------------------------------------------------------------------------------------------------------------
wget https://raw.githubusercontent.com/antiX-Linux/advert-block-antix/master/block-advert.sh -O /tmp/block-advert
chmod +x /tmp/block-advert
sudo cp /tmp/block-advert /usr/local/bin/
sudo apt-get install yad -y
sudo block-advert 
#-----------------------------------------------------------------------------------------------------------------

#CRONTAB
#-----------------------------------------------------------------------------------------------------------------
sudo cp -r autoupdate /
#write out current crontab
sudo sh /autoupdate/firewall.sh
crontab -l > mycron
#echo new cron into cron file
echo "2 * * * *  /autoupdate/autoupdate.sh >> /var/log/apt/autoupdate.log" >> mycron
#change in autodelete.sh the name -> YOUR USERNAME !!!
echo "2 * * * * sh /autoupdate/autodelete.sh >> /var/log/apt/autodelete.log" >> mycron 
#install new cron file
crontab mycron
rm mycron
crontab -l
#-----------------------------------------------------------------------------------------------------------------

#AutoUpdate programs (Best use script for a new install, it works with a old install also)
#-----------------------------------------------------------------------------------------------------------------
sudo apt-get update
sudo apt-get upgrade -y
#-----------------------------------------------------------------------------------------------------------------

#Programs to install (Add here what programs you want to be installed)
#I put some base programs that are a must for every PC 
#-----------------------------------------------------------------------------------------------------------------

sudo apt-get install vlc -y
sudo apt-get install chromium -y
sudo apt-get install filezilla -y
sudo apt-get install htop -y
sudo apt-get install unrar -y
sudo apt-get install gimp -y
sudo apt-get install qpdfview -y

#sudo apt-get install autotrash
#sudo apt-get install blender -y
#sudo apt-get install wireshark -y
#-----------------------------------------------------------------------------------------------------------------

Autoupdate code:

Code: Select all

#!/bin/bash
#
# apt-get updater script for cron automatization
# This script is released under the BSD 3-Clause License.

echo
echo "############################"
echo "Starting apt-get-autoupdater"
date
echo
sudo apt-get update
sudo apt-get --fix-broken install
sudo apt-get --yes upgrade
sudo apt-get autoremove
sudo apt autoremove -y
sudo apt autoremove
sudo apt-get clean
sudo apt-get autoclean
exit 0
Firewall code:

Code: Select all

#!/bin/bash
#
# apt-get updater script for cron automatization
# This script is released under the BSD 3-Clause License.
echo
echo "############################"
echo "Starting Firewall rules"
date
echo 
sudo apt-get install ufw
sudo nano /etc/default/ufw
#IPV6=yes
sudo ufw default reject incoming
sudo ufw default allow outgoing
# for ssh ... sudo ufw allow ssh
# for others ...     sudo ufw allow 6000:6007/tcp sudo ufw allow 6000:6007/udp ...etc
sudo ufw enable
echo 
exit 0
AutoDelete code :
#Replace username and details

Code: Select all

#!/bin/bash
#
# apt-get updater script for cron automatization
# This script is released under the BSD 3-Clause License.
echo
echo "############################"
echo "Starting Autodelete"
date
echo
#Replace username
#ex: sudo /bin/rm -rf /home/andrew/.local/share/Trash/*

sudo /bin/rm -rf /home/username/.local/share/Trash/*
echo "Trash Deleted from normal drive"
#Replace here with the name of the NTFS DRIVE OR OTHER ...
#ex: sudo /bin/rm -rf /media/andrew/01D466F8FB9ED500/.Trash-1000/*

sudo /bin/rm -rf /media/username/drivename/trashname/*
echo "Trash Deleted from external or other drive"
echo 
exit 0
Download here ->
LMDE4FCv1.3.7z
(2.1 KiB) Downloaded 1 time
NOTE: Do not download if you are a new user to Linux or do not understand any of the things in the scripts above.
Last edited by vonMos on Fri May 29, 2020 9:41 am, edited 4 times in total.

User avatar
karlchen
Level 21
Level 21
Posts: 12597
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: LMDE4 Please Take Care of Yourself :), LMDE4 AUTO MAINTENANCE

Post by karlchen »

<Mod>
Note 2020-05-28:
The post above has been superseded by a new post below: [1]

Submitting some self-written scripts, packaged in a .7z archive, does not qualify as a tutorial.
Therefore the thread has been moved from "LMDE 4 Tutorials" to "Scripts & Bash".
--
Warning:
Never
  • download some archive file
  • extract it on your system
  • and run the included shell scripts or any other included executable files
  • unless you have checked and fully understood what the the included shell scripts do
</Mod>
Image
Linux Mint 19.2 64-bit Cinnamon, Total Commander 9.22a 64-bit
Haß gleicht einer Krankheit, dem Miserere, wo man vorne herausgibt, was eigentlich hinten wegsollte. (Goethe)

User avatar
vonMos
Level 1
Level 1
Posts: 46
Joined: Sat Mar 21, 2015 8:19 am
Location: Romania

Re: LMDE4 Please Take Care of Yourself :), LMDE4 AUTO MAINTENANCE

Post by vonMos »

karlchen wrote:
Fri May 22, 2020 6:52 am
.
Don't worry i am not hacking anyone... making good these day's seems like a bad thing to do..
Last edited by karlchen on Fri May 22, 2020 11:18 am, edited 1 time in total.
Reason: Full post quote shortened. Post is right above this one.

User avatar
vonMos
Level 1
Level 1
Posts: 46
Joined: Sat Mar 21, 2015 8:19 am
Location: Romania

auto maintenance for lmde4 = never upgrade again manually

Post by vonMos »

:mrgreen:
Last edited by vonMos on Thu May 28, 2020 8:14 pm, edited 3 times in total.

User avatar
karlchen
Level 21
Level 21
Posts: 12597
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: LMDE4 Please Take Care of Yourself :), LMDE4 AUTO MAINTENANCE

Post by karlchen »

Hello, vanMos.
  • The warning applies to any piece of software, which a user downloads from a source, which is not an official Ubuntu / Linux Mint software source, not just to your set of scripts, packaged as "LMDE4 Full Config.7z".
    .
  • Specifically about your set of scripts:
    • There is no explanation of what each script does.
    • There is not even a concise summary of what the purpose of the packaged scripts is.
    • The only thing which the reader learns is that a particular script should be started with root permissions.
    • This script will uninstall some default Mint applications, among them hexchat and thunderbird, without asking for any further consent.
      (I would not be amused by these activities.)
    • This script installs some applications, again without asking for any consent.
      (Those of these applications, which I want to have, are already present. Again I am not particularly amused by these activities.)
    • Your scripts hold quite a few "apt-get" commandlines, which include the option -y, i.e. assume consent without asking.
      (As a rule I do not want apt-get to apply changes to my system without asking me first.)
    • The content of the autoupdater.sh is questionable. And why the heck does it have to run every 60 minutes? - We have got Update Manager.
To me the scripts in "LMDE4 Full Config.7z" look like a set of scripts, which you have tailored around your own preferences and needs. This is absolutely fine. Wishing to share such scripts with other users is also absolutely fine.
But this does not mean that the modifications, which the scripts will apply to a system, frequently without asking for consent, will be appreciated by everybody else.
This brings us back to the initial point, which I raised against your set of scripts specifically: There should be a clear explanation of what each script does.

I hope that most people will understand why your initial post has been moved from LMDE4 tutorials to Scripts & Bash and why the warning has been given not to execute any script, unless the person, who launches it, knows what the script will do.

Best regards,
Karl
Image
Linux Mint 19.2 64-bit Cinnamon, Total Commander 9.22a 64-bit
Haß gleicht einer Krankheit, dem Miserere, wo man vorne herausgibt, was eigentlich hinten wegsollte. (Goethe)

User avatar
vonMos
Level 1
Level 1
Posts: 46
Joined: Sat Mar 21, 2015 8:19 am
Location: Romania

Re: LMDE4 Please Take Care of Yourself :), LMDE4 AUTO MAINTENANCE

Post by vonMos »

karlchen wrote:
Fri May 22, 2020 11:46 am
Here it is -> viewtopic.php?p=1817362#p1817362
Last edited by karlchen on Fri May 22, 2020 7:35 pm, edited 3 times in total.
Reason: Removed the full quote of the post right above

ajgreeny
Level 5
Level 5
Posts: 546
Joined: Mon Nov 19, 2007 3:27 pm

Re: LMDE4 Please Take Care of Yourself :), LMDE4 AUTO MAINTENANCE

Post by ajgreeny »

Looks remarkably similar to the many posts on the web titled something like "Things you should do immediately after installing <distro>" none of which have ever added or removed anything that I want or need.

These are all completely pointless and personal wishes, but personal to the writer alone, probably no one else.
Personally I think it would be most sensible and safest to remove that script download link from this thread but that's just my feeling; others will probably disagree and think I am paranoid, and perhaps I am but I prefer to make my own decisions about my system and not follow blindly someone else's ideas.

Sorry if this upsets anyone who thinks such scripts are a "good thing", and as I say, these are my thoughts alone, but such scripts are dangerous in my opinion.

User avatar
vonMos
Level 1
Level 1
Posts: 46
Joined: Sat Mar 21, 2015 8:19 am
Location: Romania

Re: LMDE4 Please Take Care of Yourself :), LMDE4 AUTO MAINTENANCE

Post by vonMos »

ajgreeny wrote:
Fri May 22, 2020 4:27 pm
Looks remarkably similar to the many posts on the web titled something like "Things you should do immediately after installing <distro>" none of which have ever added or removed anything that I want or need.

These are all completely pointless and personal wishes, but personal to the writer alone, probably no one else.
Personally I think it would be most sensible and safest to remove that script download link from this thread but that's just my feeling; others will probably disagree and think I am paranoid, and perhaps I am but I prefer to make my own decisions about my system and not follow blindly someone else's ideas.

Sorry if this upsets anyone who thinks such scripts are a "good thing", and as I say, these are my thoughts alone, but such scripts are dangerous in my opinion.
You don't need to use them...i use the daily on my ultrabook, no having the trouble installing updates every day is a dream come true. This is why i start to hate Windows 10...make this kind of updates where i don't notice because i use my time to work not to install UPDATES....

User avatar
vonMos
Level 1
Level 1
Posts: 46
Joined: Sat Mar 21, 2015 8:19 am
Location: Romania

Re: LMDE4 Please Take Care of Yourself :), LMDE4 AUTO MAINTENANCE

Post by vonMos »

karlchen wrote:
Fri May 22, 2020 11:46 am
Hello, vanMos.
  • The warning applies to any piece of software, which a user downloads from a source, which is not an official Ubuntu / Linux Mint software source, not just to your set of scripts, packaged as "LMDE4 Full Config.7z".
    .
  • Specifically about your set of scripts:
    • There is no explanation of what each script does.
    • There is not even a concise summary of what the purpose of the packaged scripts is.
    • The only thing which the reader learns is that a particular script should be started with root permissions.
    • This script will uninstall some default Mint applications, among them hexchat and thunderbird, without asking for any further consent.
      (I would not be amused by these activities.)
    • This script installs some applications, again without asking for any consent.
      (Those of these applications, which I want to have, are already present. Again I am not particularly amused by these activities.)
    • Your scripts hold quite a few "apt-get" commandlines, which include the option -y, i.e. assume consent without asking.
      (As a rule I do not want apt-get to apply changes to my system without asking me first.)
    • The content of the autoupdater.sh is questionable. And why the heck does it have to run every 60 minutes? - We have got Update Manager.
To me the scripts in "LMDE4 Full Config.7z" look like a set of scripts, which you have tailored around your own preferences and needs. This is absolutely fine. Wishing to share such scripts with other users is also absolutely fine.
But this does not mean that the modifications, which the scripts will apply to a system, frequently without asking for consent, will be appreciated by everybody else.
This brings us back to the initial point, which I raised against your set of scripts specifically: There should be a clear explanation of what each script does.

I hope that most people will understand why your initial post has been moved from LMDE4 tutorials to Scripts & Bash and why the warning has been given not to execute any script, unless the person, who launches it, knows what the script will do.

Best regards,
Karl
It's a personal preference to run autoupdate every 60 mininutes, plus it has a log file to see the changes made every hour... the script can be configured for any personal preferences, also i don't like the Update Manager...it's buggy and i don't want to waste my time with pointless gui options with next->next->finish.
It install without the consent because the autoupdate.sh would not run properly, it would be stuck in a loop, for other commands -y can be removed and replaced.etc.. every linux medium/advanced user knows this.
This is the thing that i love about linux, it can do jobs in the background without me noticing anything...ofc if it's a backdoor then it's not a good thing :))

User avatar
vonMos
Level 1
Level 1
Posts: 46
Joined: Sat Mar 21, 2015 8:19 am
Location: Romania

Re: LMDE4 Please Take Care of Yourself :), LMDE4 AUTO MAINTENANCE

Post by vonMos »

Also the kernel updates are needed to be updated manualy or via (LMDE Update Manger) because i don't want to crush a perfect system by an buggy kernel release...
Last edited by Moem on Sat May 23, 2020 5:51 pm, edited 1 time in total.
Reason: Removed an unnecessary full quote. We all know how to scroll up.

User avatar
vonMos
Level 1
Level 1
Posts: 46
Joined: Sat Mar 21, 2015 8:19 am
Location: Romania

Re: LMDE4 Please Take Care of Yourself :), LMDE4 AUTO MAINTENANCE

Post by vonMos »

Also who uses hexchat, thunderbird, and that free torrent downloader + rythmbox?!?! what is this? 2010? and the vlc replacement is crap...for torrent there are superior tools and programs ex:Tixati...and so on etc..
Last edited by Moem on Sat May 23, 2020 5:52 pm, edited 1 time in total.
Reason: Removed an unnecessary full quote. We all know how to scroll up.

User avatar
Moem
Level 20
Level 20
Posts: 11053
Joined: Tue Nov 17, 2015 9:14 am
Location: The Netherlands
Contact:

Re: LMDE4 Please Take Care of Yourself :), LMDE4 AUTO MAINTENANCE

Post by Moem »

vonMos wrote:
Sat May 23, 2020 5:19 pm
Also who uses hexchat, thunderbird, and that free torrent downloader + rythmbox?!?!
I use Thunderbird, and I'd use Hexchat if it weren't for Pidgin and its IRC plugin. I've also used Transmission on occasion. Is there a problem with that?

On a different note: could you please not quote the full contents of Karlchen's post again and again? Three times is really too much of a good thing. Either please trim to the relevant part, or do not quote anything at all. Thanks!
Image

If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!

User avatar
vonMos
Level 1
Level 1
Posts: 46
Joined: Sat Mar 21, 2015 8:19 am
Location: Romania

Re: LMDE4 Please Take Care of Yourself :), LMDE4 AUTO MAINTENANCE

Post by vonMos »

Moem wrote:
Sat May 23, 2020 5:55 pm
vonMos wrote:
Sat May 23, 2020 5:19 pm
Also who uses hexchat, thunderbird, and that free torrent downloader + rythmbox?!?!
I use Thunderbird, and I'd use Hexchat if it weren't for Pidgin and its IRC plugin. I've also used Transmission on occasion. Is there a problem with that?

On a different note: could you please not quote the full contents of Karlchen's post again and again? Three times is really too much of a good thing. Either please trim to the relevant part, or do not quote anything at all. Thanks!
You see as we advance in knowledge we want something different, thats it. I used Thunderbird too with Debian 3 in 2005 but a lot of time has passed since then :mrgreen:

User avatar
vonMos
Level 1
Level 1
Posts: 46
Joined: Sat Mar 21, 2015 8:19 am
Location: Romania

Re: LMDE4 Please Take Care of Yourself :), LMDE4 AUTO MAINTENANCE

Post by vonMos »

Pidgin?..ahh i remember the days of ScatterChat :D...also Transmission is slow as duck and meh...Tixati si far superior..+there are many alternatives to many factory based installed software.
Last edited by Moem on Sat May 23, 2020 6:17 pm, edited 1 time in total.
Reason: Removed an unnecessary full quote. We all know how to scroll up.

User avatar
Moem
Level 20
Level 20
Posts: 11053
Joined: Tue Nov 17, 2015 9:14 am
Location: The Netherlands
Contact:

Re: LMDE4 Please Take Care of Yourself :), LMDE4 AUTO MAINTENANCE

Post by Moem »

vonMos wrote:
Sat May 23, 2020 6:11 pm
Moem wrote:
Sat May 23, 2020 5:55 pm
I use Thunderbird, and I'd use Hexchat if it weren't for Pidgin and its IRC plugin. I've also used Transmission on occasion. Is there a problem with that?
You see as we advance in knowledge we want something different, thats it. I used Thunderbird too with Debian 3 in 2005 but a lot of time has passed since then :mrgreen:
Back in 1997, I used Eudora... then SeaMonkey Mail, now Thunderbird. Is there something 'not advanced' about using Thunderbird?
Image

If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!

User avatar
vonMos
Level 1
Level 1
Posts: 46
Joined: Sat Mar 21, 2015 8:19 am
Location: Romania

Re: LMDE4 Please Take Care of Yourself :), LMDE4 AUTO MAINTENANCE

Post by vonMos »

Moem wrote:
Sat May 23, 2020 6:17 pm
vonMos wrote:
Sat May 23, 2020 6:11 pm
Moem wrote:
Sat May 23, 2020 5:55 pm
I use Thunderbird, and I'd use Hexchat if it weren't for Pidgin and its IRC plugin. I've also used Transmission on occasion. Is there a problem with that?
You see as we advance in knowledge we want something different, thats it. I used Thunderbird too with Debian 3 in 2005 but a lot of time has passed since then :mrgreen:
Back in 1997, I used Eudora... then SeaMonkey Mail, now Thunderbird. Is there something 'not advanced' about using Thunderbird?
I jumped to web based solutions and less end point software...bugs, security flaws, exploits etc..

User avatar
Moem
Level 20
Level 20
Posts: 11053
Joined: Tue Nov 17, 2015 9:14 am
Location: The Netherlands
Contact:

Re: LMDE4 Please Take Care of Yourself :), LMDE4 AUTO MAINTENANCE

Post by Moem »

vonMos wrote:
Sat May 23, 2020 6:22 pm
I jumped to web based solutions and less end point software...bugs, security flaws, exploits etc..
That's great. Doesn't really answer the question though. It's not like browsers aren't known for bugs, security flaws, exploits...
Image

If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!

User avatar
vonMos
Level 1
Level 1
Posts: 46
Joined: Sat Mar 21, 2015 8:19 am
Location: Romania

Re: LMDE4 Please Take Care of Yourself :), LMDE4 AUTO MAINTENANCE

Post by vonMos »

Moem wrote:
Sat May 23, 2020 6:41 pm
vonMos wrote:
Sat May 23, 2020 6:22 pm
I jumped to web based solutions and less end point software...bugs, security flaws, exploits etc..
That's great. Doesn't really answer the question though. It's not like browsers aren't known for bugs, security flaws, exploits...
Who said anything about browsers... :) there are many ways to run a webapp you don't need chrome or firefox...custom solution :)

User avatar
vonMos
Level 1
Level 1
Posts: 46
Joined: Sat Mar 21, 2015 8:19 am
Location: Romania

LMDE 4 Auto Maintenance v1.1 Updated

Post by vonMos »

:twisted:
Last edited by vonMos on Thu May 28, 2020 8:17 pm, edited 2 times in total.

User avatar
karlchen
Level 21
Level 21
Posts: 12597
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: LMDE 4 Auto Maintenance v1.1 Updated

Post by karlchen »

<mod> Just like the previous first incarnation of the same post, [on top], it simply does not qualify as a tutorial. Moved to "Scripts & Bash". </mod>
Image
Linux Mint 19.2 64-bit Cinnamon, Total Commander 9.22a 64-bit
Haß gleicht einer Krankheit, dem Miserere, wo man vorne herausgibt, was eigentlich hinten wegsollte. (Goethe)

Post Reply

Return to “Scripts & Bash”