[freeside-commits] freeside/FS/FS/part_export www_shellcommands.pm, 1.16.4.1, 1.16.4.2
Jeff Finucane,420,,
jeff at wavetail.420.am
Wed Dec 12 13:18:47 PST 2007
Update of /home/cvs/cvsroot/freeside/FS/FS/part_export
In directory wavetail:/tmp/cvs-serv11507
Modified Files:
Tag: FREESIDE_1_7_BRANCH
www_shellcommands.pm
Log Message:
add suspend/unsuspend to www_shellcommands export (#1227)
Index: www_shellcommands.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_export/www_shellcommands.pm,v
retrieving revision 1.16.4.1
retrieving revision 1.16.4.2
diff -u -d -r1.16.4.1 -r1.16.4.2
--- www_shellcommands.pm 22 Jun 2007 17:22:25 -0000 1.16.4.1
+++ www_shellcommands.pm 12 Dec 2007 21:18:44 -0000 1.16.4.2
@@ -18,6 +18,12 @@
'usermod' => { label=>'Modify command',
default=>'[ -n "$old_zone" ] && rm /var/www/$old_zone; [ "$old_zone" != "$new_zone" -a -n "$new_zone" ] && ( mv $old_homedir/$old_zone $new_homedir/$new_zone; ln -sf $new_homedir/$new_zone /var/www/$new_zone ); [ "$old_username" != "$new_username" ] && chown -R $new_username $new_homedir/$new_zone; ln -sf $new_homedir/$new_zone /var/www/$new_zone',
},
+ 'suspend' => { label=>'Suspension command',
+ default=>'[ -n "$zone" ] && chmod 0 /var/www/$zone',
+ },
+ 'unsuspend'=> { label=>'Unsuspension command',
+ default=>'[ -n "$zone" ] && chmod 755 /var/www/$zone',
+ },
;
%info = (
@@ -35,6 +41,8 @@
this.form.useradd.value = "mkdir $homedir/$zone; chown $username $homedir/$zone; ln -s $homedir/$zone /var/www/$zone";
this.form.userdel.value = "[ -n \"$zone\" ] && rm -rf /var/www/$zone; rm -rf $homedir/$zone";
this.form.usermod.value = "[ -n \"$old_zone\" ] && rm /var/www/$old_zone; [ \"$old_zone\" != \"$new_zone\" -a -n \"$new_zone\" ] && ( mv $old_homedir/$old_zone $new_homedir/$new_zone; ln -sf $new_homedir/$new_zone /var/www/$new_zone ); [ \"$old_username\" != \"$new_username\" ] && chown -R $new_username $new_homedir/$new_zone; ln -sf $new_homedir/$new_zone /var/www/$new_zone";
+ this.form.suspend.value = "[ -n \"$zone\" ] && chmod 0 /var/www/$zone";
+ this.form.unsuspend.value = "[ -n \"$zone\" ] && chmod 755 /var/www/$zone";
'>
<LI>
<INPUT TYPE="button" VALUE="FrontPage extensions" onClick='
@@ -42,6 +50,8 @@
this.form.useradd.value = "/usr/local/frontpage/version5.0/bin/owsadm.exe -o install -p 80 -m $zone -xu $username -xg www-data -s /etc/apache/httpd.conf -u $username -pw $_password";
this.form.userdel.value = "/usr/local/frontpage/version5.0/bin/owsadm.exe -o uninstall -p 80 -m $zone -s /etc/apache/httpd.conf";
this.form.usermod.value = "";
+ this.form.suspend.value = "";
+ this.form.unsuspend.value = "";
'>
<LI>
<INPUT TYPE="button" VALUE="ISPMan CLI" onClick='
@@ -49,6 +59,8 @@
this.form.useradd.value = "/usr/local/ispman/bin/ispman.addvhost -d $domain $bare_zone";
this.form.userdel.value = "/usr/local/ispman/bin/ispman.deletevhost -d $domain $bare_zone";
this.form.usermod.value = "";
+ this.form.suspend.value = "";
+ this.form.unsuspend.value = "";
'></UL>
The following variables are available for interpolation (prefixed with
<code>new_</code> or <code>old_</code> for replace operations):
@@ -78,6 +90,16 @@
$self->_export_command('userdel', @_);
}
+sub _export_suspend {
+ my($self) = shift;
+ $self->_export_command('suspend', @_);
+}
+
+sub _export_unsuspend {
+ my($self) = shift;
+ $self->_export_command('unsuspend', @_);
+}
+
sub _export_command {
my ( $self, $action, $svc_www) = (shift, shift, shift);
my $command = $self->option($action);
More information about the freeside-commits
mailing list