comments show verbosity levels add the -G flag for debug?
#verbosity levels
#silent_lvl=0
#crt_lvl=1
#err_lvl=2
#wrn_lvl=3
#ntf_lvl=4
#inf_lvl=5
#dbg_lvl=6
#
#
#+----------------------+
#+---"Check for Root"---+
#+----------------------+
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
#
#
#+----------------------+
#+---"Set scrit name"---+
#+----------------------+
lockname=control_scripts_install.sh
#
#
#+--------------------------+
#+---Source helper script---+
#+--------------------------+
source /usr/local/bin/helper_script.sh
#
#
#+---------------------+
#+---"Set Variables"---+
#+---------------------+
udev_loc="/etc/udev/rules.d/"
sysd_loc="/etc/systemd/system/"
#set default logging level
verbosity=3
version=0.1
#
#
#+---------------------------------------+
#+---"check if script already running"---+
#+---------------------------------------+
check_running
#
#
#+-------------------+
#+---Set functions---+
#+-------------------+
helpFunction () {
echo ""
echo "Usage: $0 -u foo_user -d bar_drive"
echo "Usage: $0"
echo -e "\t Running the script with no flags causes default behaviour"
echo -e "\t-u Use this flag to specify a user to install scripts under, eg. user foo is entered -u foo, as i made these scripts for myself the defualt user is my own"
echo -e "\t-g Use this flag to specify a usergroup to install scripts under, eg. group bar is entered -g bar, combined with the -u flag these settings will be used as: chown foo:bar. As i made these scripts for myself the defualt group is my own"
echo -e "\t-d Use this flag to specify the identity of the CD/DVD/BLURAY drive being used, eg. /dev/sr1 is entered -d sr1, sr0 will be the assumed default "
exit 1 # Exit script after printing help
}
#
#
comments show verbosity levels add the -G flag for debug?