Add workaround for old ubuntu systemd
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
BindsTo=autostart.target
|
BindsTo=autostart.target
|
||||||
After=windowmanager.target
|
After=windowmanager.target
|
||||||
|
|
||||||
ConditionEnvironment=MACHINE_HAS_DISCORD=true
|
ConditionPathExists=%h/.var/run/features/discord
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/usr/bin/env discord
|
ExecStart=/usr/bin/env discord
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
BindsTo=autostart.target
|
BindsTo=autostart.target
|
||||||
After=windowmanager.target
|
After=windowmanager.target
|
||||||
ConditionEnvironment=MACHINE_HAS_KEEPASSX=true
|
ConditionPathExists=%h/.var/run/features/keepassx
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/usr/bin/env keepassx --keyfile %h/.secret/main.key %h/.secret/main.kdbx
|
ExecStart=/usr/bin/env keepassx --keyfile %h/.secret/main.key %h/.secret/main.kdbx
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
BindsTo=autostart.target
|
BindsTo=autostart.target
|
||||||
After=windowmanager.target
|
After=windowmanager.target
|
||||||
|
ConditionPathExists=%h/.var/run/features/machine_is_laptop
|
||||||
ConditionEnvironment=MACHINE_TYPE=laptop
|
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/usr/bin/env bash -c 'grep "^${ACPI_LID_NAME}.*enabled" /proc/acpi/wakeup && echo " ${ACPI_LID_NAME}" | sudo tee /proc/acpi/wakeup'
|
ExecStart=/usr/bin/env bash -c 'grep "^${ACPI_LID_NAME}.*enabled" /proc/acpi/wakeup && echo " ${ACPI_LID_NAME}" | sudo tee /proc/acpi/wakeup'
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ BindsTo=autostart.target
|
|||||||
After=windowmanager.target
|
After=windowmanager.target
|
||||||
After=gnome-keyring.service
|
After=gnome-keyring.service
|
||||||
|
|
||||||
ConditionEnvironment=MACHINE_HAS_NEXTCLOUD=true
|
ConditionPathExists=%h/.var/run/features/nextcloud
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/usr/bin/env nextcloud --background
|
ExecStart=/usr/bin/env nextcloud --background
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
ConditionEnvironment=MACHINE_HAS_RESTIC_BACKUP=true
|
ConditionPathExists=%h/.var/run/features/restic_backup
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ BindsTo=autostart.target
|
|||||||
After=windowmanager.target
|
After=windowmanager.target
|
||||||
After=i3.service
|
After=i3.service
|
||||||
|
|
||||||
ConditionEnvironment=MACHINE_HAS_STEAM=true
|
ConditionPathExists=%h/.var/run/features/steam
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/usr/bin/env steam
|
ExecStart=/usr/bin/env steam
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
BindsTo=autostart.target
|
BindsTo=autostart.target
|
||||||
After=windowmanager.target
|
After=windowmanager.target
|
||||||
ConditionEnvironment=MACHINE_TYPE=laptop
|
ConditionPathExists=%h/.var/run/features/machine_is_laptop
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
|
|||||||
@@ -54,6 +54,18 @@ umask 0022
|
|||||||
export {{ k }}="{{ v }}"
|
export {{ k }}="{{ v }}"
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
export FEATURE_DIR="${RUNDIR}/features/"
|
||||||
|
rm -rf "${FEATURE_DIR}"/
|
||||||
|
mkdir -p "${FEATURE_DIR}"
|
||||||
|
|
||||||
|
[[ $MACHINE_HAS_NEXTCLOUD == "true" ]] && touch "${FEATURE_DIR}"/nextcloud
|
||||||
|
[[ $MACHINE_HAS_KEEPASSX == "true" ]] && touch "${FEATURE_DIR}"/keepassx
|
||||||
|
[[ $MACHINE_HAS_STEAM == "true" ]] && touch "${FEATURE_DIR}"/steam
|
||||||
|
[[ $MACHINE_HAS_DISCORD == "true" ]] && touch "${FEATURE_DIR}"/discord
|
||||||
|
[[ $MACHINE_HAS_RESTIC_BACKUP == "true" ]] && touch "${FEATURE_DIR}"/restic_backup
|
||||||
|
|
||||||
|
[[ $MACHINE_TYPE == "laptop" ]] && touch "${FEATURE_DIR}"/matchine_is_laptop
|
||||||
|
|
||||||
# Make all environment variables also usable in the systemd user instancee
|
# Make all environment variables also usable in the systemd user instancee
|
||||||
systemctl --user import-environment
|
systemctl --user import-environment
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user