Skip to content

Instantly share code, notes, and snippets.

View renekreijveld's full-sized avatar

Rene Kreijveld renekreijveld

View GitHub Profile
@renekreijveld
renekreijveld / jnewfiles
Last active May 17, 2022 15:32
Bash script to detect new and changed php and html files last 3 hours. Skips cache directories.
#!/bin/sh
# jnewfiles
# Detects new and changed php and html files last xxx minutes
# (C) 2014 Rene Kreijveld, enail [at] renekreijveld [dot] nl
# Update 31-12-2013: only send email when changes are found
# Update 04-02-2014: check for new files last three hours
# Update 05-05-2014: check for new html files also
# Update 07-05-2014: filter out ju_chached and DirectAdmin stats folders in html files
@renekreijveld
renekreijveld / dbbackup
Last active February 22, 2018 01:14
Create a backup of all your MySQL databases
#!/bin/sh
# dbbackup - Create a backup of all your MySQL databases
#
# Copyright 2011 Rene Kreijveld - r.kreijveld@gakijken.nl
#
# This program is free software; you may redistribute it and/or modify it.
NOW=$(date +"%Y%m%d-%H%M%S")
DBCONF=/usr/local/directadmin/conf/mysql.conf
@renekreijveld
renekreijveld / jdbdump
Last active August 7, 2019 08:15
Dump a Joomla database to sql file.
#!/bin/sh
# jdbdump -- Dump a Joomla database to sql file.
#
# This scripts supports Joomla versions 1.0 - 3.3
#
# Copyright 2014 Rene Kreijveld - email@renekreijveld.nl
#
# This program is free software; you may redistribute it and/or modify it.
#
#!/bin/sh
# findjoomlas -- Find Joomla instances on your (DirectAdmin based) server.
# Supports Joomla versions 1.0/1.5/1.6/1.7/2.5/3.0/3.1/3.2/3.2
#
# Copyright 2014 Rene Kreijveld - email@renekreijveld.nl
#
# This program is free software; you may redistribute it and/or modify it.
# Define variables
#!/bin/sh
# joomlainfo -- Provide information about this Joomla! installation.
# Supports Joomla 1.0 - 3.3
#
# Copyright 2014 Rene Kreijveld - email@renekreijveld.nl
#
# This program is free software; you may redistribute it and/or modify it.
#
# Warning! This script needs the file joomlafunctions. This has to be installed in the same directory as this script.
#!/bin/sh
# jbackup -- Create a full backup (including database) of a Joomla website to .tgz file.
# Supports Joomla 1.0 - 3.3
#
# Copyright 2014 Rene Kreijveld - email@renekreijveld.nl
#
# This program is free software; you may redistribute it and/or modify it.
#
# Warning! This script needs the file joomlafunctions. This has to be installed in the same directory as this script.
#!/bin/sh
# jdbimp -- Import a sql file into a Joomla database.
# Supports Joomla versions 1.0 - 3.3
#
# Copyright 2014 Rene Kreijveld - email@renekreijveld.nl
#
# This program is free software; you may redistribute it and/or modify it.
#
# Warning! This script needs the file joomlafunctions. This has to be installed in the same directory as this script.
#!/bin/sh
# findjoomlas-csv -- Find Joomla instances on your (DirectAdmin based) server. Output as csv.
# Supports Joomla versions 1.0/1.5/1.6/1.7/2.5/3.0/3.1
#
# usage: findjoomlas-csv > myjoomlasites.csv
#
# Copyright 2013 Rene Kreijveld - email@renekreijveld.nl
#
# This program is free software; you may redistribute it and/or modify it.
#!/bin/sh
# updatejoomlas
# updates your Joomla 2.5.x websites to the latest version (2.5.13 in this example)
#
# Copyright 2013 Rene Kreijveld - email@renekreijveld.nl
#
# This program is free software; you may redistribute it and/or modify it.
wget http://joomlacode.org/gf/download/frsrelease/18554/83288/Joomla_2.5.x_to_2.5.13-Stable-Patch_Package.zip -O /joomla/25xupdate.zip
@renekreijveld
renekreijveld / joomlaupdate
Last active September 17, 2021 13:12
This bash script will update your Joomla 2.5/3.1 website to the latest Joomla version. It does this by automatically downloading the correct update zipfile from Joomla.org. The script also executes the sql update commads (if needed). If specified joomlaupdate will make a backup of your website and database before updating. Joomlaupdate can also …
#!/bin/sh
# joomlaupdate
# Updates your Joomla 2.5/3.1 website to the latest version.
#
# Usage: joomlaupdate [-s] [-b] [-h] [-l]
#
# Default action is verbose on, no backup.
# -s Silent. Do not display any informational messages.
# -b Backup. Create a backup before updating.