[freeside-commits] freeside/FS/bin freeside-addoutsource, 1.3,
1.4 freeside-addoutsourceuser, 1.8, 1.9 freeside-adduser, 1.15, 1.16
Ivan,,,
ivan at wavetail.420.am
Sun Oct 8 18:05:29 PDT 2006
Update of /home/cvs/cvsroot/freeside/FS/bin
In directory wavetail:/tmp/cvs-serv1599
Modified Files:
freeside-addoutsource freeside-addoutsourceuser
freeside-adduser
Log Message:
update the tools for dev installs
Index: freeside-adduser
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/bin/freeside-adduser,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- freeside-adduser 30 Aug 2006 15:41:29 -0000 1.15
+++ freeside-adduser 9 Oct 2006 01:05:27 -0000 1.16
@@ -22,11 +22,22 @@
# close MAPSECRETS;
#}
- open(MAPSECRETS,">>$FREESIDE_CONF/mapsecrets")
+ #insert new entry before a wildcard...
+ open(MAPSECRETS,"<$FREESIDE_CONF/mapsecrets")
and flock(MAPSECRETS,LOCK_EX)
or die "can't open $FREESIDE_CONF/mapsecrets: $!";
- print MAPSECRETS "$user $opt_s\n";
+ open(NEW,">$FREESIDE_CONF/mapsecrets.new")
+ or die "can't open $FREESIDE_CONF/mapsecrets.new: $!";
+ while(<MAPSECRETS>) {
+ if ( /^\*\s/ ) {
+ print NEW "$user $opt_s\n";
+ }
+ print NEW $_;
+ }
close MAPSECRETS or die "can't close $FREESIDE_CONF/mapsecrets: $!";
+ close NEW or die "can't close $FREESIDE_CONF/mapsecrets.new: $!";
+ rename("$FREESIDE_CONF/mapsecrets.new", "$FREESIDE_CONF/mapsecrets")
+ or die "can't move mapsecrets.new into place: $!";
}
Index: freeside-addoutsourceuser
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/bin/freeside-addoutsourceuser,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- freeside-addoutsourceuser 14 May 2006 16:47:31 -0000 1.8
+++ freeside-addoutsourceuser 9 Oct 2006 01:05:27 -0000 1.9
@@ -5,11 +5,15 @@
password=$3
realdomain=$4
-freeside-adduser -h /usr/local/etc/freeside/htpasswd \
- -s conf.DBI:Pg:dbname=$domain/secrets \
- -b \
- $username $password 2>/dev/null
+
+freeside-adduser -s conf.DBI:Pg:dbname=$domain/secrets \
+ -n \
+ $username #2>/dev/null
[ -e /usr/local/etc/freeside/dbdef.DBI:Pg:dbname=$domain ] \
- || ( freeside-setup -d $realdomain $username 2>/dev/null )
+ || ( freeside-setup -d $realdomain -u $username )
+# 2>/dev/null
+freeside-adduser -g 1 $username
+
+htpasswd -b /usr/local/etc/freeside/htpasswd $username $password
Index: freeside-addoutsource
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/bin/freeside-addoutsource,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- freeside-addoutsource 3 May 2005 13:29:38 -0000 1.3
+++ freeside-addoutsource 9 Oct 2006 01:05:27 -0000 1.4
@@ -8,8 +8,9 @@
\
chown freeside /usr/local/etc/freeside/conf.DBI:Pg:dbname=$domain && \
\
-cp /home/ivan/freeside/conf/[a-z]* /usr/local/etc/freeside/conf.DBI:Pg:dbname=$domain && \
-\
+cp /home/ivan/freeside/conf/[a-z]* /usr/local/etc/freeside/conf.DBI:Pg:dbname=$domain
+
+
touch /usr/local/etc/freeside/conf.DBI:Pg:dbname=$domain/secrets && \
\
chown freeside /usr/local/etc/freeside/conf.DBI:Pg:dbname=$domain/secrets && \
More information about the freeside-commits
mailing list