Linux : Différence entre versions
De TARENTINO
Aller à la navigationAller à la recherche| Ligne 2 : | Ligne 2 : | ||
<br> | <br> | ||
<div style="width:97%; height:500px; overflow:auto; border:solid 1px black;"> | <div style="width:97%; height:500px; overflow:auto; border:solid 1px black;"> | ||
| + | <syntaxhighlight lang="shell" line='line'> | ||
* #!/bin/bash | * #!/bin/bash | ||
* if [ ! -d "/root/.config" ]; then | * if [ ! -d "/root/.config" ]; then | ||
| Ligne 235 : | Ligne 236 : | ||
* # APT | * # APT | ||
* # | * # | ||
| + | </syntaxhighlight> | ||
</div> | </div> | ||
Version du 8 mars 2020 à 16:15
Array
1 * #!/bin/bash
2 * if [ ! -d "/root/.config" ]; then
3 * mkdir /root/.config
4 * fi
5 * if [ ! -d "/root/.config/nautilus" ]; then
6 * mkdir /root/.config/nautilus
7 * fi
8 * if [ ! -f "/root/.Xauthority" ]; then
9 * touch /root/.Xauthority
10 * fi
11 * DATE_NOW=`date +"%Y%m%d_%H%M%S"`
12 * logs="/root/Logs_Install.txt"
13 * rm -f $logs
14 * touch "$logs"
15 *
16 * # Repository
17 * echo "Installation Repository" | tee -a "$logs"
18 * add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe" -y | tee -a "$logs"
19 * apt-add-repository 'deb http://liveusb.info/multisystem/depot all main' -y | tee -a "$logs"
20 * z="unit193/encryption yannubuntu/boot-repair gwendal-lebihan-dev/cinnamon-stable simonschneegans/testing twodopeshaggy/jarun pmcenery/ppa gezakovacs/ppa"
21 * IFS=" "
22 * for i in $(echo "$z")
23 * do
24 * echo "--------------------------> $i" | tee -a "$logs"
25 * ii=$(echo "$i" | cut -d "/" -f1)
26 * ok=$(ls /etc/apt/sources.list.d/*$ii* 2>/dev/null)
27 * if [ "$ok" == "" ]; then
28 * echo "On installe $i dans les sources" | tee -a "$logs"
29 * add-apt-repository ppa:$i -y | tee -a "$logs"
30 * else
31 * echo "$result déjà dans les sources" | tee -a "$logs"
32 * fi
33 * done
34 * if [ "$(which aptitude)" == "" ]; then
35 * apt-get install aptitude -y | tee -a "$logs"
36 * fi
37 * if [ "$(which snapd)" == "" ]; then
38 * aptitude install snapd -y | tee -a "$logs"
39 * fi
40 * if [ "$(which snapd-xdg-open)" == "" ]; then
41 * aptitude install snapd -y | tee -a "$logs"
42 * fi
43 * sudo apt update | tee -a "$logs"
44 * z="unetbootin libcanberra-gtk-module libcanberra-gtk3-module synaptic cairo-dock gparted apturl fonts-symbola boot-repair chrome-gnome-shell brasero gpaint lmms vim veracrypt zram-config whois filezilla fslint openssh-client openssh-server multisystem testdisk rawtherapee darktable nmon iftop iptraf-ng glances fdupes rmlint gimp net-tools preload prelink localepurge xdotool phototonic nemo nemo-fileroller clamav imagemagick gnome-pie graphviz ffdiaporama findimagedupes wine chrome-gnome-shell rox-filer mount.cifs xclip lynx adobe-flashplugin ubuntu-restricted-extras adobe-flash-properties-gtk dos2unix googler python-flask numlockx xbindkeys xvkbd"
45 * IFS=" "
46 * for i in $(echo "$z")
47 * do
48 * echo "--------------------------> $i" | tee -a "$logs"
49 * if [ "$(which ${i})" == "" ]; then
50 * echo "On installe $i" | tee -a "$logs"
51 * aptitude install "$i" -y | tee -a "$logs"
52 * else
53 * echo "$result déjà installé" | tee -a "$logs"
54 * fi
55 * done
56 * sudo apt -f install -y
57 * sudo apt-get update -y
58 * sudo service zram-config start
59 * # APTURL
60 * logs="/root/Logs_Install.txt"
61 * z="nautilus-emblems flashplugin-installer xmacro pcmanfm dconf-editor bleachbit gwenview pcmanfm synfig synfigstudio"
62 * IFS=" "
63 * for i in $(echo "$z")
64 * do
65 * echo "--------------------------> $i" | tee -a "$logs"
66 * if [ -z $(which $i) ];then
67 * retour=$(dpkg -l | grep "$i" )
68 * if [ "$retour" == '' ]; then
69 * echo 'KO, On installe' | tee -a "$logs"
70 * i='apt://'$i
71 * apturl "$i" &
72 * sleep 2
73 * xdotool keydown key Tab
74 * sleep 2
75 * xdotool key Return
76 * sleep 7
77 * else
78 * echo 'OK, Installe' | tee -a "$logs"
79 * fi
80 * else
81 * echo 'OK, Installe' | tee -a "$logs"
82 * fi
83 * done
84 *
85 * # SNAP
86 * echo "********" | tee -a "$logs"
87 * echo "* SNAP *" | tee -a "$logs"
88 * echo "********" | tee -a "$logs"
89 * sudo snap install notepad-plus-plus | tee -a "$logs"
90 * sudo snap connect notepad-plus-plus:process-control | tee -a "$logs"
91 * sudo snap connect notepad-plus-plus:removable-media | tee -a "$logs"
92 * sudo snap connect notepad-plus-plus:hardware-observe | tee -a "$logs"
93 * sudo snap connect notepad-plus-plus:cups-control | tee -a "$logs"
94 * echo "--" | tee -a "$logs"
95 *
96 * # WGET
97 * echo "********" | tee -a "$logs"
98 * echo "* WGET *" | tee -a "$logs"
99 * echo "********" | tee -a "$logs"
100 * wget -P /tmp -q http://liveusb.info/multisystem/depot/multisystem.asc -O- | sudo apt-key add -
101 * cd /tmp; apt-get --assume-yes install multisystem -y; cd -
102 * z="https://download.teamviewer.com/download/linux/teamviewer_amd64.deb http://launchpadlibrarian.net/109052632/python-support_1.0.15_all.deb http://launchpadlibrarian.net/206807840/python-glade2_2.24.0-4ubuntu1_amd64.deb https://launchpad.net/disk-manager/1.1/1.1.1/+download/disk-manager_1.1.1-1_all.deb"
103 * reps="/root"
104 * IFS=" "
105 * for i in $(echo "$z")
106 * do
107 * echo "--------------------------> $i" | tee -a "$logs"
108 * occ=$(occurences "$i" "/" d | cut -d" " -f2-)
109 * occ=$(echo $occ | cut -d" " -f2-)
110 * occ2=$occ
111 * occ=$(echo "$(echo "$occ" | cut -d" " -f3)" | sed 's/....$//' | cut -d"_" -f1)
112 * echo "--------------- ($occ2)" | tee -a "$logs"
113 * if [ -z $(which "$occ") ];then
114 * retour=$(dpkg -l | grep "$occ")
115 * if [ "$retour" == '' ]; then
116 * echo 'KO, On installe' | tee -a "$logs"
117 * #wget -P /tmp "$i" | tee -a "$logs"
118 * wget -P "$reps" "$i" | tee -a "$logs"
119 * encoursdpkg=$(ps -edf | grep dpkg | grep -v grep)
120 * while [[ $(ps -edf | grep dpkg | grep -v grep) != "" ]]
121 * do
122 * echo "dpkg en cours...."
123 * done
124 * dpkg -i "$reps/${occ2}" | tee -a "$logs"
125 * ls -l "$reps/${occ2}"
126 * else
127 * echo 'OK, Installe' | tee -a "$logs"
128 * fi
129 * else
130 * echo 'OK, Installe' | tee -a "$logs"
131 * fi
132 * done
133 * rm -f "$reps/${occ2}"
134 * rm -f "$reps/${occ2}.?"
135 * apt -f install
136 * apt-get update
137 *
138 * # Divers
139 * echo "**********" | tee -a "$logs"
140 * echo "* Divers *" | tee -a "$logs"
141 * echo "**********" | tee -a "$logs"
142 * cp -v /usr/share/applications/cairo-dock.desktop /home/a/.config/autostart/cairo-dock.desktop | tee -a "$logs"
143 * sed -i 's/PRELINKING=unknown/PRELINKING=yes/' /etc/default/prelink
144 * echo 'DPkg::Post-Invoke {"echo Pré-raccordement des bibliothèques en cours, veuillez patienter...;/etc/cron.daily/prelink";}'|tee -a /etc/apt/apt.conf.d/98prelink
145 * xdg-mime default nemo.desktop inode/directory application/x-gnome-saved-search
146 * sed -i "/^# deb .*partner/ s/^# //" /etc/apt/sources.list
147 * cp /etc/ssh/sshd_config /etc/ssh/sshd_config.original
148 * chmod a-w /etc/ssh/sshd_config.original
149 * echo >> /home/$user/.bashrc
150 * echo export LS_OPTIONS='--color=auto' >> /home/$user/.bashrc
151 * #echo eval "`dircolors`" >> /home/$user/.bashrc
152 * echo alias ls='ls $LS_OPTIONs' >> /home/$user/.bashrc
153 *
154 * # EXTENSIONS FIREFOX
155 * firefox "https://addons.mozilla.org/fr/firefox/addon/video-downloadhelper/" &
156 * firefox "http://get.adobe.com/fr/flashplayer/about/" &
157 * firefox "https://www.mozilla.org/fr/firefox/new/?scene=2" &
158 * firefox "https://nautilus-image-converter.fr.uptodown.com/ubuntu/telecharger" &
159 * firefox "http://blog.roozeec.fr/2007/09/05/tagphoto-script-nautilus-pour-mettre-date-et-heure-sur-vos-photos/" &
160 * firefox "https://addons.mozilla.org/fr/firefox/addon/bookmark-dupes/" &
161 * echo "**********************" | tee -a "$logs"
162 * echo "* EXTENSIONS FIREFOX *" | tee -a "$logs"
163 * echo "**********************" | tee -a "$logs"
164 * z="https://addons.mozilla.org/firefox/downloads/file/744266/video_downloadhelper-6.3.3-fx.xpi https://addons.mozilla.org/fr/firefox/addon/adblock-plus"
165 * reps="/root"
166 * cd $reps
167 * IFS=" "
168 * for i in $(echo "$z")
169 * do
170 * wget "$i"
171 * /usr/bin/firefox -install-global-extension "$i"
172 * done
173 * cd -
174 * exit 0
175 * #
176 * #FLASH
177 * # URLs
178 * #
179 * # SAUVEGARDES
180 * #
181 * #
182 * #
183 * # UTILISATEUR
184 * #
185 * #
186 * #
187 * # DESINSTALLATIONS
188 * #
189 * # Dans le cas où le Pc n est pas un portable, désactivation de la gestion des touches bleus.
190 * #
191 * #sudo update-rc.d -f hotkey-setup remove
192 * #
193 * #Batterie
194 * #
195 * #sudo update-rc.d -f laptop-mode remove
196 * #
197 * #Gestion du Raid
198 * #
199 * #sudo update-rc.d -f mdadm remove
200 * #sudo update-rc.d -f mdadm-raid remove
201 * #
202 * #Modem
203 * #
204 * #sudo update-rc.d -f dns-clean remove
205 * #
206 * # Redémarrage des services
207 * #
208 * #sudo systemctl restart sshd.service
209 * #
210 * # COMPLEMENTS
211 * #
212 * #Avec une clé SSH, effectuer en plus...
213 * #
214 * #Générer une clé
215 * # ssh-keygen -t rsa
216 * #Copier le fichier id_rsa.pub sur l'hôte distant et l'ajouter à ~/.ssh/authorized_keys
217 * # ssh-copy-id identifiant@hôte
218 * #
219 * #sed -i 's/geteuid/getppid/' /usr/bin/vlc
220 * #
221 * #sudo apt-get update
222 * #sudo apt-get upgrade
223 * #sudo apt-get install libimobiledevice-utils
224 * #idevicepair unpair
225 * #idevicepair pair
226 * #idevicepair validate
227 * #
228 * # Fond d'ecran en terminal:
229 * #http://www.billyboylindien.com/ubuntu/ubuntu-devilspie.html
230 * #https://www.torproject.org/fr/download/
231 * #
232 * # APT
233 * #