habe ein Problem. Ich möchte in meinem Programm eine Update-Funktion einführen (also Versionsupdate). Dazu habe ich mir ein Shell-Skript geschrieben.
update_ex.sh
Code: Alles auswählen
 
#!/bin/bash
 
echo "updating the CashDesk-System please wait"
 
pid=$1
source=$2
destination=$3
 
# waitin for closeing the CashDesk-System
echo "wait for closeing the CashDesk-System"
while kill -0 $pid 2> /dev/null; do sleep 1; done;
 
# Extract and install update
tar -xf $source -C $destination
 
# Restart the CashDesk-System
reboot now
 
echo "done"
 update.sh
Code: Alles auswählen
 
#!/bin/bash
 
echo "starting update"
echo "./update_ex.sh $1 $2 $3"
 
./update_ex.sh $1 $2 $3 &
 
exit 0
 
 Code: Alles auswählen
 
CmdResponse := '';
        if not RunCommand(
          'sudo',
          ['./update.sh', IntToStr(pid), source, AppDir],
          CmdResponse
        ) then begin
          ShowMessage(CmdResponse);
        end else Application.Terminate;    
 Was mach ich falsch?

 Verein
Verein 
 Links
Links Suche
Suche