JJ5-bin: Difference between revisions

From John's wiki
Jump to navigation Jump to search
(Moving 'Tasks' to end of file and adding 'Release notes' section (but it's empty).)
(→‎Done: Adding date heading to 'Done' notes.)
Line 192: Line 192:
Stuff that's done. Latest stuff goes on the bottom of the list.
Stuff that's done. Latest stuff goes on the bottom of the list.


* [[User:Sixsigma|JE]] 2012-03-01: created project page and initial documentation.
=== 2012-03-01 ===
 
* [[User:Sixsigma|JE]]: created project page and initial documentation.

Revision as of 10:18, 25 March 2012

jj5-bin is where John keeps his Linux scripts. For other projects see projects.

Status

Released, but there's stuff TODO.

Administration

Contributors

People who have contributed to this project. Newest on top.

Copyright

Copyright 2012, Contributors.

License

Licensed under the New BSD license.

Resources

Source code

The repository can be browsed online:

The latest stable released version of the code is available via Subversion from:

Or if you want the latest version for development purposes:

Links

Specifications

Functional specification

Utilities

archive

Moves the files specified as arguments to an archive directory. Your archive directory is in ~/archive and it should only be accessible by you. Archive directories are named based on the date in yyyy-MM-dd-HHmmss format.

archive-copy

Copies the files specified as arguments to an archive directory. Your archive directory is in ~/archive and it should only be accessible by you. Archive directories are named based on the date in yyyy-MM-dd-HHmmss format.

backup-mysql-db

Backs up a MySQL database on the local host. Accepts two arguments. The first argument is the backup type, typically one of 'hourly', 'daily', 'weekly', 'monthly' or 'adhoc'. The second argument is the name of the database to backup.

Database backups are stored in the /var/backups/mysql/$database_name/$backup_type directory which is only accessible by root.

In order to run the database backup script needs access to the file /home/jj5/.passwd/mysql_root which must contain a single line containing the password for the MySQL root user.

backup-svn-repo

Backs up a Subversion repository. Accepts two arguments. The first argument is the name of the repository being backed up, e.g. 'bkrepo', 'pcrepo', 'jjrepo', etc. The second argument is the file path to the repository, e.g. /var/svn/export/svn/public/jjrepo.

Subversion backups are stored in the /var/backups/svn/$repo directory which is only accessible by root.

cron-configure-backups

Installs the hourly, daily, weekly and monthly cron backup scripts for a host that has said scripts available in the lib directory.

fw-restart

Reloads the iptables firewall rules from the standard location /etc/iptables.up.rules.

fw-stop

Disables the iptables firewall allowing (and logging) all traffic. This is in case you need to do some debugging, but use with caution.

keep-only

Keeps only the specified number of files (typically backup files) in a directory. Accepts two arguments. The first argument is the path to the directory being processed. The second argument is the number of files that should be kept.

If the number of files in the specified directory exceeds the number of files to be kept, then the oldest files are deleted so only the specified number of files remain.

ls-all

Lists all files in a directory, or if no argument is given, all files on the system. This script is used by the backup scripts to get a full list of files and their user/group/permissions.

reconnect

Reconnects your screen session.

take-ownership-jj5

Grants ownership of an entire directory (recursively) to jj5:jj5 and makes sure the files are owner accessible.

Session management

session-info

Prints info about your session that is being recorded.

session-login

The login script run when creating a new recorded session.

session-replay

Replays a recorded session. Accepts one argument, being the path to the session to replay without its file extension (either .timing or .script).

session-start

Starts a new recorded session.

session-stop

Stops recording the current session.

Project management

bkrepo-release

Releases a Blackbrick Development project.

pcrepo-release

Releases a ProgClub project.

jjrepo-release

Releases a project in John's public repository.

jprepo-release

Releases a project in John's private repository.

svn-release

Releases a project in a Subversion repository. Accepts three arguments. The first argument is the name of the project being released. The second argument is the release notes. The third argument is the repository root URL.

This script is called from the bkrepo-release, pcrepo-release, jjrepo-release and jprepo-release scripts.

sixsigma

devotion

empathy

orac

Technical specification

The facilities available in jj5-bin are generally Bash shell scripts, functions or aliases.

Notes

Notes for implementers

If you are interested in incorporating this software into your project, here's what you need to know:

Just copy-and-paste your way to victory! Feel free to ask questions.

Notes for developers

If you're interested in contributing to this software, here's what you need to know:

Send your patch to jj5@jj5.net along with a statement that you are willing to be listed in the contributors section of the documentation and willing to license your contribution under the license.

For security reasons write access to jjrepo is only available for John. It's basically my private repository. If you'd like to hack on projects where you do have checkin permissions on the Subversion repository, along with infrastructure for running your code, then why not head over to ProgClub and register?

Release notes

Release notes are (supposed to be) added after notable releases are made. New release notes are added to the bottom of the release notes section and have a level 3 title based on the release date.

Tasks

TODO

Things to do, in rough order of priority:

  • implement the stub scripts (e.g. session-info).

Done

Stuff that's done. Latest stuff goes on the bottom of the list.

2012-03-01

  • JE: created project page and initial documentation.