First try to implement auto-fix after upgrade

This commit is contained in:
2021-09-16 18:58:38 +03:00
parent afbd16d7d7
commit 5654313dc9
2 changed files with 32 additions and 0 deletions

2
99fix-opera Normal file
View File

@@ -0,0 +1,2 @@
DPkg::Pre-Invoke {"stat -c %Z /usr/lib/x86_64-linux-gnu/opera/opera > /tmp/opera.timestamp";};
DPkg::Post-Invoke {"if [ `stat -c %Z /usr/lib/x86_64-linux-gnu/opera/opera` -ne `cat /tmp/opera.timestamp` ]; then /root/.scripts/fix-opera.sh; fi; rm /tmp/opera.timestamp";};

View File

@@ -9,6 +9,7 @@
* [Requirements](#Requirements)
* [How use](#How-use)
* [Create an alias](#Create-an-alias)
* [Autostart after upgrade](#Autostart-after-upgrade)
### Requirements
@@ -65,3 +66,32 @@
7. Delete the repo
```rm -rf ./fix-opera-linux-ffmpeg-widevine```
### Autostart after upgrade
1. Clone this repo
```git clone https://github.com/Ld-Hagen/fix-opera-linux-ffmpeg-widevine.git```
2. Create a **script** folder on **/root**
```sudo mkdir /root/.scripts```
3. Copy the script into the **script** folder
```sudo cp ./fix-opera-linux-ffmpeg-widevine/fix-opera.sh /root/.scripts```
4. Give execute permissions to the script file
```chmod +x /root/.scripts/fix-opera.sh```
5. Copy apt config file into the **script** folder
```sudo cp ./fix-opera-linux-ffmpeg-widevine/99fix-opera /root/.scripts```
6. Create symlink
```sudo ln -s /root/.scripts/99fix-opera /etc/apt/apt.conf.d/```
7. Delete the repo
```rm -rf ./fix-opera-linux-ffmpeg-widevine```