31 lines
574 B
Bash
Executable file
31 lines
574 B
Bash
Executable file
#!/bin/bash
|
|
|
|
## Preview default plymouth splash
|
|
## Author : Aditya Shakya (adi1090x)
|
|
## Mail : adi1090x@gmail.com
|
|
## Github : @adi1090x
|
|
## Reddit : @adi1090x
|
|
|
|
## Colors
|
|
R='\033[1;31m'
|
|
B='\033[1;34m'
|
|
G='\033[1;32m'
|
|
|
|
# check if executed as root
|
|
check_root () {
|
|
if [ ! $( id -u ) -eq 0 ]; then
|
|
echo -e $R"Must be run as root"
|
|
exit
|
|
fi
|
|
}
|
|
|
|
check_root
|
|
|
|
# duration in seconds, default is 10s
|
|
duration=$1
|
|
|
|
if [ $# -ne 1 ]; then
|
|
duration=10
|
|
fi
|
|
|
|
plymouthd; plymouth --show-splash ; for ((I=0; I<$duration; I++)); do plymouth --update=test$I ; sleep 1; done; plymouth quit
|