@@ -106,7 +106,7 @@ In this script I got much help from this website:
<h2>gitrepo.sh</h2>
The gitrepo.sh script is an optional task and updates the local and the centralized git repository. Inside this script I run the git commands to push all the changes that have been done after running the other scripts. This includes the git command git add, git commit and git push. To add all the changes I wrote a dot to get all the changed and new files. In the commit message I included the date to see when it was pushed automatically. I also included that it is an automatic push so it is possible to see if the commit is pushed manually or automatically. Since this script also runs automatic by systemd every 6th hour it requires a ssh key or a token, if not it asks for the username and the password for the gitlab. I chose to use a token, because of security. The ssh key has an option of making a passphrase, but then the user have to write it down everytime it runs which is pointless. It is possible to not give the ssh key a passprase, but this is not a secure way of doing it. Therefore I made a token in gitlab to clone the project with https. I made a project token so the token can just be used with this project only. I configurated the bot in the terminal:
The gitrepo.sh script is an optional task and updates the local and the centralized git repository. Inside this script I run the git commands to push all the changes that have been done after running the other scripts. This includes the git command git add, git commit and git push. To add all the changes I wrote a dot to get all the changed and new files. In the commit message I included the date to see when it was pushed automatically. I also included that it is an automatic push so it is possible to see if the commit is pushed manually or automatically. Since this script also runs automatic by systemd every 6th hour it requires a ssh key or a token, if not it asks for the username and the password for the gitlab. I chose to use a token, because of security. The ssh key has an option of making a passphrase, but then the user have to write it down everytime it runs which is pointless. It is possible to not give the ssh key a passprase, but this is not a secure way of doing it. Therefore I made a token in gitlab to clone the project with https. I made a project token so the token can just be used with this project only. I gave the token the role maintainer and the scope api. I configurated the bot in the terminal:
@@ -120,3 +120,5 @@ Then clone the project in this way, replacing the $PROJECT_TOKEN with the actual
Finally I made the deployment script. The deployment.sh is an optional script and will configurate a blank installation of raspberry pi os with all that is necessary for the project to work. Firstly the script installs all the programs that I have used to solve this assignment. Then making a git directory inside home/pi and clone the git repository with https inside this directory. This will make an exam directory with all the scripts inside and one config folder with all the configuration files. Then the script will copy the configuration files and the overview.cgi and place it inside the right directory as well as enable and start it. Finally available all the scripts with the chmod +x command. However you have to manually enable the deployment.sh before you run it:
chmod +x deployment.sh
I tried to run the deployment.sh on an virtual machine, however the schedule-exam.timer refuses to start. It says that the trigger was not loaded.
<li><ahref='htmlfiles/2021-12-09-1911/news2-tv2nyheter.html'>tv2nyheter: Full strømkrise blant Norges gartnere</li>
<li><ahref='htmlfiles/2021-12-09-1911/news1-tv2nyheter.html'>tv2nyheter: Hild (38) får penger fra fremmede for å betale strøm: - Burde ikke være sånn</li>
<li><ahref='htmlfiles/2021-12-09-1800/news6-nrkinnlandet.html'>nrkinnlandet: Hvem vinner Klassequizen i Innlandet? </li>
<li><ahref='htmlfiles/2021-12-09-1800/news5-nrkinnlandet.html'>nrkinnlandet: Melder om omikronutbrudd i Gjøvik kommune </li>
<li><ahref='htmlfiles/2021-12-09-1800/news4-nrkinnlandet.html'>nrkinnlandet: Leder for Tufsingdalen bondelag er fortvila over reinflokker </li>