BackupPC-users

Re: [BackupPC-users] Pre/PostUserCmd: More than one?

2013-09-17 08:49:16
Subject: Re: [BackupPC-users] Pre/PostUserCmd: More than one?
From: "Tyler J. Wagner" <tyler AT tolaris DOT com>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Tue, 17 Sep 2013 14:47:53 +0200
On 2013-09-17 14:41, Les Mikesell wrote:
> Backuppc is going to run the command with exec(), not system() so I
> don't think passing a double-quoted string is going to work even if
> you execute your own shell to parse it.   Is there some problem with
> putting the commands in a shell script file and making that your
> command?

I run only one command, but you can run multiple subshells under it with
backticks. For instance, this displays a notification to the user:

$sshPath -q -x -l root $host su `/bin/echo $user | /bin/sed 's/@.*//'` -c
"DISPLAY=':0' /usr/bin/notify-send \"BackupPC on venkman\" \"Beginning
$type backup on $client at `/bin/date +'%Y-%m-%d %T %Z'`\""

Regards,
Tyler

-- 
"Privacy has to be viewed in the context of relative power. For example,
the government has a lot more power than the people. So privacy for
the government increases their power and increases the power imbalance
between government and the people; it decreases liberty. Forced openness
in government – open government laws, Freedom of Information Act
filings, the recording of police officers and other government officials,
WikiLeaks – reduces the power imbalance between government and the
people, and increases liberty."
   -- Bruce Schneier

------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/