Add workaround for old ubuntu systemd
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
BindsTo=autostart.target
|
||||
After=windowmanager.target
|
||||
|
||||
ConditionEnvironment=MACHINE_HAS_DISCORD=true
|
||||
ConditionPathExists=%h/.var/run/features/discord
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/env discord
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[Unit]
|
||||
BindsTo=autostart.target
|
||||
After=windowmanager.target
|
||||
ConditionEnvironment=MACHINE_HAS_KEEPASSX=true
|
||||
ConditionPathExists=%h/.var/run/features/keepassx
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/env keepassx --keyfile %h/.secret/main.key %h/.secret/main.kdbx
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
[Unit]
|
||||
BindsTo=autostart.target
|
||||
After=windowmanager.target
|
||||
|
||||
ConditionEnvironment=MACHINE_TYPE=laptop
|
||||
ConditionPathExists=%h/.var/run/features/machine_is_laptop
|
||||
|
||||
[Service]
|
||||
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=gnome-keyring.service
|
||||
|
||||
ConditionEnvironment=MACHINE_HAS_NEXTCLOUD=true
|
||||
ConditionPathExists=%h/.var/run/features/nextcloud
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/env nextcloud --background
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[Unit]
|
||||
ConditionEnvironment=MACHINE_HAS_RESTIC_BACKUP=true
|
||||
ConditionPathExists=%h/.var/run/features/restic_backup
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
|
||||
@@ -3,7 +3,7 @@ BindsTo=autostart.target
|
||||
After=windowmanager.target
|
||||
After=i3.service
|
||||
|
||||
ConditionEnvironment=MACHINE_HAS_STEAM=true
|
||||
ConditionPathExists=%h/.var/run/features/steam
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/env steam
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[Unit]
|
||||
BindsTo=autostart.target
|
||||
After=windowmanager.target
|
||||
ConditionEnvironment=MACHINE_TYPE=laptop
|
||||
ConditionPathExists=%h/.var/run/features/machine_is_laptop
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
|
||||
@@ -54,6 +54,18 @@ umask 0022
|
||||
export {{ k }}="{{ v }}"
|
||||
{% 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
|
||||
systemctl --user import-environment
|
||||
|
||||
|
||||
Reference in New Issue
Block a user