TLF Scripts
These are scripts I use for convenience. Just wanted to share in case they might be useful to someone.
Use at your own risk
I don't change these scripts a lot, as they're generally JUST right for my use-case. This is not a library intended for mass consumption. Rather, it's some useful stuff I've written that might be helpful to others. The release
scripts I find particularly useful. But still, use at your own risk. It's not my fault if you mess up your server or something by using these scripts.
Installation
- Clone the repo
- Add the
tlf
script to your PATH
Basics
- all commands start with
tlf
. Using justtlf
defaults totlf general
- Each commands directory is a subcommand. The only commands directories are
general
andrelease
Release
Scripts for working with a remote server.
-
tlf release setup
: Sets up a project to work with thetlf release
scripts. Should be executed from arelease
directory, generally -
tlf release push
: Upload files to remote server -
tlf release pull
: Download files from remote server -
tlf release ssh
:ssh
into your remote server -
tlf release sshkey
: Create an ssh key, then upload the public key to your remote server, so you canssh
into your server later without a password
General
Otherwise unorganized scripts. Run via tlf COMMAND
or tlf general COMMAND
. The shorter version is shown.
You have to make a file at secrets/whatever.bash
with your settings (see below).
-
tlf backupdb
: backup a local database -
tlf gitstatus
: Check the git status of all sub-directories of the executing directory. Not recursive (I don't think so anyway) -
tlf phpautoload
: Runs my php autoload file to build a global autoloader for my system -
tlf serverdir
: Sets the current directory to your apache group & sets file & directory permissions, among some other things -
tlf ssh
: Helps you load an ssh key. Depends upongit bent]
-
tlf vhost
: Adds a virtual host config file pointing to the current directory. Usesdir="/etc/httpd/conf.d/site"
, so it won't work on Debian systems.
secrets/general.bash
autoload_build_path="/home/user/absolute_path/build-autoload.php"
apache_user="user"
apache_group="apache"
ssh_keys_folder=~/.ssh # This is the "normal" location, but not what I use.