Saturday, 7 February 2015

install app via cronjob topic






I have a bunch of ubuntu PC's that I have setup to regularly grab a script from my server and run it so that I can easily perform a task on each of them by just updating the script centrally.

This works great EXCEPT it seems I can't install something.

I put

Code:


apt-get update
  export DEBIAN_FRONTEND=noninteractive
  apt-get -y install screen > /root/installscreen.txt


in my script and yet - screen will not install... not unless I run the script manually... not in a cron job.

The output I get in the file is below...

Any idea how I can get this to install via a script run in a cron job?


Code:


Reading package lists...
Building dependency tree...
Reading state information...
Suggested packages:
  iselect screenie byobu
The following NEW packages will be installed:
  screen
0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.
Need to get 0 B/628 kB of archives.
After this operation, 958 kB of additional disk space will be used.








No comments:

Post a Comment