FileWave Alliance

The Official Community Forum

TOPIC: Shutdown Apple application upon start

Shutdown Apple application upon start 11 Feb 2015 18:39 #1626

  • Michael Giardina
  • Michael Giardina's Avatar Topic Author
  • Offline
  • 2nd Level - Yellow Belt
  • 2nd Level - Yellow Belt
  • Posts: 5
  • Thank you received: 1
I have been running a script that essentially kills an app every 3 minutes if it is running. I would like to find a better way to do this as I am starting to have a number of apps I want to shutdown like this. For example, our school system doesn't want students to use Skype, but they can download it onto a thumbdrive and run it from that. My script can query the processes and shutdown the process if it sees it, but only every 3 minutes.

Any suggestions?

Shutdown Apple application upon start 11 Feb 2015 18:51 #1627

  • Darcey Steinsberger
  • Darcey Steinsberger's Avatar
  • Offline
  • FileWave Staff
  • FileWave Staff
  • Posts: 3
  • Thank you received: 2
Hi Mike,

You could use a Launch Daemon to call a script to kill those applications. I have attached an example fileset that loads the /Library/LaunchDaemons/com.killrestricted.plist. The LaunchDaemon is set to run every 5 seconds (maybe excessive :) )
The LaunchDaemon calls the script at /usr/local/etc/killrestricted.sh which is looking for instances of facetime and messages. You can just modify that killrestricted.sh to look for the apps you are wanting to terminate.

Thanks,

Darcey
Attachments:
The following user(s) said Thank You: Michael Giardina, Bjorn.Pettersen
Darcey
Consulting Engineer
FileWave (USA) Inc

Shutdown Apple application upon start 19 Mar 2015 09:55 #1699

  • Bjorn.Pettersen
  • Bjorn.Pettersen's Avatar
  • Offline
  • 2nd Level - Yellow Belt
  • 2nd Level - Yellow Belt
  • Posts: 18
  • Thank you received: 0
Had a go at this to block all Torrent apps here on our mac´s.

The script looks like this:
#!/bin/sh

transmissioninstances=$(ps -xa |grep Transmission |grep -v grep |awk {'print $1'})

kill $transmissioninstances

utorrentinstances=$(ps -xa |grep uTorrent |grep -v grep |awk {'print $1'})

kill $utorrentinstances

bittorrentinstances=$(ps -xa |grep Bittorrent |grep -v grep |awk {'print $1'})

kill $bittorrentinstances

vuzeinstances=$(ps -xa |grep Vuze |grep -v grep |awk {'print $1'})

kill $vuzeinstances

µtorrentinstances=$(ps -xa |grep µTorrent |grep -v grep |awk {'print $1'})

kill $µtorrentinstances

xtorrentinstances=$(ps -xa |grep XTorrent |grep -v grep |awk {'print $1'})

kill $xtorrentinstances

bitrockerinstances=$(ps -xa |grep BitRocker |grep -v grep |awk {'print $1'})

kill $bitrockerinstances

exit 0

But Im getting "Script execution failure" in client info

LOG:
491|0x00007f972ad01540|INFO|CLIENT|Done activating all 3 files of fileset ID Kill Torrent application in 5 sec - 190315 ID: 6643621, version 4
493|0x00007f972ad01540|INFO|CLIENT|Executed Detached (async): /usr/local/etc/install.killrestricted.sh at working path: /usr/local/etc/


Anyone that has some input ?

With best regards

Bjørn & Eirik

Shutdown Apple application upon start 19 Mar 2015 13:24 #1700

  • Gilbert Palau
  • Gilbert Palau's Avatar
  • Offline
  • 2nd Level - Yellow Belt
  • 2nd Level - Yellow Belt
  • ._______.
  • Posts: 108
  • Karma: 10
  • Thank you received: 26

Michael.Giardina wrote: I have been running a script that essentially kills an app every 3 minutes if it is running. I would like to find a better way to do this as I am starting to have a number of apps I want to shutdown like this. For example, our school system doesn't want students to use Skype, but they can download it onto a thumbdrive and run it from that. My script can query the processes and shutdown the process if it sees it, but only every 3 minutes.

Any suggestions?


You could build a profile management restriction and block Skype for example. That is how we block Minecraft on the Enterprise...
--
Gilbert Palau
Desktop Engineering
FileWave Admin
Dallas, TX
enterpriseosx.com

Shutdown Apple application upon start 19 Mar 2015 13:26 #1701

  • John Robertson
  • John Robertson's Avatar
  • Offline
  • 2nd Level - Yellow Belt
  • 2nd Level - Yellow Belt
  • Posts: 36
  • Thank you received: 1
