Questions tagged [shutdown-script]

11 questions
3
votes
1 answer

Error in running the shutdown-script for instance of google compute engine: gsutil failed to copy file to google cloud storage

I use a shutdown-script to backup the files on an instance before it is shutdown. In this shutdown-script, the gsutil tool is used to send files to a bucket at google cloud storage. /snap/bin/gsutil -m rsync -d -r /home/ganjin/notebook…
2
votes
1 answer

Why is the message of the shutdown pop-up cut off?

I am working on a prank Program that randomly reboots your pc while also doing other stuff. Anyways, I am currently working on the reboot part and I came up with this command: shutdown -g -t 30 -d p:2:18 -c "Dieser Computer wurde von einer externen…
TRGYT
  • 23
  • 3
2
votes
1 answer

Shutdown script not executing on Google Cloud VM

I have the following: #! /usr/bin/python3.7 f=open("python_out.txt",'w',encoding='utf-8') f.write("OK1") import socket import telegram f.write("OK2") BOT_TOKEN = "telegram BOT_TOKEN" CHAT_ID = "chat_id" bot = telegram.Bot(token=BOT_TOKEN) host_name…
0
votes
0 answers

How to give Minecraft server shutdown script (triggered at shutdown) adequate time to run before Windows 10 shuts down?

I run a Minecraft server and I have an issue when the power goes out and the UPS is getting low on battery power, it sends its shutdown command (as expected) to Windows but Windows shuts down without giving the Minecraft server time to close via a…
William
  • 71
  • 5
0
votes
1 answer

Does NW adapter powers off before Windows shutdown script is triggered?

In my usecase i need to send API call upon Windows machine shutdown/reboot. The script i created works as expected from the PowerShell console, but not when defined in gpedit.msc's shutdown scripts location. I am assuming this is because WiFi…
faceless
  • 450
  • 4
  • 15
0
votes
1 answer

shutdown function called but does not show why page crashed

All my pages have a shutdown function that sends me an email with the page parameters. I have used it to fix problems on several pages. But one page keeps crashing but does not show any calling parameters. If I call the page with no parameters, it…
Allen Edwards
  • 1,488
  • 1
  • 27
  • 44
0
votes
0 answers

Automatic shutdown of Windows 10 computer from bash script

I have a problem with my power failure monitoring scheme / automatic shutdown of Windows 10 computer. On my network I have a Linux box that has a UPS unit connected via USB and maintained with software which makes the computer shut down when power…
0
votes
1 answer

Why does SETUID not work on Raspberry Pi?

I am trying to create a shutdown command that can be run as a user, i.c., a flask web page that is not running as root. Sounds simple, just put a shutdown command in a SETUID script. Because SETUID does not work on shell scripts, I created an…
Roland
  • 4,619
  • 7
  • 49
  • 81
0
votes
0 answers

execute powershell script with popupmessage in Windows10 Shutdown

I have created a powershell script that asks me when it is executed whether a certain USB stick (name and label is defined) was correctly unmounted. But only if it's still plugged in and it has the defined driveletter). The reason is encryption…
0
votes
1 answer

Start/Stop VMs during off-hours - Azure

Need your help to find a runbook/automation script through which I could start/stop the VM's in Azure at a specific schedule & then in case we have to delay the shutdown schedule for a particular VM, it allows us to do so. Ideally, it should notify…
0
votes
2 answers

Shutdown script not executing on a Google Cloud VM

I am trying to get a shutdown script to execute using a Google Cloud compute VM. I see this output when running gcloud compute connect-to-serial-port startup-test-v Apr 8 22:01:25 startup-test-v shutdown-script: INFO Starting shutdown scripts. Apr …