Category Archives: DevOps

Nextcloud 13 – 14 Error, Missing Appstore | nextcloud missing availible applications

I encountered an error yesterday which stopped the availible application being displayed on both my Nextcloud 13 and 14 installations.

It turns out to be a bug which can be fixed by inserting the following line into the installdir/config/config.php file.

The entire file should look something like this.

 

Simple way to backup your MySQL database everyday! | backup your mysql database everyday with this bash script.

This is a simple script to backup your MySQL database everyday and compress it on the fly, you just need to add an entry into Cron. see below

Script

The script will also data the new backup which stops it overriding the previous backup.

Edit cron

Enter this

This will kick off everyday at 9:22pm

Dump1090 to MySQL Script | send flight data from dump1090 to mysql

I wanted a script which would read all the live dump1090 aircraft data and log it to a mysql database.

This base script does it, it will dump all the data to Mysql every minute.

It will start the dump1090 server and kick off a process which reads/sorts and inserts.

 

Bash script to generate a sitemap.xml on a WordPress instance | bash script to generate a sitemap.xml for wordpress

There are free online tool to generate sitemap.xml, but the one I used would only index 500 pages. My site www.techinterchange.com.au has more, so I decide to write a bash script which ill index the site and generate an sitemap.xml.

Its simple, ill continue to add features and make it more reliable. This is only working with WordPress atm, Ill improve with the next revision.

 

 

Fix Apache2 SELINUX permissions problems. | selinux stopping images appearing on site

I recently had a request with an Apache2 problem.  The website didn’t display the images on the page.

After looking at the logs, the error appeared in the /var/log/audit/audit.log.

When you kick off a request with the web browser, you see 5 – 6 error appear about permissions.

So fix this, its easy, running the following command while its running refresh your browser.

This tool will find the error and create a white list and store it as “test”

To implement the fix execute the following command.

Once completed you will have access to your files.

Having your Linux system email you! | How to write a script which emails you

Quite often you need to write scripts which need to email you urgent information, there is a very simply way to do this.

First we need to install an email server to transmit the emails.

Then insert the following into your script.

In the above example it will email a copy of your local host file, change be change for any file you want transmitted.

See this script for a working example.

Visibility when your IP changes and is updated by no-ip | email notification when ip changes home adsl nbn bash script

My new internet connection with NBN changes the IP on a regular basis, but I wanted visibility as to how often.

So I’ve written a bash script which records your IP and date, once it changes it records your new IP and sends you an email to notify you of the new change.

This is completed by querying your no-ip dns record.

Usage

 

Cron Entry. (runs every hour)

 

 

Encrypting your home area for backup with Openssl | using openssl to encrypte and automate your backups to fileserver

Im currently running a Linux desktop, the other day the disk become corrupt and I lost my home area. Not a big problem as I dont store much data, but I lost all my ssh keys, configs etc. It took a few days to recover.

In an effort to stop that from happening again I want to backup all my data to the company file server, but I dont want them to have access to my keys and configs ect.

So I have scripted a backup which will encrypt on the fly. Through it into cron and you have a daily backup.

This is the command you run to create backup, notice the password is in the command. This is allow for automated backups using Cron.

And the following command is to run a restore, once executed you will be prompted for the password.

 

 

Resetting your Git email address. | (pre-receive hook declined) repair error

If your getting errors like,

When attempting to push changes to your Git repo, its probably because your email address is not authenticating with Git.

To reset follow the following steps,

To check its correct

If it still failing on that repo, you’ll need to reset.

 

Building a ubuntu mining rig with 6 x GTX 1060 6GB GPUs | Set up a eth mining rig

Iv been getting involved in the Bitcoin craze lately. I invested a little cash just to learn how the system works.

So… I thought Id roll the dice with a Bitcoin mining rig. My budget was around $3000, which I got close to.

Here is a detailed log of how I achieved this and what results I received.

Build materials and links.

Total: 3229.48

When clicking on the above links, please keep in mind that all things mining will change in price because of demand. Especially GPUs.

Also, I could have cut costs on things like CPU, Hardisk and power supply but I was rushing to build the rig and didn’t care too much in the end.

In the space of a month the GPUs that I purchased went up by around $50 each, the demand was crazy when the price of bitcoin went up. They remain higher at the moment even though bitcoin has halved in value.

Also another problem was that most good/cheap mining boards use the LGA1150 CPU socket which is no longer available from stores, I had to purchase this CPU second hand.

I had to wait several weeks before all the parts come in, some were delayed and some dodgy ebay stores didnt send them at all.

Putting the rig together was alot of fun, i have not messed around with hardware in a very long time.

Once all the parts came together I fired her up…. PROBLEMO!!!

The power supply was dead, it would start for a few seconds and them die. I purchased another with arrived 3 days later.

Once the new power supply arrived I started the Ubuntu installation. A few were problematic. I settled of Ubuntu 16.04 because it was stable and a lot of other miners were using this version.

Once the base OS was installed and running, we need to setup the NVIDIA drivers. I installed a number of different versions and found the latest version gives the best results as of this time. Version and location below.

Installation instructions for these GPUs.

This concludes the GPU drivers installation.

Now lets install the mining software.

Now lets start the mining!

 

 

BOOM Your Mining!

 

 

Useful Links Below.

https://bitcointalk.org/index.php?topic=1712831.0

http://www.tomshardware.com/answers/id-3335591/max-safe-overclock-evga-gtx-1060-6gb.html

https://www.cryptocompare.com/mining/calculator

Overclocking multiple Nvidia graphics card on Linux

https://github.com/ethereum-mining/ethminer/issues/119