Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- ## FILE: HDSentinel_script_save-xfce (see the summary at the end of the script)
- ##
- ## DESCRIPTION: Script for launching HDSentinel from a desktop icon into a gnome-terminal profile named HoldOpen that will hold the terminal window open after HDSentinel has ended.
- ## script also will generate and save a report with a date/time stamped filename.
- ##
- ## AUTHOR: Marc Sayer <marcsayer56@gmail.com>
- ##
- ## DATE: Mon, Jan 20 2014 23:43:23
- ##
- ## MODIFIED: Sat, March 8 2014 00:35:41
- ##
- ## VERSION: 3
- ##
- ## Script has been tested in Ubuntu 13.04 and Zorin 7 Core, in both 32 & 64 bit versions - gnome-teminal is the terminal emulator in the Gnome DE (Desktop Environment).
- ## Some Ubuntu based distros may use a different DE, but may still include Gnome functionality, Zorin 7 CORE is an exmaple of this.
- ## This bash script is very basic. It is for folks who are not familiar with scripting and/or are new to Linux.
- ## If you know your way around a script, you probably do not need it and can get this done on your own.
- ## If you know enough to have a terminal emulator of preference, this will be baby steps to you.
- ## This is aimed at folks who don't spend a lot of time outside of the GUIs.
- ## To create the terminal profile HoldOpen needed to hold open the window after HDSentinel completes, please see the readme file.
- ## change to folder where HDSentinel is located
- cd ~/HDSentinel
- ## Get date/time, determine format, and save as variable "DATE"
- DATE=`date '+-%Y-%m-%d-%H:%M'`
- ## Open gnome-terminal using the profile "HoldOpen", execute HDSentinel, generate and save HDSentinel report with creation "DATE" in the filename.
- # gnome-terminal --window-with-profile=HoldOpen -e "sudo ./HDSentinel -html -r report-$DATE"
- ## Open xfce4-terminal using do not close window (exec bash), execute HDSentinel, generate and save HDSentinel report with creation "DATE" in the filename.
- xfce4-terminal -e "bash -c 'sudo ./HDSentinel -html -r report-$DATE ; exec bash'"
- ## Script has been tested in Debian 10 Buster, in both 64 bit versions - xfce4-terminal is the terminal emulator in the Cinnamon DE (Desktop Environment).
- ## FORK: kimarite
- ## MODIFIED: Sun, April 4 2021 20:21:41
Add Comment
Please, Sign In to add comment