public:scripts
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
public:scripts [2017/09/07 07:57] – Roland Hansmann | public:scripts [2018/02/06 11:10] (current) – [accounts.sh] Roland Hansmann | ||
---|---|---|---|
Line 197: | Line 197: | ||
#!/bin/bash | #!/bin/bash | ||
set -e | set -e | ||
+ | |||
+ | # Set your install dir | ||
+ | INSTALLDIR=/ | ||
[[ `whoami` != " | [[ `whoami` != " | ||
- | |||
- | INSTALLDIR=/ | ||
[[ `pwd` != " | [[ `pwd` != " | ||
DOKUFILE=`ls $INSTALLDIR/ | DOKUFILE=`ls $INSTALLDIR/ | ||
- | |||
[[ -z $DOKUFILE ]] && { echo "No TAR file found matching dokuwiki*.tgz"; | [[ -z $DOKUFILE ]] && { echo "No TAR file found matching dokuwiki*.tgz"; | ||
cd $INSTALLDIR | cd $INSTALLDIR | ||
- | |||
- | |||
echo " | echo " | ||
Line 255: | Line 253: | ||
done | done | ||
echo "" | echo "" | ||
- | |||
echo " | echo " | ||
Line 1286: | Line 1283: | ||
# edit | # edit | ||
- | vi $ACCOUNTFILE | + | $VIBIN |
# encrypt new file and overwrite existing one | # encrypt new file and overwrite existing one | ||
Line 1585: | Line 1582: | ||
ifconfig $MON down | ifconfig $MON down | ||
</ | </ | ||
+ | ==== spacewalk-package-installed ==== | ||
+ | This script shows which servers have installed a specific package | ||
+ | <file bash spacewalk-package-installed> | ||
+ | #!/bin/bash | ||
+ | PACKAGE=$1 | ||
+ | VERSION=$2 | ||
+ | RELEASE=$3 | ||
+ | [[ $@ -ne 3 ]] && { echo " | ||
+ | |||
+ | for id in `/ | ||
+ | | ||
+ | | ||
+ | | ||
+ | |cut -f1 -d, |grep -v ^system_id` | ||
+ | do | ||
+ | / | ||
+ | | ||
+ | |cut -f3 -d, |tail -1 | ||
+ | done | ||
+ | </ | ||
===== C ===== | ===== C ===== | ||
public/scripts.1504771077.txt.gz · Last modified: 2017/09/07 07:57 by Roland Hansmann