Projects
jsj
jsj-installtools
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 26
View file
jsj-installtools.spec
Changed
@@ -15,7 +15,7 @@ Source4: PrepareMysqlBackup Source5: PrepareNagiosTests Source6: PrepareUpdateCrontab -Source7: PreparePureFTPd +Source7: PrepareFTPd Source8: PreparePostfix Source21: nagiosok.html Source22: vhost.conf
View file
CreateConfig
Changed
@@ -3,11 +3,11 @@ MYSQLPW="" APACHE=0 APACHEHOST="" -PUREFTPD=0 -PUREFTPDPW="" +FTPD=0 +FTPDPW="" YES="" if $# -lt 1 ; then - echo "call: $0 MYSQL=mysqlpassword APACHE=hostname PUREFTPD=pureftpdpassword" + echo "call: $0 MYSQL=mysqlpassword APACHE=hostname FTPD=ftpdpassword" exit 1 fi while ! -z $1 ; do @@ -30,12 +30,12 @@ exit 1 fi ;; - pureftpd=*|PUREFTPD=*) AW=${1##*=} + ftpd=*|FTPD=*) AW=${1##*=} if ! -z $AW ; then - PUREFTPDPW=$AW - PUREFTPD=1 + FTPDPW=$AW + FTPD=1 else - echo no pureftpd user password! + echo no ftpd user password! exit 1 fi ;; @@ -45,9 +45,9 @@ esac shift done -if $PUREFTPD = 1 ; then +if $FTPD = 1 ; then if $APACHE = 0 ; then - echo pure-ftpd without apache not feasible. + echo ftpd without apache not feasible. exit 1 fi fi @@ -58,7 +58,7 @@ echo " $MYSQLPW";; esac echo "Setup Apache for hostname(s): $APACHEHOST" -echo "Setup pure-ftpd to Apache for User:$APACHEHOST w/ PW $PUREFTPDPW" +echo "Setup pure-ftpd to Apache for User:$APACHEHOST w/ PW $FTPDPW" echo "correct? (yes/NO)" read AW if -z $AW ; then YES=no; else YES=$AW; fi @@ -79,9 +79,9 @@ /usr/share/jsjinstalltools/PrepareApacheConfig $APACHEHOST echo $? echo - if $PUREFTPD = 1 ; then - echo PreparePureFTPd $APACHEHOST - /usr/share/jsjinstalltools/PreparePureFTPd $APACHEHOST $PUREFTPDPW + if $FTPD = 1 ; then + echo PrepareFTPd $APACHEHOST + /usr/share/jsjinstalltools/PrepareFTPd $APACHEHOST $FTPDPW echo $? echo fi
View file
PrepareApacheConfig
Changed
@@ -15,6 +15,8 @@ for h in $HOSTNAME s$HOSTNAME; do mkdir -p /srv/www/$h/htdocs /srv/www/$h/cgi-bin done +chmod 775 /srv/www/$HOSTNAME/* +chgrp www /srv/www/$HOSTNAME/* if -f $JSJSHARE/nagiosok.html ; then cp $JSJSHARE/nagiosok.html /srv/www/s$HOSTNAME/htdocs else
View file
PrepareFTPd
Added
@@ -0,0 +1,36 @@ +#!/bin/bash +if $# != 2 ; then + echo usage: $0 user password + exit +fi +if -f /etc/SuSE-release ; then + VERSION=$(egrep VERSION /etc/SuSE-release | cut -f2 -d= | tr -d " ") +else + echo No file /etc/SuSE-release available. Stop. + exit 1 +fi +USER=$1 +USERPW=$2 +CRYPTPW=$(mkpasswd $USERPW) +useradd -c $USER -d /home/$USER -m -s /bin/bash -p $CRYPTPW $USER +ln -s /srv/www/$USER /home/$USER/www +GROUPFILE=$(mktemp /tmp/group.XXXXXXXXXXX) +sed -e "s/\(^www.*$\)/\1$USER/" < /etc/group > $GROUPFILE +mv $GROUPFILE /etc/group +if ${VERSION%%.*} -ge 12 ; then + zypper -n in -l vsftpd + cp /etc/vsftpd.conf /etc/vsftpd.conf.orig + sed -e 's/^\(write_enable=\).*$/\1YES/' -e 's/^\(local_umask=\).*$/\1 002/' \ + -e 's/^(anonymous_enable=\).*$/\1NO/' < /etc/vsftpd.conf.orig > /etc/vsftpd.conf + systemctl start vsftpd.service + systemctl enable vsftpd.service +else + zypper -n in -l pure-ftpd + cp /etc/pure-ftpd/pure-ftpd.conf /etc/pure-ftpd/pure-ftpd.conf.orig + sed -e 's/\(AnonymousOnly *\)yes/\1no/' -e 's/\(NoAnonymous *\)no/\1yes/' \ + -e 's/#Umask.*$/Umask 133:022/' -e 's/\(AutoRename *\)yes/\1no/' \ + -e 's/\(NoRename *\)yes/\1no/' < /etc/pure-ftpd/pure-ftpd.conf.orig \ + > /etc/pure-ftpd/pure-ftpd.conf + rcpure-ftpd start + insserv pure-ftpd +fi
View file
PreparePureFTPd
Deleted
@@ -1,33 +0,0 @@ -#!/bin/bash -if $# != 2 ; then - echo usage: $0 user password - exit -fi -if -f /etc/SuSE-release ; then - VERSION=$(egrep VERSION /etc/SuSE-release | cut -f2 -d= | tr -d " ") -else - echo No file /etc/SuSE-release available. Stop. - exit 1 -fi -USER=$1 -USERPW=$2 -CRYPTPW=$(mkpasswd $USERPW) -useradd -c $USER -d /home/$USER -m -s /bin/bash -p $CRYPTPW $USER -ln -s /srv/www/$USER /home/$USER/www -GROUPFILE=$(mktemp /tmp/group.XXXXXXXXXXX) -sed -e "s/\(^www.*$\)/\1$USER/" < /etc/group > $GROUPFILE -mv $GROUPFILE /etc/group -zypper -n in -l pure-ftpd -PUREFTPD_CONF=$(mktemp /tmp/pure-ftpd.conf.XXXXXXXXXXX) -cp /etc/pure-ftpd/pure-ftpd.conf /etc/pure-ftpd/pure-ftpd.conf.orig -sed -e 's/\(AnonymousOnly *\)yes/\1no/' -e 's/\(NoAnonymous *\)no/\1yes/' \ - -e 's/#Umask.*$/Umask 133:022/' -e 's/\(AutoRename *\)yes/\1no/' \ - -e 's/\(NoRename *\)yes/\1no/' < /etc/pure-ftpd/pure-ftpd.conf.orig \ - > /etc/pure-ftpd/pure-ftpd.conf -if ${VERSION%%.*} -ge 12 ; then - systemctl start pure-ftpd.service - systemctl enable pure-ftpd.service -else - rcpure-ftpd start - insserv pure-ftpd -fi
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.