Changeset 1405
- Timestamp:
- 03/10/07 11:25:40 (2 years ago)
- Files:
-
- feedmelinks/_config (modified) (1 prop)
- feedmelinks/_config/.cvsignore (modified) (1 diff)
- feedmelinks/_config/crontab (deleted)
- feedmelinks/_config/crontab-template.txt (added)
- feedmelinks/_config/parse-config.xsl (modified) (2 diffs)
- feedmelinks/bin/backup-dump-tables.sh (modified) (3 diffs)
- feedmelinks/bin/backup-site.sh (modified) (2 diffs)
- feedmelinks/bin/configure.sh (modified) (2 diffs)
- feedmelinks/bin/rebuild-xulbars.sh (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
feedmelinks/_config
- Property svn:ignore changed from
domain.txt
servers.xml
to
domain.txt
servers.xml
crontab.INSTALL_ME
- Property svn:ignore changed from
feedmelinks/_config/.cvsignore
r1323 r1405 1 1 domain.txt 2 2 servers.xml 3 crontab.INSTALL_ME feedmelinks/_config/parse-config.xsl
r1325 r1405 13 13 <xsl:template match="/"> 14 14 15 <!-- 16 17 each "mode" parses servers.xml and spits it out in a different native format, 18 so we can quickly add new perl, php, sh, etc scripts that use the global config values 19 without ever hard-coding passwords anywhere. cool. 20 21 --> 15 22 <xsl:choose> 23 16 24 <xsl:when test="$mode = 'php'"><% 17 25 function get_env() { … … 25 33 <xsl:call-template name="CRLF" /> 26 34 %></xsl:when> 35 36 <xsl:when test="$mode = 'crontab'"> 37 # This file is autogenerated by _config/parse-config.xsl 38 # DO NOT EDIT! or your changes will be blown away the next time someone runs bin/configure.sh 39 # instead, modify the configuration values in _config/server.xml 40 41 PATH=/bin:/usr/bin:/usr/local/bin:<xsl:value-of select="/servers/server[@name=$server-name]/@webserver-root"/>/bin 42 MAILTO=<xsl:value-of select="/servers/server[@name=$server-name]/@maintainer-email"/> 43 ADMIN_USER=<xsl:value-of select="/servers/server[@name=$server-name]/@admin-user"/> 44 ADMIN_PASSWORD=<xsl:value-of select="/servers/server[@name=$server-name]/@admin-user-password"/> 45 WEBSERVER_ROOT=<xsl:value-of select="/servers/server[@name=$server-name]/@webserver-root"/> 46 SITE=<xsl:value-of select="/servers/server[@name=$server-name]/@domain"/> 47 48 <xsl:call-template name="CRLF" /> 49 <xsl:call-template name="CRLF" /> 50 </xsl:when> 27 51 28 52 <xsl:when test="$mode = 'sh'"> feedmelinks/bin/backup-dump-tables.sh
r1386 r1405 3 3 . env.sh 4 4 5 # db auth: ( from env)5 # db auth: (all read in from from env.sh) 6 6 db_u=`get_database_user` 7 7 db=`get_database_name` 8 8 db_p=`get_database_password` 9 10 root=`get_webserver_root` 9 11 10 12 # optional directory prefix, else drop the backup in ~: … … 15 17 if [ -n "$subdir" ] ; 16 18 then 17 startdir=$ HOME/$subdir19 startdir=$subdir 18 20 else 19 startdir=$ HOME21 startdir=$root/_backups 20 22 fi 21 23 … … 37 39 rm -rf $dumpdir 38 40 39 gpg -r jm3 - f$dumpdir.tgz41 gpg -r jm3 --encrypt-files $dumpdir.tgz 40 42 rm $dumpdir.tgz 41 43 feedmelinks/bin/backup-site.sh
r1386 r1405 1 #!/ usr/local/bin/bash1 #!/bin/bash 2 2 3 3 type=$1 4 root=/usr/home/hirokai/FML-BACKUPS/ 4 . env.sh 5 6 # all read in from from env.sh 7 root=`get_webserver_root` 5 8 6 9 if [ -z "$type" ]; 7 10 then 8 echo "usage: fml-backup.sh(daily|weekly|monthly)"11 echo "usage: $0 (daily|weekly|monthly)" 9 12 exit 1 10 13 fi 11 14 12 dir=$ HOME/$root/$type15 dir=$root/_backups/$type 13 16 echo $dir 14 17 … … 37 40 #mv -f $dir/* /tmp &> /dev/null 38 41 else 39 echo "usage: fml-backup.sh(daily|weekly|monthly)"42 echo "usage: $0 (daily|weekly|monthly)" 40 43 exit 1 41 44 fi 42 45 43 backup-dump-tables.sh $ root/$type46 backup-dump-tables.sh $dir 44 47 feedmelinks/bin/configure.sh
r1354 r1405 54 54 echo $domain > $root/_config/domain.txt 55 55 56 echo "3. Saving your configurations in env.inc.php (for siteapplication to read)"56 echo "3. Saving your configurations in env.inc.php (for the main application to read)" 57 57 xsltproc --$sp server-name $s --$sp mode php $xsl $xml > $root/modules/env.inc.php 58 58 … … 60 60 xsltproc --$sp server-name $s --$sp mode sh $xsl $xml > $root/bin/env.sh 61 61 62 echo "5. ...and as a perl module s format (for other maintenance scripts to read)..."62 echo "5. ...and as a perl module (for things like the AIM bot and the add-link from email script)..." 63 63 cp $root/lib/FeedMeLinks/Environment-template.pm $root/lib/FeedMeLinks/Environment.pm 64 64 xsltproc --$sp server-name $s --$sp mode perl $xsl $xml >> $root/lib/FeedMeLinks/Environment.pm 65 65 66 echo 6. FIXME: need to ALSO build a crontab file with the correct paths 66 echo "6. ...and as a crontab so that all the background processes will run at the correct times with the correct permissions" 67 crontab="$root/_config/crontab.INSTALL_ME" 68 xsltproc --$sp server-name $s --$sp mode crontab $xsl $xml > $crontab 69 echo >> $crontab 70 echo "# to edit, change $root/_config/crontab-template.txt" >> $crontab 71 cat $root/_config/crontab-template.txt >> $crontab 72 73 echo "don't forget to install your new crontab in $crontab (copy, crontab -e, paste, save, done!)" 67 74 68 75 exit 0 feedmelinks/bin/rebuild-xulbars.sh
r762 r1405 1 1 #!/bin/sh 2 2 3 cd ~/ feedmelinks.com/install/toolbar/_xul-root3 cd ~/public_html/install/toolbar/_xul-root 4 4 5 5 m=manifest