-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OctoSplash! The OctoScreen Boot Screen Department of Redundency Depa… #258
base: 2.7.0-dev
Are you sure you want to change the base?
Changes from 3 commits
3ce29d6
7296300
21faa9a
6e5f7bd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/usr/bin/env bash | ||
|
||
OCTOSCREEN_DEFAULT_BOOT_SPLASH="/opt/octoscreen/styles/z-bolt/images/boot-splash/" | ||
FRAME_BUFFER=$1 | ||
|
||
if [[ -z "$FRAME_BUFFER" ]]; then | ||
echo "Unable to detect valid Frame Buffer for OctoScreen Boot Splash" | ||
else | ||
# PARSE THE USER INPUT | ||
if [[ -z "$OCTOSCREEN_BOOT_SPLASH" ]]; then | ||
OCTOSCREEN_BOOT_SPLASH="$OCTOSCREEN_DEFAULT_BOOT_SPLASH" | ||
echo "OCTOSCREEN_BOOT_SPLASH not set, using default ( $OCTOSCREEN_BOOT_SPLASH )" | ||
elif [[ -f "$OCTOSCREEN_BOOT_SPLASH" ]]; then | ||
if [[ ! $OCTOSCREEN_BOOT_SPLASH =~ .*\.png$ ]]; then | ||
OCTOSCREEN_BOOT_SPLASH="$OCTOSCREEN_DEFAULT_BOOT_SPLASH" | ||
echo "OCTOSCREEN_BOOT_SPLASH is not a valid PNG file, using default ( $OCTOSCREEN_BOOT_SPLASH )" | ||
fi | ||
elif [[ -d "$OCTOSCREEN_BOOT_SPLASH" ]]; then | ||
if [[ "$( ls -A ${OCTOSCREEN_BOOT_SPLASH}/*.png )" ]]; then | ||
OCTOSCREEN_BOOT_SPLASH="${OCTOSCREEN_BOOT_SPLASH}/*.png" | ||
else | ||
OCTOSCREEN_BOOT_SPLASH="$OCTOSCREEN_DEFAULT_BOOT_SPLASH" | ||
echo "OCTOSCREEN_BOOT_SPLASH is a directory, but doesn't contain any PNG files, using default ( $OCTOSCREEN_BOOT_SPLASH )" | ||
fi | ||
else | ||
OCTOSCREEN_BOOT_SPLASH="$OCTOSCREEN_DEFAULT_BOOT_SPLASH" | ||
echo "OCTOSCREEN_BOOT_SPLASH neither a file or directory, using default ( $OCTOSCREEN_BOOT_SPLASH )" | ||
fi | ||
|
||
# FINAL VALIDATION OF PATH | ||
if [[ ! $OCTOSCREEN_BOOT_SPLASH =~ .*\.png$ ]]; then | ||
if [[ -d "$OCTOSCREEN_BOOT_SPLASH" ]] && [[ "$( ls -A ${OCTOSCREEN_BOOT_SPLASH}/*.png )" ]]; then | ||
OCTOSCREEN_BOOT_SPLASH="${OCTOSCREEN_BOOT_SPLASH}/*.png" | ||
echo "OCTOSCREEN_BOOT_SPLASH is a directory with PNGs, globbing ( $OCTOSCREEN_BOOT_SPLASH )" | ||
else | ||
echo "OCTOSCREEN_BOOT_SPLASH is neither a PNG file, or directory with PNG files. Exiting" | ||
exit 1 | ||
fi | ||
fi | ||
|
||
if [[ ! "$( ls -A $OCTOSCREEN_BOOT_SPLASH )" ]]; then | ||
echo "Can not resolve any files from supplied path ( $OCTOSCREEN_BOOT_SPLASH ), exiting." | ||
exit 1; | ||
fi | ||
|
||
echo "Using Frame Buffer ( $FRAME_BUFFER ) and image/directory ( $OCTOSCREEN_BOOT_SPLASH )" | ||
/usr/bin/fbi --noverbose --autodown -t 1 -d $FRAME_BUFFER $OCTOSCREEN_BOOT_SPLASH | ||
fi |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ Type=notify | |
NotifyAccess=all | ||
EnvironmentFile=/etc/octoscreen/config | ||
ExecStart=/usr/bin/xinit /usr/bin/OctoScreen -- :0 -nolisten tcp -nocursor | ||
ExecStartPost=/bin/bash -xc '/usr/bin/systemctl stop --quiet octosplash && exit 0 || exit 0' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Stops the |
||
ExecStartPost=/bin/bash /etc/octoscreen/disablescreenblank.sh 0 | ||
StandardOutput=journal | ||
Restart=always | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[Unit] | ||
Description=OctoScreen Boot Splash Screen | ||
DefaultDependencies=no | ||
After=local-fs.target | ||
|
||
[Service] | ||
EnvironmentFile=/etc/octoscreen/config | ||
ExecStart=/bin/bash /etc/octoscreen/boot_splash.sh /dev/fb0 | ||
StandardOutput=journal+console | ||
StandardInput=tty | ||
|
||
[Install] | ||
WantedBy=sysinit.target | ||
WantedBy=multi-user.target |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,10 @@ override_dh_auto_build: | |
-X $(DH_GOPKG)/ui.Build=$(BUILD_DATE)\ | ||
" | ||
|
||
override_dh_installinit: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is required to install multiple services. Doesn't change any other behaviour. |
||
dh_installinit --name=octosplash | ||
dh_installinit --name=octoscreen | ||
|
||
override_dh_golang: | ||
# The dh_golang is used to add the Built-using field to the deb. This is only for reference. | ||
# https://github.com/git-lfs/git-lfs/pull/2203/files | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needed for the splash service.