Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # This is the contents of the updated script:
- NEW_SCRIPT=$(cat << EOF
- package setup_update;
- sub process {
- return 'success';
- }
- sub display {
- my $vars = shift @_;
- my $template = shift @_;
- $$vars{'name'} = $name;
- die 'Template error: ' . $template->error . "\n" unless $template->process('setup_update.html', $vars);
- }
- '???';
- EOF
- )
- # Make a backup of the existing file just in case:
- cp /var/www/admin/setup_update.pm /var/www/admin/setup_update.pm.bak
- # Dump the new script into the old location. Note: this doesn't have to be compiled/turned into bytecode.
- # Plain-text perl scripts can be relablled .pm and used as modules.
- echo "$NEW_SCRIPT" > /var/www/admin/setup_update.pm
Add Comment
Please, Sign In to add comment