},
'useradd_stdin' => { label=>'Insert command STDIN',
type =>'textarea',
- default=>"",
+ default=>'',
},
'userdel' => { label=>'Delete command',
default=>'userdel $username',
},
'usermod_stdin' => { label=>'Modify command STDIN',
type =>'textarea',
- default=>"",
+ default=>'',
},
;
},
;
+tie my %www_shellcommands_options, 'Tie::IxHash',
+ 'user' => { lable=>'Remote username', default=>'root' },
+ 'useradd' => { label=>'Insert command',
+ default=>'mkdir /var/www/$zone; chown $username /var/www/$zone; ln -s /var/www/$zone $homedir/$zone',
+ },
+ 'userdel' => { label=>'Delete command',
+ default=>'[ -n "$zone" ] && rm -rf /var/www/$zone; rm $homedir/$zone',
+ },
+ 'usermod' => { label=>'Modify command',
+ default=>'[ -n "$old_zone" ] && rm $old_homedir/$old_zone; [ "$old_zone" != "$new_zone" -a -n "$new_zone" ] && mv /var/www/$old_zone /var/www/$new_zone; [ "$old_username" != "$new_username" ] && chown -R $new_username /var/www/$new_zone; ln -s /var/www/$new_zone $new_homedir/$new_zone',
+ },
+;
+
tie my %textradius_options, 'Tie::IxHash',
'user' => { label=>'Remote username', default=>'root' },
'users' => { label=>'users file location', default=>'/etc/raddb/users' },
'svc_www' => {
'www_shellcommands' => {
- 'desc' => 'www_shellcommands',
- 'options' => {}, # \%www_shellcommands_options,
- 'notes' => 'unfinished...',
+ 'desc' => 'Run remote commands via SSH, for virtual web sites.',
+ 'options' => \%www_shellcommands_options,
+ 'notes' => 'Run remote commands via SSH, for virtual web sites. You will need to <a href="../docs/ssh.html">setup SSH for unattended operation</a>.',
},
},