28 lines
1.0 KiB
Desktop File
28 lines
1.0 KiB
Desktop File
[Unit]
|
|
Description=Installation des Flatpaks au premier démarrage
|
|
After=network-online.target flatpak-system-helper.service
|
|
Wants=network-online.target
|
|
ConditionPathExists=!/var/lib/flatpak/.firstboot-done
|
|
# network-online.target ne garantit pas que la resolution DNS soit deja
|
|
# operationnelle (NetworkManager atteint CONNECTED_GLOBAL avant que le
|
|
# resolver ne reponde). On autorise donc plusieurs tentatives avant d'abandonner.
|
|
StartLimitIntervalSec=600
|
|
StartLimitBurst=30
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
RemainAfterExit=yes
|
|
ExecStart=/bin/bash -c '\
|
|
flatpak remote-add --if-not-exists --system flathub https://dl.flathub.org/repo/flathub.flatpakrepo && \
|
|
flatpak install -y --system flathub runtime/org.gnome.Platform/x86_64/49 && \
|
|
flatpak install -y --system flathub io.github.kolunmi.Bazaar && \
|
|
touch /var/lib/flatpak/.firstboot-done'
|
|
# Relance la sequence si le reseau/DNS n'est pas encore pret au premier essai.
|
|
Restart=on-failure
|
|
RestartSec=15s
|
|
StandardOutput=journal
|
|
StandardError=journal
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|