mirror of
https://github.com/YunoHost/ynh-dev.git
synced 2024-09-03 20:05:59 +02:00
[fix] Failed status borg__2
This commit is contained in:
parent
55e83478eb
commit
faf0d7e1d7
2 changed files with 55 additions and 6 deletions
37
Vagrantfile
vendored
Executable file
37
Vagrantfile
vendored
Executable file
|
@ -0,0 +1,37 @@
|
|||
# -*- mode: ruby -*-
|
||||
# vi: set ft=ruby :
|
||||
|
||||
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
|
||||
VAGRANTFILE_API_VERSION = "2"
|
||||
|
||||
NETWORK = "10.0.3."
|
||||
|
||||
HOSTS = {
|
||||
"ynh-dev" => ["83", "ynh-dev"],
|
||||
"compta" => ["85", "ynh-dev"],
|
||||
"animafac" => ["86", "ynh-dev"],
|
||||
"ynh-dev-buster" => ["84", "ynh-dev-buster"],
|
||||
}
|
||||
|
||||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||
|
||||
# Force guest type, because YunoHost /etc/issue can't be tuned
|
||||
config.vm.guest = :debian
|
||||
|
||||
HOSTS.each do | (name, cfg) |
|
||||
ipaddr, version = cfg
|
||||
|
||||
config.vm.define name do |machine|
|
||||
machine.vm.box = "yunohost/" + version
|
||||
# Force guest type, because YunoHost /etc/issue can't be tuned
|
||||
machine.vm.guest = :debian
|
||||
|
||||
machine.vm.provider "lxc" do |lxc|
|
||||
config.vm.box_url = "https://build.yunohost.org/" + version + "-lxc.box"
|
||||
config.vm.synced_folder ".", "/ynh-dev", id: "vagrant-root"
|
||||
config.vm.network :private_network, ip: NETWORK + ipaddr, lxc__bridge_name: 'lxcbr0'
|
||||
end
|
||||
end
|
||||
end # HOSTS-each
|
||||
|
||||
end
|
24
ynh-dev
24
ynh-dev
|
@ -124,8 +124,8 @@ function check_lxd_setup()
|
|||
|| critical "You might want to add lxc and lxd inside /usr/local/bin so that there's no tricky PATH issue with sudo. If you installed lxd/lxc with snapd, this should do the trick: sudo ln -s /snap/bin/lxc /usr/local/bin/lxc && sudo ln -s /snap/bin/lxd /usr/local/bin/lxd"
|
||||
fi
|
||||
|
||||
ip a | grep -q lxdbr0 \
|
||||
|| critical "There is no 'lxdbr0' interface... Did you ran 'lxd init' ?"
|
||||
ip a | grep -q lx[cd]br0 \
|
||||
|| critical "There is no 'lxcbr0' or 'lxdbr0' interface... Did you ran 'lxd init' ?"
|
||||
}
|
||||
|
||||
function start_ynhdev()
|
||||
|
@ -212,10 +212,16 @@ function show_vm_ip()
|
|||
function use_git()
|
||||
{
|
||||
assert_inside_vm
|
||||
local PACKAGES="$@"
|
||||
for PACKAGE in "$PACKAGES";
|
||||
local PACKAGES=("$@")
|
||||
|
||||
if [ "$PACKAGES" = "" ]
|
||||
then
|
||||
PACKAGES=('moulinette' 'ssowat' 'yunohost' 'yunohost-admin')
|
||||
fi
|
||||
|
||||
for i in ${!PACKAGES[@]};
|
||||
do
|
||||
case $PACKAGE in
|
||||
case ${PACKAGES[i]} in
|
||||
ssowat)
|
||||
create_sym_link "/ynh-dev/ssowat" "/usr/share/ssowat"
|
||||
success "Now using Git repository for SSOwat"
|
||||
|
@ -230,6 +236,9 @@ function use_git()
|
|||
# bin
|
||||
create_sym_link "/ynh-dev/yunohost/bin/yunohost" "/usr/bin/yunohost"
|
||||
create_sym_link "/ynh-dev/yunohost/bin/yunohost-api" "/usr/bin/yunohost-api"
|
||||
create_sym_link "/ynh-dev/yunohost/bin/yunoprompt" "/usr/bin/yunoprompt"
|
||||
create_sym_link "/ynh-dev/yunohost/bin/yunopaste" "/usr/bin/yunopaste"
|
||||
create_sym_link "/ynh-dev/yunohost/sbin/yunohost-reset-ldap-password" "/usr/sbin/yunohost-reset-ldap-password"
|
||||
|
||||
# data
|
||||
create_sym_link "/ynh-dev/yunohost/data/bash-completion.d/yunohost" "/etc/bash_completion.d/yunohost"
|
||||
|
@ -307,6 +316,9 @@ function use_git()
|
|||
warn "-------------------------------------------------------- "
|
||||
su ynhdev -c "./node_modules/gulp/bin/gulp.js watch --dev"
|
||||
|
||||
;;
|
||||
*)
|
||||
error "Invalid package '${PACKAGES[i]}': correct arguments are 'yunohost', 'ssowat', 'moulinette', 'yunohost-admin' or nothing for all"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
@ -367,4 +379,4 @@ function run_tests()
|
|||
done
|
||||
}
|
||||
|
||||
main "$@"
|
||||
main $@
|
||||
|
|
Loading…
Add table
Reference in a new issue