Created
November 7, 2012 23:40
-
-
Save carlwiedemann/4035400 to your computer and use it in GitHub Desktop.
Drush login, Drush logout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Drush login function dli | |
# ------------------------ | |
# | |
# Open the given site in the browser, login as root, and go to destination | |
# argument. Requires the -l option, or drush site-set @alias, or $options['l'] | |
# in sites/default/bashrc.php | |
# | |
# Usage | |
# ----- | |
# | |
# # Simply login as root. | |
# $> dli | |
# | |
# # Login as root and go to /admin/content/node | |
# $> dli admin/content/node | |
# | |
function dli { | |
open `drush uli`/login?destination=$1 | |
} | |
# Drush logout function dlo | |
# ------------------------ | |
# | |
# Open the given site in the browser, logs out, and goes to destination argument. | |
# Requires the -l option, or drush site-set @alias, or $options['l'] in | |
# sites/default/bashrc.php | |
# | |
# Usage | |
# ----- | |
# | |
# # Simply logout | |
# $> dlo | |
# | |
# # Logout and go to /admin/content/node | |
# $> dli admin/content/node | |
# | |
function dlo { | |
open http://`drush st --pipe | grep site_uri | replace site_uri= ''`/user/logout?destination=$1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment