Update installer.sh
This commit is contained in:
parent
659f270b5f
commit
ecbfe910b0
12
installer.sh
12
installer.sh
|
@ -1,29 +1,39 @@
|
||||||
#/bin/bash
|
#/bin/bash
|
||||||
|
|
||||||
|
set -eou pipefail
|
||||||
|
|
||||||
# Create systemd user directory
|
# Create systemd user directory
|
||||||
echo "Create systemd user directory."
|
echo "Create systemd user directory."
|
||||||
mkdir -vp ~/.config/systemd/user
|
mkdir -vp ~/.config/systemd/user
|
||||||
|
echo
|
||||||
|
|
||||||
# Copy unit files
|
# Copy unit files
|
||||||
echo "Copy unit files."
|
echo "Copy unit files."
|
||||||
cp -v theme-switcher.{service,timer} ~/.config/systemd/user
|
cp -v theme-switcher.{service,timer} ~/.config/systemd/user
|
||||||
|
echo
|
||||||
|
|
||||||
# Add username to service file
|
# Add username to service file
|
||||||
echo "Edit service unit file."
|
echo "Edit service unit file."
|
||||||
sed -i "s/username/$(whoami)/g" ~/.config/systemd/user/theme-switcher.service
|
sed -i "s/username/$(whoami)/g" ~/.config/systemd/user/theme-switcher.service
|
||||||
|
echo
|
||||||
|
|
||||||
# Make directory for scripts
|
# Make directory for scripts
|
||||||
echo "Create script directory in /home."
|
echo "Create script directory in /home."
|
||||||
mkdir -vp ~/.theme-switcher
|
mkdir -vp ~/.theme-switcher
|
||||||
|
echo
|
||||||
|
|
||||||
# Copy script file
|
# Copy script file
|
||||||
echo "Copy script into directory."
|
echo "Copy script into directory."
|
||||||
cp -v *.sh ~/.theme-switcher
|
cp -v *.sh ~/.theme-switcher
|
||||||
|
echo
|
||||||
|
|
||||||
# Enable and start timer
|
# Enable and start timer
|
||||||
echo "Enabling timer."
|
echo "Enabling timer."
|
||||||
systemctl --user enable theme-switcher.timer
|
systemctl --user enable theme-switcher.timer
|
||||||
|
echo
|
||||||
echo "Starting timer."
|
echo "Starting timer."
|
||||||
systemctl --user start theme-switcher.timer
|
systemctl --user start theme-switcher.timer
|
||||||
|
echo
|
||||||
echo "Starting service."
|
echo "Starting service."
|
||||||
systemctl --user start theme-switcher
|
systemctl --user start theme-switcher
|
||||||
|
echo
|
Loading…
Reference in New Issue