Are you able to share more details on the management restriction profile. I have tried this, but have been unsuccessful.
John Robertson | Technology Coordinator
Ravenna Public Schools | 12322 Stafford Street | Ravenna, MI 49451

Shutdown Apple application upon start 19 Mar 2015 13:39 #1702

  • Gilbert Palau
  • Gilbert Palau's Avatar
  • Offline
  • 2nd Level - Yellow Belt
  • 2nd Level - Yellow Belt
  • ._______.
  • Posts: 108
  • Karma: 10
  • Thank you received: 26

bjorn.pettersen wrote: Had a go at this to block all Torrent apps here on our mac´s.


I would highly suggest you do this with your infrastructure firewall, rather than the client itself. Aside from that I would make a profile manager restriction and make a remove of all .torrent files or a black list of all torrent applications.

That way you control the entire architecture rather than go one endpoint at a time (even if you push it to everyone...)
--
Gilbert Palau
Desktop Engineering
FileWave Admin
Dallas, TX
enterpriseosx.com

Shutdown Apple application upon start 19 Mar 2015 15:41 #1703

  • Gilbert Palau
  • Gilbert Palau's Avatar
  • Offline
  • 2nd Level - Yellow Belt
  • 2nd Level - Yellow Belt
  • ._______.
  • Posts: 108
  • Karma: 10
  • Thank you received: 26

robertson.john wrote: Are you able to share more details on the management restriction profile. I have tried this, but have been unsuccessful.


Yeah sure!... Let me do some screenshots and I'll reply to you shortly.

Are you at the conference by any chance?
--
Gilbert Palau
Desktop Engineering
FileWave Admin
Dallas, TX
enterpriseosx.com

Shutdown Apple application upon start 19 Mar 2015 15:42 #1704

  • John Robertson
  • John Robertson's Avatar
  • Offline
  • 2nd Level - Yellow Belt
  • 2nd Level - Yellow Belt
  • Posts: 36
  • Thank you received: 1
Thank you. Yes, I am the conference.
John Robertson | Technology Coordinator
Ravenna Public Schools | 12322 Stafford Street | Ravenna, MI 49451

Shutdown Apple application upon start 19 Mar 2015 16:27 #1705

  • Gilbert Palau
  • Gilbert Palau's Avatar
  • Offline
  • 2nd Level - Yellow Belt
  • 2nd Level - Yellow Belt
  • ._______.
  • Posts: 108
  • Karma: 10
  • Thank you received: 26

robertson.john wrote: Thank you. Yes, I am the conference.


I am too, I have a red polo and black jeans and sneakers, my number is 817.564.4731, ring me and I'll show you...
--
Gilbert Palau
Desktop Engineering
FileWave Admin
Dallas, TX
enterpriseosx.com

Shutdown Apple application upon start 19 Mar 2015 17:00 #1706

  • Michael Giardina
  • Michael Giardina's Avatar Topic Author
  • Offline
  • 2nd Level - Yellow Belt
  • 2nd Level - Yellow Belt
  • Posts: 5
  • Thank you received: 1
I'll look for you too. I want to ping you about the Java 8 preferences.

Shutdown Apple application upon start 19 Mar 2015 17:13 #1707

  • Gilbert Palau
  • Gilbert Palau's Avatar
  • Offline
  • 2nd Level - Yellow Belt
  • 2nd Level - Yellow Belt
  • ._______.
  • Posts: 108
  • Karma: 10
  • Thank you received: 26
yeah sure, we should get together this afternoon after the QA's with the FileWave team.
--
Gilbert Palau
Desktop Engineering
FileWave Admin
Dallas, TX
enterpriseosx.com

Shutdown Apple application upon start 23 Mar 2015 06:52 #1708

  • Bjorn.Pettersen
  • Bjorn.Pettersen's Avatar
  • Offline
  • 2nd Level - Yellow Belt
  • 2nd Level - Yellow Belt
  • Posts: 18
  • Thank you received: 0

unimis wrote:

bjorn.pettersen wrote: Had a go at this to block all Torrent apps here on our mac´s.


I would highly suggest you do this with your infrastructure firewall, rather than the client itself. Aside from that I would make a profile manager restriction and make a remove of all .torrent files or a black list of all torrent applications.

That way you control the entire architecture rather than go one endpoint at a time (even if you push it to everyone...)


We do block it with FW but workarounds are shared among the students.
A new infrastructure with a lot better FW + + are on its way but it will take some 3y to implement it all.
Thats why we where looking at a scripts that kills the torrent apps even if they are on a disk-img. :)

:)