Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cc-node
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
cc-node
Commits
51b89674
Commit
51b89674
authored
14 years ago
by
Thibault VINCENT
Browse files
Options
Downloads
Patches
Plain Diff
added missing debian postinst file
parent
8ad98368
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
debian/postinst
+50
-0
50 additions, 0 deletions
debian/postinst
with
50 additions
and
0 deletions
debian/postinst
0 → 100755
+
50
−
0
View file @
51b89674
#!/bin/sh
set
-e
CONF
=
"/etc/cc-node.conf"
if
[
-f
"
$CONF
"
]
;
then
# secure the config file
chmod
0640
"
$CONF
"
# replace login by hostname if unset
if
grep
'\$\$LOGIN\$\$'
"
$CONF
"
>
/dev/null
;
then
login
=
$(
hostname
)
print
"*** CC-Node login :
${
login
}
"
sed
-e
"s/
\\\$\\\$
LOGIN
\\\$\\\$
/
${
login
}
/g"
-i
"
$CONF
"
fi
# generate a random password if unset
if
grep
'\$\$PASSWORD\$\$'
"
$CONF
"
>
/dev/null
;
then
password
=
$(
cat
/dev/urandom |
tr
-dc
A-Za-z0-9 |
head
-c
12
)
print
"*** CC-Node password :
${
password
}
"
sed
-e
"s/
\\\$\\\$
PASSWORD
\\\$\\\$
/
${
password
}
/g"
\
-i
"
$CONF
"
fi
fi
# Automatically added by dh_pycentral
rm
-f
/var/lib/pycentral/cc-node.pkgremove
if
which pycentral
>
/dev/null 2>&1
;
then
pycentral pkginstall cc-node
if
grep
-qs
'^cc-node$'
/var/lib/pycentral/delayed-pkgs
;
then
sed
-i
'/^cc-node$/d'
/var/lib/pycentral/delayed-pkgs
fi
fi
# End automatically added section
# Automatically added by dh_pycentral
rm
-f
/var/lib/pycentral/cc-node.pkgremove
if
which pycentral
>
/dev/null 2>&1
;
then
pycentral pkginstall cc-node
if
grep
-qs
'^cc-node$'
/var/lib/pycentral/delayed-pkgs
;
then
sed
-i
'/^cc-node$/d'
/var/lib/pycentral/delayed-pkgs
fi
fi
# End automatically added section
# Automatically added by dh_installinit
if
[
-x
"/etc/init.d/cc-node"
]
;
then
update-rc.d cc-node defaults
>
/dev/null
if
[
-x
"
`
which invoke-rc.d 2>/dev/null
`
"
]
;
then
invoke-rc.d cc-node start
||
exit
$?
else
/etc/init.d/cc-node start
||
exit
$?
fi
fi
# End automatically added section
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment