2

I am working on create a .deb install package for iOS, and I need the device to ask to reboot in Cydia after the package installs, how can I add such a function to my postinst script? The following is already in the script (it sets the file permissions to 755, I need the reboot to be afterwards)

#!/bin/sh
chmod 755 /usr/libexec/airtunesd
chmod 755 /System/Library/LaunchDaemons/com.apple.airtunesd.plist
exit 0

Thanks! :)

  • 1
    See this: http://stackoverflow.com/a/6503158/716216 – Mick MacCallum Dec 09 '12 at 18:08
  • He probably doesn't want to make the phone reboot directly, I assume he'd want Cydia to prompt the user to reboot after it runs dpkg in the same way it prompts the user to respring when most tweaks are installed. I don't know how to myself but I'd ask on the #theos channel at irc.saurik.com, someone there will most certainly know. – stonesam92 Dec 09 '12 at 18:15
  • @stonesam92, yes, that was the goal in mind. I defiantly will, thanks :) –  Dec 09 '12 at 20:45
  • mm.. is it normal that there are 30 people on his server yet no one will answer you? –  Dec 09 '12 at 21:07
  • @Sean Webber: Yes, it is quite common for people to only be subscribed to tags other than the ones you have been posting to. For a quick math lesson, examine how many questions are being posted every minute, and estimate how many questions those 30 people can answer per second. For what it's worth, since they didn't see your question in the first place, they probably also did not see your attempt to bump by following up here (and if they did, you would only have annoyed them, I imagine). – tripleee Dec 10 '12 at 10:14
  • I am not familiar with Cydia, but the common `deb` convention is to create the file `/var/run/reboot-required`. On my Ubuntu box, `/usr/share/update-notifier/notify-reboot-required` shows how to manipulate it. Quick googling also turned up http://www.sinfuliphone.com/showthread.php?t=60894 which appears to contain some sort of answers for Cydia below the highly educated discussion. – tripleee Dec 10 '12 at 10:15
  • 1
    just curious ... why do you want to reboot? If it's just to make sure your daemon restarts, you can use `launchctl` to do that without rebooting. – Nate Dec 19 '12 at 11:36
  • 2
    Yeah, in the apps I have that include launch daemons, i add something like this to my `postinst` script: `launchctl load -w /System/Library/LaunchDaemons/com.apple.airtunesd.plist`. That'll make sure it runs after installation, without needing a reboot. – Nate Dec 29 '12 at 02:03

0 Answers0