-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathiiVault.r
More file actions
53 lines (47 loc) · 2.04 KB
/
Copy pathiiVault.r
File metadata and controls
53 lines (47 loc) · 2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# \file iiVault.r
# \brief Functions to copy packages to the vault and manage permissions of vault packages.
# \author Paul Frederiks
# \author Lazlo Westerhof
# \copyright Copyright (c) 2016-2026, Utrecht University. All rights reserved.
# \license GPLv3, see LICENSE.
#\ Generic secure copy functionality
# \param[in] argv argument string for secure copy like "*publicHost inbox /var/www/landingpages/*publicPath";
# \param[in] origin_path local path of origin file
# \param[out] err return the error to calling function
#
iiGenericSecureCopy(*argv, *origin_path, *err) {
*intErr = errorcode(msiExecCmd("securecopy.sh", *argv, "", *origin_path, 1, *cmdExecOut));
*err = str(*intErr);
if (*intErr < 0 ) {
msiGetStderrInExecCmdOut(*cmdExecOut, *stderr);
msiGetStdoutInExecCmdOut(*cmdExecOut, *stdout);
writeString("serverLog", "iiGenericSecureCopy: errorcode *err");
writeString("serverLog", *stderr);
writeString("serverLog", *stdout);
}
}
# \brief Perform a vault ingest as rodsadmin.
#
iiAdminVaultIngest() {
msiExecCmd("admin-vaultingest.sh", uuClientFullName, "", "", 0, *out);
}
# \brief Perform admin operations on the vault
#
iiAdminVaultActions() {
msiExecCmd("admin-vaultactions.sh", uuClientFullName, "", "", 0, *out);
}
# \brief Prepare to archive a data package in the vault
#
iiAdminVaultArchive(*coll, *action) {
msiExecCmd("admin-vault-archive.sh", uuClientFullName ++ " " ++ *coll ++ " " ++ *action, "", "", 0, *out);
}
# \brief Prepare to deaccession a data package in the vault
#
iiAdminVaultDeaccession(*coll, *status) {
msiExecCmd("admin-vault-deaccession.sh", uuClientFullName ++ " " ++ *coll ++ " " ++ *status, "", "", 0, *out);
}
# \brief Perform copy to research from vault
#
iiAdminVaultCopyToResearch(*coll, *target, *receiver, *retryCount) {
msiExecCmd("admin-copy-to-research.sh", uuClientFullName ++ " " ++ *coll ++ " " ++ *target ++ " " ++ *receiver ++ " " ++ *retryCount, "", "", 0, *out);
}