UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Reboot from terminal?

    Scheduled Pinned Locked Moved Support
    3 Posts 2 Posters 843 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • G Offline
        Grisen
        last edited by

        How do I reboot my phone from the terminal, without having to type the password? I have a cron-job running to check connectivity, and I would like the script to able to boot the phone under certain circumstances. I tried adding: Cmnd_Alias SHUTDOWN_CMDS = /sbin/poweroff, /sbin/shutdown, /sbin/reboot & phablet ALL=(ALL) NOPASSWD: SHUTDOWN_CMDS with visudo after remounting / as rw, but it still prompts me. Any ideas?

        Regards

        Grisen

        1 Reply Last reply Reply Quote 0
        • T Offline
          tupp
          last edited by

          In my terminal, "sudo reboot" works. Does "reboot" or "sudo reboot" work in your cron job?

          1 Reply Last reply Reply Quote 0
          • G Offline
            Grisen
            last edited by

            Well "sudo reboot" works, but it prompts me for the password. I tried adding the job to sudo's crontab, but that doesn't work. The solution I described in post 1 works on a desktop ubuntu. After doing what I described, "sudo reboot" reboots the machine without prompting for password.

            Regards

            Grisen

            1 Reply Last reply Reply Quote 0
            • First post
              Last post