airikr revised this gist . Go to revision
1 file changed, 212 insertions, 67 deletions
installation.sh
@@ -1,30 +1,40 @@ | |||
1 | 1 | #!/bin/bash | |
2 | 2 | ||
3 | - | # Kolla om till exempel qimgv är installerat eller inte | |
4 | - | ||
5 | 3 | # VARIABLES | |
6 | - | dir_home='/home/airikr' | |
7 | - | dir_backup='backup-ssd-dir' | |
4 | + | dir_home='/home/{username}' | |
5 | + | dir_backup='/to/dir' | |
6 | + | GREEN='\033[0;32m' | |
8 | 7 | YELLOW='\033[1;33m' | |
9 | 8 | BLUE='\033[0;34m' | |
10 | 9 | NC='\033[0m' | |
11 | 10 | SLEEP='.5' | |
12 | 11 | ||
13 | - | # COPY > PASTE | |
12 | + | # RESTORE FILES | |
14 | 13 | echo && printf "${YELLOW}Restoring bash files" && printf "${NC}" && echo && echo && sleep .5 | |
15 | 14 | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.bashrc "${dir_home}"/ | |
16 | 15 | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.bash_aliases "${dir_home}"/ | |
17 | - | sudo rsync -aP "${dir_backup}"/"$dir_home"/systembackup.sh "$dir_home"/ | |
18 | - | sudo rsync -aP "${dir_backup}"/"$dir_home"/transferphotos-card.sh "${dir_home}"/ | |
19 | - | sudo rsync -aP "${dir_backup}"/"${dir_home}"/transferphotos-ext.sh "${dir_home}"/ | |
20 | - | sudo rsync -aP "${dir_backup}"/"${dir_home}"/transferphotos-ext.sh "${dir_home}"/ | |
16 | + | sudo rsync -aP "${dir_backup}"/"${dir_home}"/systembackup.sh "$dir_home"/ | |
17 | + | sudo rsync -aP "${dir_backup}"/"${dir_home}"/transferphotos-card.sh "${dir_home}"/ | |
18 | + | echo && printf "${GREEN}Done restoring the bash files" && printf "${NC}" && echo && echo && sleep .5 | |
19 | + | ||
20 | + | ||
21 | 21 | ||
22 | 22 | echo && printf "${YELLOW}Restoring the fstab file" && printf "${NC}" && echo && echo && sleep .5 | |
23 | - | sudo cp /etc/fstab /etc/fstab.bak | |
23 | + | if [ ! -f /etc/fstab.bak ]; then | |
24 | + | echo && printf "${YELLOW}Backing up the file" && printf "${NC}" && echo && echo && sleep .5 | |
25 | + | sudo cp /etc/fstab /etc/fstab.bak | |
26 | + | fi | |
27 | + | ||
24 | 28 | sudo rsync -aP "${dir_backup}"/etc/fstab /etc/ | |
29 | + | echo && printf "${GREEN}Done restoring the fstab file" && printf "${NC}" && echo && echo && sleep .5 | |
30 | + | ||
31 | + | ||
25 | 32 | ||
26 | 33 | echo && printf "${YELLOW}Sourcing the bash_aliases file" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
27 | 34 | source "${dir_home}"/.bash_aliases | |
35 | + | echo && printf "${GREEN}Done" && printf "${NC}" && echo && echo && sleep .5 | |
36 | + | ||
37 | + | ||
28 | 38 | ||
29 | 39 | # UNINSTALL | |
30 | 40 | echo && printf "${YELLOW}Uninstalling bloatware" && printf "${NC}" && echo && echo && sleep .5 | |
@@ -35,36 +45,128 @@ which ristretto | grep -o ristretto > /dev/null && sudo pacman -Rcns ristretto | |||
35 | 45 | which cmake | grep -o cmake > /dev/null && sudo pacman -Rcns cmake || echo '${BLUE}cmake is not installed${NC}' | |
36 | 46 | which eos-quickstart | grep -o eos-quickstart > /dev/null && sudo pacman -Rcns eos-quickstart || echo '${BLUE}eos-quickstart is not installed${NC}' | |
37 | 47 | which eos-apps-info | grep -o eos-apps-info > /dev/null && sudo pacman -Rcns eos-apps-info || echo '${BLUE}eos-apps-info is not installed${NC}' | |
38 | - | which welcome | grep -o welcome > /dev/null && sudo pacman -Rcns welcome || echo '${BLUE}welcome is not installed${NC}' | |
48 | + | which eos-welcome | grep -o eos-welcome > /dev/null && sudo pacman -Rcns eos-welcome || echo '${BLUE}eos-welcome is not installed${NC}' | |
49 | + | which file-roller | grep -o file-roller > /dev/null && sudo pacman -Rcns file-roller || echo '${BLUE}file-roller is not installed${NC}' | |
50 | + | echo && printf "${GREEN}Bloatware uninstalled" && printf "${NC}" && echo && echo && sleep .5 | |
51 | + | ||
52 | + | ||
39 | 53 | ||
40 | 54 | # UPDATE | |
41 | 55 | echo && printf "${YELLOW}Updating" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
42 | 56 | yay -Syu --noconfirm | |
57 | + | echo && printf "${GREEN}System is now up-to-date" && printf "${NC}" && echo && echo && sleep .5 | |
58 | + | ||
59 | + | ||
43 | 60 | ||
44 | 61 | # INSTALL | |
45 | 62 | echo && printf "${YELLOW}Installing softwares" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
46 | - | yay -S --noconfirm mullvad-vpn-bin vscodium-bin qimgv-git ttf-victor-mono smartgit blue-recorder-git josm-stable xfce4-panel-profiles xfce4-docklike-plugin | |
47 | - | sudo pacman -S thunderbird darktable gramps steam inter-font mpv obs-studio filezilla element-desktop mumble speedcrunch virtualbox ufw sshfs python-pip gtk2 ttc-iosevka kcolorchooser skanlite yt-dlp openssh wine qmmp gimp shotcut qbittorrent inkscape gamemode lib32-gamemode krita cifs-utils gajim jellyfin-server jellyfin-web syncthing telegram-desktop perl-image-exiftool npm lite-xl | |
63 | + | echo && printf "${YELLOW}Starting with installing softwares with yay" && printf "${NC}" && echo && echo && sleep .5 | |
64 | + | yay -S --noconfirm mullvad-vpn-bin \ | |
65 | + | vscodium-bin \ | |
66 | + | qimgv-git \ | |
67 | + | ttf-victor-mono \ | |
68 | + | smartgit \ | |
69 | + | blue-recorder-git \ | |
70 | + | xfce4-panel-profiles \ | |
71 | + | hoptodesk \ | |
72 | + | jotta-cli | |
73 | + | ||
74 | + | echo && printf "${YELLOW}And now installing softwares with pacman" && printf "${NC}" && echo && echo && sleep .5 | |
75 | + | sudo pacman -S thunderbird \ | |
76 | + | darktable \ | |
77 | + | gramps \ | |
78 | + | steam \ | |
79 | + | inter-font \ | |
80 | + | mpv \ | |
81 | + | obs-studio \ | |
82 | + | filezilla \ | |
83 | + | mumble \ | |
84 | + | speedcrunch \ | |
85 | + | virtualbox \ | |
86 | + | ufw \ | |
87 | + | sshfs \ | |
88 | + | python-pip \ | |
89 | + | gtk2 \ | |
90 | + | ttc-iosevka \ | |
91 | + | kcolorchooser \ | |
92 | + | skanlite \ | |
93 | + | yt-dlp \ | |
94 | + | papirus-icon-theme \ | |
95 | + | openssh \ | |
96 | + | wine \ | |
97 | + | qmmp \ | |
98 | + | gimp \ | |
99 | + | shotcut \ | |
100 | + | qbittorrent \ | |
101 | + | inkscape \ | |
102 | + | lutris \ | |
103 | + | krita \ | |
104 | + | cifs-utils \ | |
105 | + | gajim \ | |
106 | + | jellyfin-server \ | |
107 | + | jellyfin-web \ | |
108 | + | vivaldi \ | |
109 | + | syncthing \ | |
110 | + | telegram-desktop \ | |
111 | + | gparted \ | |
112 | + | perl-image-exiftool \ | |
113 | + | npm \ | |
114 | + | lite-xl \ | |
115 | + | archlinux-keyring \ | |
116 | + | xarchiver | |
117 | + | ||
118 | + | echo && printf "${GREEN}Softwares installed" && printf "${NC}" && echo && echo && sleep .5 | |
119 | + | ||
120 | + | echo && printf "${YELLOW}Installing Joplin" && printf "${NC}" && echo && echo && sleep .5 | |
48 | 121 | wget -O - https://raw.githubusercontent.com/laurent22/joplin/dev/Joplin_install_and_update.sh | bash | |
122 | + | echo && printf "${GREEN}Joplin installed" && printf "${NC}" && echo && echo && sleep .5 | |
123 | + | ||
124 | + | ||
49 | 125 | ||
50 | 126 | # CREATE FOLDER | |
51 | - | echo && printf "${YELLOW}Creating missing folders" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
52 | - | sudo mkdir /mnt/Backup | |
53 | - | sudo mkdir /mnt/NAS | |
54 | - | sudo mkdir /mnt/Synology | |
127 | + | echo && printf "${YELLOW}Creating missing folders" && printf "${NC}" && sleep ${SLEEP} | |
128 | + | ||
129 | + | if [ ! -d "/mnt/Backup" ]; then | |
130 | + | echo && printf "${GREEN}Created /mnt/Backup" && printf "${NC}" && sleep .5 | |
131 | + | sudo mkdir /mnt/Backup | |
132 | + | else | |
133 | + | echo && printf "${BLUE}/mnt/Backup already exists" && printf "${NC}" && sleep .5 | |
134 | + | fi | |
135 | + | ||
136 | + | if [ ! -d "/mnt/NAS" ]; then | |
137 | + | echo && printf "${GREEN}Created /mnt/NAS" && printf "${NC}" && sleep .5 | |
138 | + | sudo mkdir /mnt/NAS | |
139 | + | else | |
140 | + | echo && printf "${BLUE}/mnt/NAS already exists" && printf "${NC}" && sleep .5 | |
141 | + | fi | |
142 | + | ||
143 | + | if [ ! -d "/mnt/Synology" ]; then | |
144 | + | echo && printf "${GREEN}Created /mnt/Synology" && printf "${NC}" && sleep .5 | |
145 | + | sudo mkdir /mnt/Synology | |
146 | + | else | |
147 | + | echo && printf "${BLUE}/mnt/Synology already exists" && printf "${NC}" && sleep .5 | |
148 | + | fi | |
149 | + | ||
150 | + | echo && printf "${GREEN}Done" && printf "${NC}" && echo && echo && sleep .5 | |
151 | + | ||
152 | + | ||
55 | 153 | ||
56 | 154 | # INSTALL GRAPHIC DRIVERS | |
57 | - | echo && printf "${YELLOW}Installing graphic cards stuff" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
155 | + | echo && printf "${YELLOW}Installing graphic card stuff" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
58 | 156 | install_no nvidia nvidia-settings nvidia-utils lib32-nvidia-utils lib32-opencl-nvidia opencl-nvidia libvdpau libxnvctrl vulkan-icd-loader lib32-vulkan-icd-loader | |
157 | + | echo && printf "${GREEN}Done installing graphic card stuff" && printf "${NC}" && echo && echo && sleep .5 | |
158 | + | ||
159 | + | ||
59 | 160 | ||
60 | 161 | # CONFIG | |
61 | 162 | echo && printf "${YELLOW}Configuring the graphic card" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
62 | 163 | sudo nvidia-xconfig | |
63 | 164 | sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.d/20-nvidia.conf | |
165 | + | echo && printf "${GREEN}Done configurating the graphic card" && printf "${NC}" && echo && echo && sleep .5 | |
64 | 166 | ||
65 | 167 | ||
66 | 168 | ||
67 | - | # COPY > PASTE | |
169 | + | # STORE DATA | |
68 | 170 | echo && printf "${YELLOW}Restoring backed up files" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
69 | 171 | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.config/darktable/ "${dir_home}"/.config/darktable/ | |
70 | 172 | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.config/mpv/ "${dir_home}"/.config/mpv/ | |
@@ -85,14 +187,23 @@ sudo rsync -aP "${dir_backup}"/"${dir_home}"/.config/qBittorrent/ "${dir_home}"/ | |||
85 | 187 | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.config/lite-xl/ "${dir_home}"/.config/lite-xl/ | |
86 | 188 | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.config/qmmp/ "${dir_home}"/.config/qmmp/ | |
87 | 189 | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.config/Mumble/ "${dir_home}"/.config/Mumble/ | |
88 | - | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.mozilla/firefox/ "${dir_home}"/.mozilla/firefox/ | |
190 | + | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.config/vivaldi/ "${dir_home}"/.config/vivaldi/ | |
191 | + | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.config/hoptodesk/ "${dir_home}"/.config/hoptodesk/ | |
192 | + | ||
193 | + | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.local/share/gramps/ "${dir_home}"/.local/share/gramps/ | |
194 | + | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.local/share/TelegramDesktop/ "${dir_home}"/.local/share/TelegramDesktop/ | |
195 | + | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.local/share/Steam/ "${dir_home}"/.local/share/Steam/ | |
196 | + | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.local/share/lutris/ "${dir_home}"/.local/share/lutris/ | |
197 | + | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.local/state/syncthing/ "${dir_home}"/.local/state/syncthing/ | |
89 | 198 | ||
90 | - | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.thunderbird/ "${dir_home}"/.thunderbird/ | |
199 | + | sudo rsync -aP --delete "${dir_backup}"/"${dir_home}"/.mozilla/firefox/ "${dir_home}"/.mozilla/firefox/ | |
200 | + | sudo rsync -aP --delete "${dir_backup}"/"${dir_home}"/.thunderbird/ "${dir_home}"/.thunderbird/ | |
91 | 201 | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.joplin/ "${dir_home}"/.joplin/ | |
92 | 202 | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.vscode-oss/ "${dir_home}"/.vscode-oss/ | |
93 | 203 | ||
94 | 204 | sudo rsync -aP "${dir_backup}"/"${dir_home}"/Pictures/Wallpapers/ "${dir_home}"/Pictures/Wallpapers/ | |
95 | 205 | sudo rsync -aP "${dir_backup}"/"${dir_home}"/Documents/ "${dir_home}"/Documents/ | |
206 | + | echo && printf "${GREEN}Done restoring files" && printf "${NC}" && echo && echo && sleep .5 | |
96 | 207 | ||
97 | 208 | ||
98 | 209 | ||
@@ -102,12 +213,16 @@ sudo rsync -aP "${dir_backup}"/var/lib/jellyfin/ /var/lib/jellyfin/ | |||
102 | 213 | sudo chown -R jellyfin:jellyfin /var/lib/jellyfin/ | |
103 | 214 | sudo chmod -R 777 /var/lib/jellyfin/ | |
104 | 215 | sudo systemctl restart jellyfin.service | |
216 | + | echo && printf "${GREEN}Done configuring Jellyfin" && printf "${NC}" && echo && echo && sleep .5 | |
105 | 217 | ||
106 | 218 | ||
107 | 219 | ||
108 | 220 | # APACHE | |
109 | 221 | echo && printf "${YELLOW}Installing Apache" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
110 | 222 | sudo pacman -Sy apache | |
223 | + | echo && printf "${GREEN}Done installing Apache" && printf "${NC}" && echo && echo && sleep .5 | |
224 | + | ||
225 | + | ||
111 | 226 | ||
112 | 227 | # MYSQL | |
113 | 228 | echo && printf "${YELLOW}Installing MariaDB" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
@@ -115,18 +230,30 @@ sudo pacman -Sy mariadb | |||
115 | 230 | sudo mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql | |
116 | 231 | sudo systemctl start mariadb.service | |
117 | 232 | sudo mysql_secure_installation | |
233 | + | echo && printf "${GREEN}Done installing MariaDB" && printf "${NC}" && echo && echo && sleep .5 | |
234 | + | ||
235 | + | ||
118 | 236 | ||
119 | 237 | # PHP | |
120 | 238 | echo && printf "${YELLOW}Installing PHP" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
121 | - | sudo pacman -Sy php php-apache php-gd php-fpm php-sqlite php-pgsql | |
239 | + | sudo pacman -Sy php php-apache php-gd php-fpm php-sqlite | |
240 | + | echo && printf "${GREEN}Done installing PHP" && printf "${NC}" && echo && echo && sleep .5 | |
241 | + | ||
242 | + | ||
122 | 243 | ||
123 | 244 | # ENABLE BOOT | |
124 | 245 | echo && printf "${YELLOW}Enabling services for boot" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
125 | 246 | sudo systemctl enable mysqld httpd sshd jellyfin syncthing@airikr.service | |
247 | + | echo && printf "${GREEN}Done" && printf "${NC}" && echo && echo && sleep .5 | |
248 | + | ||
249 | + | ||
126 | 250 | ||
127 | 251 | # START | |
128 | 252 | echo && printf "${YELLOW}Starting SSH & Syncthing" && printf "${NC}" && echo && echo | |
129 | 253 | sudo systemctl start sshd syncthing@airikr.service | |
254 | + | echo && printf "${GREEN}Done" && printf "${NC}" && echo && echo && sleep .5 | |
255 | + | ||
256 | + | ||
130 | 257 | ||
131 | 258 | # COMPOSER | |
132 | 259 | echo && printf "${YELLOW}Installing Composer" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
@@ -135,65 +262,83 @@ php -r "if (hash_file('sha384', 'composer-setup.php') === 'dac665fdc30fdd8ec78b3 | |||
135 | 262 | php composer-setup.php | |
136 | 263 | php -r "unlink('composer-setup.php');" | |
137 | 264 | sudo mv composer.phar /usr/local/bin/composer | |
265 | + | echo && printf "${GREEN}Done installing Composer" && printf "${NC}" && echo && echo && sleep .5 | |
266 | + | ||
267 | + | ||
138 | 268 | ||
139 | 269 | # GEOSPATIAL | |
140 | - | git clone https://github.com/php-geospatial/geospatial.git | |
141 | - | cd geospatial | |
142 | - | phpize | |
143 | - | ./configure --enable-geospatial | |
144 | - | make | |
145 | - | sudo make install | |
146 | - | ||
147 | - | # COPY > PASTE | |
148 | - | echo && printf "${YELLOW}Restoring configuration files for web server" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
270 | + | #git clone https://github.com/php-geospatial/geospatial.git | |
271 | + | #cd geospatial | |
272 | + | #phpize | |
273 | + | #./configure --enable-geospatial | |
274 | + | #make | |
275 | + | #sudo make install | |
276 | + | ||
277 | + | ||
278 | + | ||
279 | + | # RESTORE WEB SERVER FILES | |
280 | + | echo && printf "${YELLOW}Restoring configuration files for the web server" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
149 | 281 | sudo rsync -aP "${dir_backup}"/etc/httpd/conf/httpd.conf /etc/httpd/conf/ | |
150 | 282 | sudo rsync -aP "${dir_backup}"/etc/httpd/conf/extra/phpmyadmin.conf /etc/httpd/conf/extra/ | |
151 | 283 | sudo rsync -aP "${dir_backup}"/etc/php/php.ini /etc/php/ | |
284 | + | echo && printf "${GREEN}Done restoring configuration files for the web server" && printf "${NC}" && echo && echo && sleep .5 | |
152 | 285 | ||
153 | 286 | echo && printf "${YELLOW}Restoring website projects" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
154 | 287 | sudo rsync -aP "${dir_backup}"/srv/http/ /srv/http/ | |
288 | + | echo && printf "${GREEN}Done restoring website projects" && printf "${NC}" && echo && echo && sleep .5 | |
289 | + | ||
290 | + | ||
155 | 291 | ||
156 | 292 | # RESTART | |
157 | 293 | echo && printf "${YELLOW}Restarting Apache" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
158 | 294 | sudo systemctl restart httpd.service | |
295 | + | echo && printf "${GREEN}Done" && printf "${NC}" && echo && echo && sleep .5 | |
296 | + | ||
297 | + | ||
159 | 298 | ||
160 | 299 | # ADDING USER | |
161 | 300 | echo && printf "${YELLOW}Adding vboxusers to the user group" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
162 | 301 | sudo usermod -a -G vboxusers $USER | |
302 | + | echo && printf "${GREEN}Done. Log out and log back in to enable vboxusers" && printf "${NC}" && echo && echo && sleep .5 | |
303 | + | ||
304 | + | ||
305 | + | ||
306 | + | # CONFIGURE JOTTA-CLI | |
307 | + | echo && printf "${YELLOW}Configuring jotta-cli" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
308 | + | run_jottad | |
309 | + | jotta-cli login | |
310 | + | jotta-cli sync setup --root /mnt/ExtSSD/JottaSync/ | |
311 | + | jotta-cli sync start | |
312 | + | jotta-cli sync status | |
313 | + | jotta-cli add '/home/{username}/' | |
314 | + | echo && printf "${YELLOW}Run jotta-cli scan to start the scanning" && printf "${NC}" && echo && echo && sleep .5 | |
315 | + | ||
316 | + | echo && printf "${GREEN}All done!" && printf "${NC}" | |
317 | + | ||
318 | + | ||
319 | + | ||
320 | + | # Log out and log back in again to enable vboxusers | |
321 | + | # Download FreeFileSync at https://freefilesync.org/ | |
322 | + | ||
323 | + | # Use the following if root's password is wrong | |
324 | + | # sudo mysql | |
325 | + | # ALTER USER 'root'@'localhost' IDENTIFIED VIA mysql_native_password USING PASSWORD('password'); | |
326 | + | # quit | |
327 | + | ||
328 | + | # Connect to MySQL with the root user | |
329 | + | # /usr/bin/mariadb -u root -p | |
330 | + | ||
331 | + | # To create a new user and grant all privileges | |
332 | + | # CREATE USER 'user'@'localhost' IDENTIFIED BY 'password'; | |
333 | + | # GRANT ALL PRIVILEGES ON *.* TO 'user'@'localhost'; | |
334 | + | ||
335 | + | # To change the username | |
336 | + | # RENAME USER 'user'@'localhost' to 'new-user'@'localhost'; | |
337 | + | ||
338 | + | # To change the password | |
339 | + | # ALTER USER 'user'@'localhost' IDENTIFIED BY 'new-password'; | |
340 | + | # quit | |
163 | 341 | ||
164 | - | # INSTRUCTIONS | |
165 | - | printf "${BLUE}" | |
166 | - | echo 'Log out and log back in again to enable vboxusers' | |
167 | - | echo | |
168 | - | echo '--------' | |
169 | - | echo | |
170 | - | echo 'Use the following if root's password is wrong' | |
171 | - | echo 'sudo mysql' | |
172 | - | echo 'ALTER USER 'root'@'localhost' IDENTIFIED VIA mysql_native_password USING PASSWORD('password');' | |
173 | - | echo 'quit' | |
174 | - | echo | |
175 | - | echo '--------' | |
176 | - | echo | |
177 | - | echo 'Connect to MySQL with the root user' | |
178 | - | echo '/usr/bin/mariadb -u root -p' | |
179 | - | echo | |
180 | - | echo 'To create a new user and grant all privileges' | |
181 | - | echo 'CREATE USER 'user'@'localhost' IDENTIFIED BY 'password';' | |
182 | - | echo 'GRANT ALL PRIVILEGES ON *.* TO 'user'@'localhost';' | |
183 | - | echo | |
184 | - | echo 'To change the username' | |
185 | - | echo 'RENAME USER 'user'@'localhost' to 'new-user'@'localhost';' | |
186 | - | echo | |
187 | - | echo 'To change the password' | |
188 | - | echo 'ALTER USER 'user'@'localhost' IDENTIFIED BY 'new-password';' | |
189 | - | echo | |
190 | - | echo 'quit' | |
191 | - | echo | |
192 | - | echo '--------' | |
193 | - | echo | |
194 | - | echo 'sudo nano /etc/X11/xorg.conf.d/20-nvidia.conf' | |
195 | - | echo 'Follow the instructions below NVIDIA Improvements at https://steamcommunity.com/sharedfiles/filedetails/?id=1787799592' | |
196 | - | echo | |
197 | - | echo 'Download FreeFileSync at https://freefilesync.org/' | |
198 | - | echo | |
199 | - | printf "${NC}" | |
342 | + | # sudo nano /etc/X11/xorg.conf.d/20-nvidia.conf | |
343 | + | # If anything, install gamemode and lib32-gamemode | |
344 | + | # Follow the instructions below NVIDIA Improvements at https://steamcommunity.com/sharedfiles/filedetails/?id=1787799592 |
airikr revised this gist . Go to revision
1 file changed, 2 insertions, 1 deletion
installation.sh
@@ -158,10 +158,12 @@ echo && printf "${YELLOW}Restarting Apache" && printf "${NC}" && echo && echo && | |||
158 | 158 | sudo systemctl restart httpd.service | |
159 | 159 | ||
160 | 160 | # ADDING USER | |
161 | + | echo && printf "${YELLOW}Adding vboxusers to the user group" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
161 | 162 | sudo usermod -a -G vboxusers $USER | |
162 | 163 | ||
163 | 164 | # INSTRUCTIONS | |
164 | 165 | printf "${BLUE}" | |
166 | + | echo 'Log out and log back in again to enable vboxusers' | |
165 | 167 | echo | |
166 | 168 | echo '--------' | |
167 | 169 | echo | |
@@ -194,5 +196,4 @@ echo 'Follow the instructions below NVIDIA Improvements at https://steamcommunit | |||
194 | 196 | echo | |
195 | 197 | echo 'Download FreeFileSync at https://freefilesync.org/' | |
196 | 198 | echo | |
197 | - | echo 'Log out and log back in again to enable vboxusers' | |
198 | 199 | printf "${NC}" |
airikr revised this gist . Go to revision
1 file changed, 1 insertion, 1 deletion
installation.sh
@@ -194,5 +194,5 @@ echo 'Follow the instructions below NVIDIA Improvements at https://steamcommunit | |||
194 | 194 | echo | |
195 | 195 | echo 'Download FreeFileSync at https://freefilesync.org/' | |
196 | 196 | echo | |
197 | - | echo 'Logout and back in again to enable vboxusers' | |
197 | + | echo 'Log out and log back in again to enable vboxusers' | |
198 | 198 | printf "${NC}" |
airikr revised this gist . Go to revision
1 file changed, 17 insertions, 3 deletions
installation.sh
@@ -165,12 +165,26 @@ printf "${BLUE}" | |||
165 | 165 | echo | |
166 | 166 | echo '--------' | |
167 | 167 | echo | |
168 | + | echo 'Use the following if root's password is wrong' | |
168 | 169 | echo 'sudo mysql' | |
169 | - | echo 'ALTER USER 'root'@'localhost' IDENTIFIED VIA mysql_native_password USING PASSWORD('password');' # Only if root's password is wrong. | |
170 | + | echo 'ALTER USER 'root'@'localhost' IDENTIFIED VIA mysql_native_password USING PASSWORD('password');' | |
170 | 171 | echo 'quit' | |
171 | - | echo 'mysql -u root -p' | |
172 | + | echo | |
173 | + | echo '--------' | |
174 | + | echo | |
175 | + | echo 'Connect to MySQL with the root user' | |
176 | + | echo '/usr/bin/mariadb -u root -p' | |
177 | + | echo | |
178 | + | echo 'To create a new user and grant all privileges' | |
172 | 179 | echo 'CREATE USER 'user'@'localhost' IDENTIFIED BY 'password';' | |
173 | 180 | echo 'GRANT ALL PRIVILEGES ON *.* TO 'user'@'localhost';' | |
181 | + | echo | |
182 | + | echo 'To change the username' | |
183 | + | echo 'RENAME USER 'user'@'localhost' to 'new-user'@'localhost';' | |
184 | + | echo | |
185 | + | echo 'To change the password' | |
186 | + | echo 'ALTER USER 'user'@'localhost' IDENTIFIED BY 'new-password';' | |
187 | + | echo | |
174 | 188 | echo 'quit' | |
175 | 189 | echo | |
176 | 190 | echo '--------' | |
@@ -180,5 +194,5 @@ echo 'Follow the instructions below NVIDIA Improvements at https://steamcommunit | |||
180 | 194 | echo | |
181 | 195 | echo 'Download FreeFileSync at https://freefilesync.org/' | |
182 | 196 | echo | |
183 | - | echo 'Log out and then log back in again to enable vboxusers' | |
197 | + | echo 'Logout and back in again to enable vboxusers' | |
184 | 198 | printf "${NC}" |
airikr revised this gist . Go to revision
1 file changed, 2 insertions, 1 deletion
installation.sh
@@ -43,7 +43,7 @@ yay -Syu --noconfirm | |||
43 | 43 | ||
44 | 44 | # INSTALL | |
45 | 45 | echo && printf "${YELLOW}Installing softwares" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
46 | - | yay -S --noconfirm mullvad-vpn-bin vscodium-bin qimgv-git ttf-victor-mono smartgit blue-recorder-git josm-stable xfce4-panel-profiles | |
46 | + | yay -S --noconfirm mullvad-vpn-bin vscodium-bin qimgv-git ttf-victor-mono smartgit blue-recorder-git josm-stable xfce4-panel-profiles xfce4-docklike-plugin | |
47 | 47 | sudo pacman -S thunderbird darktable gramps steam inter-font mpv obs-studio filezilla element-desktop mumble speedcrunch virtualbox ufw sshfs python-pip gtk2 ttc-iosevka kcolorchooser skanlite yt-dlp openssh wine qmmp gimp shotcut qbittorrent inkscape gamemode lib32-gamemode krita cifs-utils gajim jellyfin-server jellyfin-web syncthing telegram-desktop perl-image-exiftool npm lite-xl | |
48 | 48 | wget -O - https://raw.githubusercontent.com/laurent22/joplin/dev/Joplin_install_and_update.sh | bash | |
49 | 49 | ||
@@ -84,6 +84,7 @@ sudo rsync -aP "${dir_backup}"/"${dir_home}"/.config/VirtualBox/ "${dir_home}"/. | |||
84 | 84 | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.config/qBittorrent/ "${dir_home}"/.config/qBittorrent/ | |
85 | 85 | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.config/lite-xl/ "${dir_home}"/.config/lite-xl/ | |
86 | 86 | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.config/qmmp/ "${dir_home}"/.config/qmmp/ | |
87 | + | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.config/Mumble/ "${dir_home}"/.config/Mumble/ | |
87 | 88 | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.mozilla/firefox/ "${dir_home}"/.mozilla/firefox/ | |
88 | 89 | ||
89 | 90 | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.thunderbird/ "${dir_home}"/.thunderbird/ |
airikr revised this gist . Go to revision
1 file changed, 4 insertions
installation.sh
@@ -156,6 +156,9 @@ sudo rsync -aP "${dir_backup}"/srv/http/ /srv/http/ | |||
156 | 156 | echo && printf "${YELLOW}Restarting Apache" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
157 | 157 | sudo systemctl restart httpd.service | |
158 | 158 | ||
159 | + | # ADDING USER | |
160 | + | sudo usermod -a -G vboxusers $USER | |
161 | + | ||
159 | 162 | # INSTRUCTIONS | |
160 | 163 | printf "${BLUE}" | |
161 | 164 | echo | |
@@ -176,4 +179,5 @@ echo 'Follow the instructions below NVIDIA Improvements at https://steamcommunit | |||
176 | 179 | echo | |
177 | 180 | echo 'Download FreeFileSync at https://freefilesync.org/' | |
178 | 181 | echo | |
182 | + | echo 'Log out and then log back in again to enable vboxusers' | |
179 | 183 | printf "${NC}" |
airikr revised this gist . Go to revision
1 file changed, 2 insertions, 2 deletions
installation.sh
@@ -43,8 +43,8 @@ yay -Syu --noconfirm | |||
43 | 43 | ||
44 | 44 | # INSTALL | |
45 | 45 | echo && printf "${YELLOW}Installing softwares" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
46 | - | yay -S --noconfirm mullvad-vpn-bin vscodium-bin qimgv-git ttf-victor-mono smartgit blue-recorder-git josm-stable xfce4-panel-profiles lite-xl-bin | |
47 | - | sudo pacman -S thunderbird darktable gramps steam inter-font mpv obs-studio filezilla element-desktop mumble speedcrunch virtualbox ufw sshfs python-pip gtk2 ttc-iosevka kcolorchooser skanlite yt-dlp openssh wine qmmp gimp shotcut qbittorrent inkscape gamemode lib32-gamemode krita cifs-utils gajim jellyfin-server jellyfin-web syncthing telegram-desktop perl-image-exiftool npm | |
46 | + | yay -S --noconfirm mullvad-vpn-bin vscodium-bin qimgv-git ttf-victor-mono smartgit blue-recorder-git josm-stable xfce4-panel-profiles | |
47 | + | sudo pacman -S thunderbird darktable gramps steam inter-font mpv obs-studio filezilla element-desktop mumble speedcrunch virtualbox ufw sshfs python-pip gtk2 ttc-iosevka kcolorchooser skanlite yt-dlp openssh wine qmmp gimp shotcut qbittorrent inkscape gamemode lib32-gamemode krita cifs-utils gajim jellyfin-server jellyfin-web syncthing telegram-desktop perl-image-exiftool npm lite-xl | |
48 | 48 | wget -O - https://raw.githubusercontent.com/laurent22/joplin/dev/Joplin_install_and_update.sh | bash | |
49 | 49 | ||
50 | 50 | # CREATE FOLDER |
airikr revised this gist . Go to revision
1 file changed, 16 insertions, 6 deletions
installation.sh
@@ -44,7 +44,7 @@ yay -Syu --noconfirm | |||
44 | 44 | # INSTALL | |
45 | 45 | echo && printf "${YELLOW}Installing softwares" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
46 | 46 | yay -S --noconfirm mullvad-vpn-bin vscodium-bin qimgv-git ttf-victor-mono smartgit blue-recorder-git josm-stable xfce4-panel-profiles lite-xl-bin | |
47 | - | sudo pacman -S thunderbird darktable gramps steam inter-font mpv obs-studio filezilla element-desktop mumble speedcrunch virtualbox ufw sshfs python-pip gtk2 ttc-iosevka kcolorchooser skanlite yt-dlp openssh wine qmmp gimp shotcut qbittorrent inkscape gamemode lib32-gamemode krita cifs-utils gajim jellyfin-server jellyfin-web syncthing telegram-desktop | |
47 | + | sudo pacman -S thunderbird darktable gramps steam inter-font mpv obs-studio filezilla element-desktop mumble speedcrunch virtualbox ufw sshfs python-pip gtk2 ttc-iosevka kcolorchooser skanlite yt-dlp openssh wine qmmp gimp shotcut qbittorrent inkscape gamemode lib32-gamemode krita cifs-utils gajim jellyfin-server jellyfin-web syncthing telegram-desktop perl-image-exiftool npm | |
48 | 48 | wget -O - https://raw.githubusercontent.com/laurent22/joplin/dev/Joplin_install_and_update.sh | bash | |
49 | 49 | ||
50 | 50 | # CREATE FOLDER | |
@@ -83,6 +83,7 @@ sudo rsync -aP "${dir_backup}"/"${dir_home}"/.config/VSCodium/ "${dir_home}"/.co | |||
83 | 83 | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.config/VirtualBox/ "${dir_home}"/.config/VirtualBox/ | |
84 | 84 | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.config/qBittorrent/ "${dir_home}"/.config/qBittorrent/ | |
85 | 85 | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.config/lite-xl/ "${dir_home}"/.config/lite-xl/ | |
86 | + | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.config/qmmp/ "${dir_home}"/.config/qmmp/ | |
86 | 87 | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.mozilla/firefox/ "${dir_home}"/.mozilla/firefox/ | |
87 | 88 | ||
88 | 89 | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.thunderbird/ "${dir_home}"/.thunderbird/ | |
@@ -97,7 +98,8 @@ sudo rsync -aP "${dir_backup}"/"${dir_home}"/Documents/ "${dir_home}"/Documents/ | |||
97 | 98 | # JELLYFIN | |
98 | 99 | echo && printf "${YELLOW}Configuring Jellyfin" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
99 | 100 | sudo rsync -aP "${dir_backup}"/var/lib/jellyfin/ /var/lib/jellyfin/ | |
100 | - | sudo chown -R jellyfin:jellyfin /var/lib/jellyfin/ sudo chmod -R 777 /var/lib/jellyfin/ | |
101 | + | sudo chown -R jellyfin:jellyfin /var/lib/jellyfin/ | |
102 | + | sudo chmod -R 777 /var/lib/jellyfin/ | |
101 | 103 | sudo systemctl restart jellyfin.service | |
102 | 104 | ||
103 | 105 | ||
@@ -115,7 +117,7 @@ sudo mysql_secure_installation | |||
115 | 117 | ||
116 | 118 | # PHP | |
117 | 119 | echo && printf "${YELLOW}Installing PHP" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
118 | - | sudo pacman -Sy php php-apache php-gd php-fpm php-sqlite | |
120 | + | sudo pacman -Sy php php-apache php-gd php-fpm php-sqlite php-pgsql | |
119 | 121 | ||
120 | 122 | # ENABLE BOOT | |
121 | 123 | echo && printf "${YELLOW}Enabling services for boot" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
@@ -127,12 +129,20 @@ sudo systemctl start sshd syncthing@airikr.service | |||
127 | 129 | ||
128 | 130 | # COMPOSER | |
129 | 131 | echo && printf "${YELLOW}Installing Composer" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
130 | - | php -r 'copy('https://getcomposer.org/installer', 'composer-setup.php');' | |
131 | - | php -r 'if (hash_file('sha384', 'composer-setup.php') === 'e21205b207c3ff031906575712edab6f13eb0b361f2085f1f1237b7126d785e826a450292b6cfd1d64d92e6563bbde02') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;' | |
132 | + | php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | |
133 | + | php -r "if (hash_file('sha384', 'composer-setup.php') === 'dac665fdc30fdd8ec78b38b9800061b4150413ff2e3b6f88543c636f7cd84f6db9189d43a81e5503cda447da73c7e5b6') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" | |
132 | 134 | php composer-setup.php | |
133 | - | php -r 'unlink('composer-setup.php');' | |
135 | + | php -r "unlink('composer-setup.php');" | |
134 | 136 | sudo mv composer.phar /usr/local/bin/composer | |
135 | 137 | ||
138 | + | # GEOSPATIAL | |
139 | + | git clone https://github.com/php-geospatial/geospatial.git | |
140 | + | cd geospatial | |
141 | + | phpize | |
142 | + | ./configure --enable-geospatial | |
143 | + | make | |
144 | + | sudo make install | |
145 | + | ||
136 | 146 | # COPY > PASTE | |
137 | 147 | echo && printf "${YELLOW}Restoring configuration files for web server" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
138 | 148 | sudo rsync -aP "${dir_backup}"/etc/httpd/conf/httpd.conf /etc/httpd/conf/ |
airikr revised this gist . Go to revision
1 file changed, 169 insertions
installation.sh(file created)
@@ -0,0 +1,169 @@ | |||
1 | + | #!/bin/bash | |
2 | + | ||
3 | + | # Kolla om till exempel qimgv är installerat eller inte | |
4 | + | ||
5 | + | # VARIABLES | |
6 | + | dir_home='/home/airikr' | |
7 | + | dir_backup='backup-ssd-dir' | |
8 | + | YELLOW='\033[1;33m' | |
9 | + | BLUE='\033[0;34m' | |
10 | + | NC='\033[0m' | |
11 | + | SLEEP='.5' | |
12 | + | ||
13 | + | # COPY > PASTE | |
14 | + | echo && printf "${YELLOW}Restoring bash files" && printf "${NC}" && echo && echo && sleep .5 | |
15 | + | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.bashrc "${dir_home}"/ | |
16 | + | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.bash_aliases "${dir_home}"/ | |
17 | + | sudo rsync -aP "${dir_backup}"/"$dir_home"/systembackup.sh "$dir_home"/ | |
18 | + | sudo rsync -aP "${dir_backup}"/"$dir_home"/transferphotos-card.sh "${dir_home}"/ | |
19 | + | sudo rsync -aP "${dir_backup}"/"${dir_home}"/transferphotos-ext.sh "${dir_home}"/ | |
20 | + | sudo rsync -aP "${dir_backup}"/"${dir_home}"/transferphotos-ext.sh "${dir_home}"/ | |
21 | + | ||
22 | + | echo && printf "${YELLOW}Restoring the fstab file" && printf "${NC}" && echo && echo && sleep .5 | |
23 | + | sudo cp /etc/fstab /etc/fstab.bak | |
24 | + | sudo rsync -aP "${dir_backup}"/etc/fstab /etc/ | |
25 | + | ||
26 | + | echo && printf "${YELLOW}Sourcing the bash_aliases file" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
27 | + | source "${dir_home}"/.bash_aliases | |
28 | + | ||
29 | + | # UNINSTALL | |
30 | + | echo && printf "${YELLOW}Uninstalling bloatware" && printf "${NC}" && echo && echo && sleep .5 | |
31 | + | which parole | grep -o parole > /dev/null && sudo pacman -Rcns parole || echo '${BLUE}parole is not installed${NC}' | |
32 | + | which firewalld | grep -o firewalld > /dev/null && sudo pacman -Rcns firewalld || echo '${BLUE}firewalld is not installed${NC}' | |
33 | + | which galculator | grep -o galculator > /dev/null && sudo pacman -Rcns galculator || echo '${BLUE}galculator is not installed${NC}' | |
34 | + | which ristretto | grep -o ristretto > /dev/null && sudo pacman -Rcns ristretto || echo '${BLUE}ristretto is not installed${NC}' | |
35 | + | which cmake | grep -o cmake > /dev/null && sudo pacman -Rcns cmake || echo '${BLUE}cmake is not installed${NC}' | |
36 | + | which eos-quickstart | grep -o eos-quickstart > /dev/null && sudo pacman -Rcns eos-quickstart || echo '${BLUE}eos-quickstart is not installed${NC}' | |
37 | + | which eos-apps-info | grep -o eos-apps-info > /dev/null && sudo pacman -Rcns eos-apps-info || echo '${BLUE}eos-apps-info is not installed${NC}' | |
38 | + | which welcome | grep -o welcome > /dev/null && sudo pacman -Rcns welcome || echo '${BLUE}welcome is not installed${NC}' | |
39 | + | ||
40 | + | # UPDATE | |
41 | + | echo && printf "${YELLOW}Updating" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
42 | + | yay -Syu --noconfirm | |
43 | + | ||
44 | + | # INSTALL | |
45 | + | echo && printf "${YELLOW}Installing softwares" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
46 | + | yay -S --noconfirm mullvad-vpn-bin vscodium-bin qimgv-git ttf-victor-mono smartgit blue-recorder-git josm-stable xfce4-panel-profiles lite-xl-bin | |
47 | + | sudo pacman -S thunderbird darktable gramps steam inter-font mpv obs-studio filezilla element-desktop mumble speedcrunch virtualbox ufw sshfs python-pip gtk2 ttc-iosevka kcolorchooser skanlite yt-dlp openssh wine qmmp gimp shotcut qbittorrent inkscape gamemode lib32-gamemode krita cifs-utils gajim jellyfin-server jellyfin-web syncthing telegram-desktop | |
48 | + | wget -O - https://raw.githubusercontent.com/laurent22/joplin/dev/Joplin_install_and_update.sh | bash | |
49 | + | ||
50 | + | # CREATE FOLDER | |
51 | + | echo && printf "${YELLOW}Creating missing folders" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
52 | + | sudo mkdir /mnt/Backup | |
53 | + | sudo mkdir /mnt/NAS | |
54 | + | sudo mkdir /mnt/Synology | |
55 | + | ||
56 | + | # INSTALL GRAPHIC DRIVERS | |
57 | + | echo && printf "${YELLOW}Installing graphic cards stuff" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
58 | + | install_no nvidia nvidia-settings nvidia-utils lib32-nvidia-utils lib32-opencl-nvidia opencl-nvidia libvdpau libxnvctrl vulkan-icd-loader lib32-vulkan-icd-loader | |
59 | + | ||
60 | + | # CONFIG | |
61 | + | echo && printf "${YELLOW}Configuring the graphic card" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
62 | + | sudo nvidia-xconfig | |
63 | + | sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.d/20-nvidia.conf | |
64 | + | ||
65 | + | ||
66 | + | ||
67 | + | # COPY > PASTE | |
68 | + | echo && printf "${YELLOW}Restoring backed up files" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
69 | + | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.config/darktable/ "${dir_home}"/.config/darktable/ | |
70 | + | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.config/mpv/ "${dir_home}"/.config/mpv/ | |
71 | + | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.config/'Mullvad VPN'/ "${dir_home}"/.config/'Mullvad VPN'/ | |
72 | + | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.config/qimgv/ "${dir_home}"/.config/qimgv/ | |
73 | + | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.config/obs-studio/ "${dir_home}"/.config/obs-studio/ | |
74 | + | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.config/smartgit/ "${dir_home}"/.config/smartgit/ | |
75 | + | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.config/filezilla/ "${dir_home}"/.config/filezilla/ | |
76 | + | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.config/GIMP/ "${dir_home}"/.config/GIMP/ | |
77 | + | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.config/FreeFileSync/ "${dir_home}"/.config/FreeFileSync/ | |
78 | + | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.config/JOSM/ "${dir_home}"/.config/JOSM/ | |
79 | + | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.config/Joplin/ "${dir_home}"/.config/Joplin/ | |
80 | + | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.config/joplin-desktop/ "${dir_home}"/.config/joplin-desktop/ | |
81 | + | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.config/SpeedCrunch/ "${dir_home}"/.config/SpeedCrunch/ | |
82 | + | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.config/VSCodium/ "${dir_home}"/.config/VSCodium/ | |
83 | + | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.config/VirtualBox/ "${dir_home}"/.config/VirtualBox/ | |
84 | + | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.config/qBittorrent/ "${dir_home}"/.config/qBittorrent/ | |
85 | + | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.config/lite-xl/ "${dir_home}"/.config/lite-xl/ | |
86 | + | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.mozilla/firefox/ "${dir_home}"/.mozilla/firefox/ | |
87 | + | ||
88 | + | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.thunderbird/ "${dir_home}"/.thunderbird/ | |
89 | + | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.joplin/ "${dir_home}"/.joplin/ | |
90 | + | sudo rsync -aP "${dir_backup}"/"${dir_home}"/.vscode-oss/ "${dir_home}"/.vscode-oss/ | |
91 | + | ||
92 | + | sudo rsync -aP "${dir_backup}"/"${dir_home}"/Pictures/Wallpapers/ "${dir_home}"/Pictures/Wallpapers/ | |
93 | + | sudo rsync -aP "${dir_backup}"/"${dir_home}"/Documents/ "${dir_home}"/Documents/ | |
94 | + | ||
95 | + | ||
96 | + | ||
97 | + | # JELLYFIN | |
98 | + | echo && printf "${YELLOW}Configuring Jellyfin" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
99 | + | sudo rsync -aP "${dir_backup}"/var/lib/jellyfin/ /var/lib/jellyfin/ | |
100 | + | sudo chown -R jellyfin:jellyfin /var/lib/jellyfin/ sudo chmod -R 777 /var/lib/jellyfin/ | |
101 | + | sudo systemctl restart jellyfin.service | |
102 | + | ||
103 | + | ||
104 | + | ||
105 | + | # APACHE | |
106 | + | echo && printf "${YELLOW}Installing Apache" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
107 | + | sudo pacman -Sy apache | |
108 | + | ||
109 | + | # MYSQL | |
110 | + | echo && printf "${YELLOW}Installing MariaDB" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
111 | + | sudo pacman -Sy mariadb | |
112 | + | sudo mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql | |
113 | + | sudo systemctl start mariadb.service | |
114 | + | sudo mysql_secure_installation | |
115 | + | ||
116 | + | # PHP | |
117 | + | echo && printf "${YELLOW}Installing PHP" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
118 | + | sudo pacman -Sy php php-apache php-gd php-fpm php-sqlite | |
119 | + | ||
120 | + | # ENABLE BOOT | |
121 | + | echo && printf "${YELLOW}Enabling services for boot" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
122 | + | sudo systemctl enable mysqld httpd sshd jellyfin syncthing@airikr.service | |
123 | + | ||
124 | + | # START | |
125 | + | echo && printf "${YELLOW}Starting SSH & Syncthing" && printf "${NC}" && echo && echo | |
126 | + | sudo systemctl start sshd syncthing@airikr.service | |
127 | + | ||
128 | + | # COMPOSER | |
129 | + | echo && printf "${YELLOW}Installing Composer" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
130 | + | php -r 'copy('https://getcomposer.org/installer', 'composer-setup.php');' | |
131 | + | php -r 'if (hash_file('sha384', 'composer-setup.php') === 'e21205b207c3ff031906575712edab6f13eb0b361f2085f1f1237b7126d785e826a450292b6cfd1d64d92e6563bbde02') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;' | |
132 | + | php composer-setup.php | |
133 | + | php -r 'unlink('composer-setup.php');' | |
134 | + | sudo mv composer.phar /usr/local/bin/composer | |
135 | + | ||
136 | + | # COPY > PASTE | |
137 | + | echo && printf "${YELLOW}Restoring configuration files for web server" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
138 | + | sudo rsync -aP "${dir_backup}"/etc/httpd/conf/httpd.conf /etc/httpd/conf/ | |
139 | + | sudo rsync -aP "${dir_backup}"/etc/httpd/conf/extra/phpmyadmin.conf /etc/httpd/conf/extra/ | |
140 | + | sudo rsync -aP "${dir_backup}"/etc/php/php.ini /etc/php/ | |
141 | + | ||
142 | + | echo && printf "${YELLOW}Restoring website projects" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
143 | + | sudo rsync -aP "${dir_backup}"/srv/http/ /srv/http/ | |
144 | + | ||
145 | + | # RESTART | |
146 | + | echo && printf "${YELLOW}Restarting Apache" && printf "${NC}" && echo && echo && sleep ${SLEEP} | |
147 | + | sudo systemctl restart httpd.service | |
148 | + | ||
149 | + | # INSTRUCTIONS | |
150 | + | printf "${BLUE}" | |
151 | + | echo | |
152 | + | echo '--------' | |
153 | + | echo | |
154 | + | echo 'sudo mysql' | |
155 | + | echo 'ALTER USER 'root'@'localhost' IDENTIFIED VIA mysql_native_password USING PASSWORD('password');' # Only if root's password is wrong. | |
156 | + | echo 'quit' | |
157 | + | echo 'mysql -u root -p' | |
158 | + | echo 'CREATE USER 'user'@'localhost' IDENTIFIED BY 'password';' | |
159 | + | echo 'GRANT ALL PRIVILEGES ON *.* TO 'user'@'localhost';' | |
160 | + | echo 'quit' | |
161 | + | echo | |
162 | + | echo '--------' | |
163 | + | echo | |
164 | + | echo 'sudo nano /etc/X11/xorg.conf.d/20-nvidia.conf' | |
165 | + | echo 'Follow the instructions below NVIDIA Improvements at https://steamcommunity.com/sharedfiles/filedetails/?id=1787799592' | |
166 | + | echo | |
167 | + | echo 'Download FreeFileSync at https://freefilesync.org/' | |
168 | + | echo | |
169 | + | printf "${NC}" |