1
0
Fork 0
mirror of https://codeberg.org/Mo8it/server_dotfiles.git synced 2024-12-04 23:50:31 +00:00

Update podman-default-create

This commit is contained in:
Mo 2023-08-17 23:56:32 +02:00
parent d27c1a7c2f
commit 3088533580

View file

@ -5,23 +5,14 @@ set -p PATH "$HOME/.cargo/bin"
function podman-default-create -w podman
set -l container_name $argv[1]
if systemctl --user is-enabled container-$container_name
systemctl --user disable --now container-$container_name
end
if podman container exists $container_name
podman stop $container_name
end
podman create \
--name $container_name \
--replace \
--tz local \
$argv[2..]
-e TZ=Europe/Berlin \
$argv[2..]; or return 1
set -l old_pwd (pwd)
cd ~/.config/systemd/user
podman generate systemd --new --files --name $container_name
cd $old_pwd
podman generate systemd --no-header --new --name $container_name >~/.config/systemd/user/container-$container_name.service; or return 1
systemctl --user enable --now container-$container_name
end