Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #-------------create scheduled task to execute this powershell script every day at 8am : -------------
- Stop-Process -Name "haloceded" -Force
- If((get-date).DayOfWeek -eq "Wednesday")
- {
- Copy-Item -Path "C:\path_to_init\init_race.txt" -Destination "C:\path_to_init\init.txt" -Force
- }
- else
- {
- Copy-Item -Path "C:\path_to_init\init_ctfrocket.txt" -Destination "C:\path_to_init\init.txt" -Force
- }
- Start-Process -FilePath "C:\path_to_haloceded\haloceded.exe"
- #-------------Or create cron or systemd task to execute this shell script every day at 8am : -------------
- #!/bin/bash
- ps -ef | grep haloceded | grep -v 'grep' | awk '{print $2}' | xargs kill
- if [ $(date +%u) -eq 3 ]
- then
- cp -r /path_to_init/init_race.txt /path_to_init/init.txt
- else
- cp -r /path_to_init/init_ctfrocket.txt /path_to_init/init.txt
- fi
- /path_to_haloceded/haloceded
Add Comment
Please, Sign In to add comment