summarylogtreecommitdiffstats
path: root/netbox.install
diff options
context:
space:
mode:
authorAnthony Ruhier2016-10-30 02:11:30 +0100
committerAnthony Ruhier2016-10-30 02:11:30 +0100
commit9e3ef40fe1c3642291a81ef454e904eec0efe1f6 (patch)
tree61cd44e4359655970fc1d8441987f46d72278ff8 /netbox.install
downloadaur-9e3ef40fe1c3642291a81ef454e904eec0efe1f6.tar.gz
Initial commit
Diffstat (limited to 'netbox.install')
-rw-r--r--netbox.install25
1 files changed, 25 insertions, 0 deletions
diff --git a/netbox.install b/netbox.install
new file mode 100644
index 000000000000..288888fe36c1
--- /dev/null
+++ b/netbox.install
@@ -0,0 +1,25 @@
+_NAME=netbox
+
+post_install() {
+ getent passwd ${_NAME} > /dev/null || useradd -d /opt/${_NAME} -s /bin/false -r ${_NAME} > /dev/null
+
+ echo ""
+ echo -e "Follow the instructions on http://netbox.readthedocs.io/en/latest/installation/netbox/"
+ echo -e "to finish the configuration, and enable and start the systemd "
+ echo -e "service: "
+ echo " systemctl enable --now netbox.service"
+ echo ""
+}
+
+post_upgrade() {
+ post_install
+ echo ""
+ echo "To end the migration, use the following commands:"
+ echo " /opt/netbox/manage.py migrate"
+ echo " /opt/netbox/manage.py collectstatic --noinput"
+ echo ""
+}
+
+post_remove() {
+ userdel -f ${_NAME}
+}