[arch-commits] Commit in jenkins-ci/trunk (jenkins-ci.install jenkins.install)
Alexander Rødseth
arodseth at nymeria.archlinux.org
Thu Aug 15 17:14:39 UTC 2013
Date: Thursday, August 15, 2013 @ 19:14:39
Author: arodseth
Revision: 95693
Permission fix
Added:
jenkins-ci/trunk/jenkins.install
(from rev 95692, jenkins-ci/trunk/jenkins-ci.install)
Deleted:
jenkins-ci/trunk/jenkins-ci.install
--------------------+
jenkins-ci.install | 51 -----------------------------------------------
jenkins.install | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 55 insertions(+), 51 deletions(-)
Deleted: jenkins-ci.install
===================================================================
--- jenkins-ci.install 2013-08-15 17:11:14 UTC (rev 95692)
+++ jenkins-ci.install 2013-08-15 17:14:39 UTC (rev 95693)
@@ -1,51 +0,0 @@
-#!/bin/sh
-
-_service_name=jenkins.service
-_service_username=jenkins
-_service_groupname="$_service_username"
-_service_home_dir=/var/lib/jenkins
-_service_tmpfiles_conf="$_service_username.conf"
-
-_is_systemd_service_enabled() {
- /usr/bin/systemctl is-enabled --quiet "$_service_name" 2>/dev/null
-}
-
-post_install() {
- getent passwd "$_service_username" > /dev/null || /usr/sbin/useradd \
- --system --user-group --home-dir "$_service_home_dir" --create-home \
- --shell '/bin/bash' --skel /dev/null "$_service_username" &> /dev/null
- [ -n "$_service_tmpfiles_conf" ] && \
- systemd-tmpfiles --create "$_service_tmpfiles_conf"
- echo 'This installation of Jenkins uses port 8090 by default.'
-}
-
-post_upgrade() {
- [ -n "$_service_tmpfiles_conf" ] && systemd-tmpfiles \
- --create "$_service_tmpfiles_conf"
- _is_systemd_service_enabled && cat <<EOF
-=> Remember to issue the following commands:
- sudo systemctl --system daemon-reload
- sudo systemctl restart $_service_name
-EOF
-}
-
-pre_remove() {
- /usr/bin/systemctl stop $_service_name 2>/dev/null
- _is_systemd_service_enabled && \
- /usr/bin/systemctl disable $_service_name 2>/dev/null
- [ -n "$_service_tmpfiles_conf" ] && systemd-tmpfiles \
- --remove "$_service_tmpfiles_conf"
- return 0
-}
-
-post_remove() {
- getent passwd "$_service_username" > /dev/null && \
- /usr/sbin/userdel "$_service_username" &>/dev/null
- for dir in "$_service_home_dir"; do
- [ -n "$dir" -a -d "$dir" ] && \
- echo "=> directory $dir needs to be removed manually"
- done
- return 0
-}
-
-# vim:set ts=2 sw=2 et:
Copied: jenkins-ci/trunk/jenkins.install (from rev 95692, jenkins-ci/trunk/jenkins-ci.install)
===================================================================
--- jenkins.install (rev 0)
+++ jenkins.install 2013-08-15 17:14:39 UTC (rev 95693)
@@ -0,0 +1,55 @@
+#!/bin/sh
+
+_service_name=jenkins.service
+_service_username=jenkins
+_service_groupname="$_service_username"
+_service_home_dir=/var/lib/jenkins
+_service_tmpfiles_conf="$_service_username.conf"
+
+_is_systemd_service_enabled() {
+ /usr/bin/systemctl is-enabled --quiet "$_service_name" 2>/dev/null
+}
+
+post_install() {
+ getent passwd "$_service_username" > /dev/null || /usr/sbin/useradd \
+ --system --user-group --home-dir "$_service_home_dir" --create-home \
+ --shell '/bin/bash' --skel /dev/null "$_service_username" &> /dev/null
+ [ -n "$_service_tmpfiles_conf" ] && \
+ systemd-tmpfiles --create "$_service_tmpfiles_conf"
+ mkdir -p /var/lib/jenkins
+ chown jenkins:jenkins /var/lib/jenkins
+ echo 'This installation of Jenkins uses port 8090 by default.'
+}
+
+post_upgrade() {
+ [ -n "$_service_tmpfiles_conf" ] && systemd-tmpfiles \
+ --create "$_service_tmpfiles_conf"
+ mkdir -p /var/lib/jenkins
+ chown jenkins:jenkins /var/lib/jenkins
+ _is_systemd_service_enabled && cat <<EOF
+=> Remember to issue the following commands:
+ sudo systemctl --system daemon-reload
+ sudo systemctl restart $_service_name
+EOF
+}
+
+pre_remove() {
+ /usr/bin/systemctl stop $_service_name 2>/dev/null
+ _is_systemd_service_enabled && \
+ /usr/bin/systemctl disable $_service_name 2>/dev/null
+ [ -n "$_service_tmpfiles_conf" ] && systemd-tmpfiles \
+ --remove "$_service_tmpfiles_conf"
+ return 0
+}
+
+post_remove() {
+ getent passwd "$_service_username" > /dev/null && \
+ /usr/sbin/userdel "$_service_username" &>/dev/null
+ for dir in "$_service_home_dir"; do
+ [ -n "$dir" -a -d "$dir" ] && \
+ echo "=> directory $dir needs to be removed manually"
+ done
+ return 0
+}
+
+# vim:set ts=2 sw=2 et:
More information about the arch-commits
mailing list