Compare commits
36 Commits
fix-1016-v
...
1.3.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0e1504556b | ||
|
|
62ed195729 | ||
|
|
4929faf2be | ||
|
|
e86d83049e | ||
|
|
97c32df3cc | ||
|
|
94bbcdb2db | ||
|
|
9d2bc631e5 | ||
|
|
639ee4992d | ||
|
|
53ccf1d4e1 | ||
|
|
06089130b2 | ||
|
|
9bc126ebd3 | ||
|
|
c004113529 | ||
|
|
993441d89f | ||
|
|
c47d8e2195 | ||
|
|
ed17abfd32 | ||
|
|
8294528c67 | ||
|
|
432569620c | ||
|
|
abd0145d4e | ||
|
|
abce6aef00 | ||
|
|
8cbe81be03 | ||
|
|
f6165c5dc6 | ||
|
|
5ff35acd1c | ||
|
|
124d11cebe | ||
|
|
0c53667839 | ||
|
|
be0f2f54a6 | ||
|
|
8356355da6 | ||
|
|
56fa7d6268 | ||
|
|
d8a5cc54f6 | ||
|
|
d452b139d7 | ||
|
|
4c00ff92ef | ||
|
|
8f2ba6cdcd | ||
|
|
2e0fbfddff | ||
|
|
4aa7062213 | ||
|
|
033abdcb69 | ||
|
|
84a4e1a319 | ||
|
|
8b3a04fb90 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,3 +0,0 @@
|
||||
# Created from https://github.com/YunoHost/example_ynh/blob/master/.gitignore
|
||||
*~
|
||||
*.sw[op]
|
||||
13
.travis.yml
13
.travis.yml
@@ -1,13 +0,0 @@
|
||||
language: php
|
||||
before_script:
|
||||
- git clone --depth 1 git://github.com/YunoHost/package_linter ../package_linter && cd ../package_linter
|
||||
- mv ../vpnclient_ynh vpnclient_ynh
|
||||
script:
|
||||
- ./package_linter.py vpnclient_ynh
|
||||
notifications:
|
||||
email: false
|
||||
irc:
|
||||
on_success: always
|
||||
on_failure: always
|
||||
channels:
|
||||
- "irc.geeknode.org#labriqueinter.net-dev"
|
||||
35
CHANGES.md
Normal file
35
CHANGES.md
Normal file
@@ -0,0 +1,35 @@
|
||||
# Changelog
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is (partially) based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
||||
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## Unreleasead
|
||||
|
||||
|
||||
## 1.3.0 - 2018-12-02
|
||||
|
||||
- [fix] Create a dedicated system user with proper sudo permissions. (#41)
|
||||
- [fix] CSRF vulnerability (#43)
|
||||
|
||||
|
||||
## 1.2.1 - 2018-09-10
|
||||
|
||||
- [fix] user/group = www-data in php-fpm config.
|
||||
|
||||
|
||||
## 1.2.0 - 2018-09-06
|
||||
|
||||
- [fix] upgrade script is now functional
|
||||
- [mod] lots of refactoring to apply app packaging best-practices
|
||||
|
||||
|
||||
## 1.1.1 - 2018-04-06
|
||||
|
||||
- [fix] Sync the date with http if ntp can't (#37)
|
||||
|
||||
|
||||
## 0.0.0 - 2016-05-14
|
||||
|
||||
First release
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# VPN Client
|
||||
[](https://travis-ci.org/labriqueinternet/vpnclient_ynh)
|
||||
# VPN Client [](https://travis-ci.org/labriqueinternet/vpnclient_ynh) [](https://ci-apps.yunohost.org/jenkins/job/vpnclient%20%28Community%29/lastBuild/consoleFull)
|
||||
[](https://install-app.yunohost.org/?app=vpnclient)
|
||||
|
||||
## Overview
|
||||
|
||||
VPN Client app for [YunoHost](http://yunohost.org/).
|
||||
|
||||
40
check_process
Normal file
40
check_process
Normal file
@@ -0,0 +1,40 @@
|
||||
;; Test complet
|
||||
; pre-install
|
||||
echo -n "Si j'avais des commandes à exécuter ce serait ici "
|
||||
; Manifest
|
||||
domain="domain.tld" (DOMAIN)
|
||||
path="/vpnconfig" (PATH)
|
||||
; Checks
|
||||
pkg_linter=1
|
||||
setup_sub_dir=1
|
||||
setup_root=0
|
||||
setup_nourl=0
|
||||
setup_private=1
|
||||
setup_public=0
|
||||
upgrade=1
|
||||
upgrade=1 from_commit=355b24ea0cd3467d7ba1390ab7d34dd4b2500229
|
||||
upgrade=1 from_commit=1fc458110660ce775f7613091cde3c5fdcfbe4e6
|
||||
backup_restore=1
|
||||
multi_instance=0
|
||||
incorrect_path=1
|
||||
port_already_use=0
|
||||
change_url=0
|
||||
;;; Levels
|
||||
Level 1=auto
|
||||
Level 2=auto
|
||||
Level 3=auto
|
||||
Level 4=0
|
||||
Level 5=auto
|
||||
Level 6=auto
|
||||
Level 7=auto
|
||||
Level 8=0
|
||||
Level 9=0
|
||||
Level 10=0
|
||||
;;; Options
|
||||
Email=pitchum@gramaton.org
|
||||
Notification=down
|
||||
#;;; Upgrade options
|
||||
# ; commit=65c382d138596fcb32b4c97c39398815a1dcd4e8
|
||||
# name=Name of this previous version
|
||||
# manifest_arg=domain=DOMAIN&path=PATH&admin=USER&password=pass&is_public=1&
|
||||
#
|
||||
13
conf/sudoers.conf
Normal file
13
conf/sudoers.conf
Normal file
@@ -0,0 +1,13 @@
|
||||
Cmnd_Alias VPNCLIENTTASKS = /bin/systemctl stop ynh-vpnclient, \
|
||||
/bin/systemctl start ynh-vpnclient, \
|
||||
/usr/local/bin/ynh-vpnclient *
|
||||
|
||||
Cmnd_Alias YUNOHOST = /usr/bin/yunohost app setting vpnclient *,\
|
||||
/usr/bin/yunohost app info hotspot *
|
||||
|
||||
Cmnd_Alias HOTSPOT = /bin/systemctl stop ynh-hotspot,\
|
||||
/bin/systemctl start ynh-hotspot,\
|
||||
/usr/bin/yunohost app setting hotspot *
|
||||
|
||||
__VPNCLIENT_SYSUSER__ ALL = NOPASSWD: /bin/grep, VPNCLIENTTASKS, YUNOHOST, HOTSPOT
|
||||
|
||||
@@ -132,7 +132,7 @@ start_openvpn() {
|
||||
# Unset firewall to let DNS and NTP resolution works
|
||||
# Firewall is reset after vpn is mounted (more details on #1016)
|
||||
unset_firewall
|
||||
|
||||
|
||||
sync_time
|
||||
|
||||
cp /etc/openvpn/client.conf{.tpl,}
|
||||
@@ -204,6 +204,20 @@ stop_openvpn() {
|
||||
sync_time() {
|
||||
systemctl stop ntp
|
||||
timeout 20 ntpd -qg &> /dev/null
|
||||
|
||||
# Some networks drop ntp port (udp 123).
|
||||
# Try to get the date with an http request on the internetcube web site
|
||||
if [ $? -ne 0 ]; then
|
||||
http_date=`curl -sD - labriqueinter.net | grep '^Date:' | cut -d' ' -f3-6`
|
||||
http_date_seconds=`date -d "${http_date}" +%s`
|
||||
curr_date_seconds=`date +%s`
|
||||
|
||||
# Set the new date if it's greater than the current date
|
||||
# So it does if 1970 year or if old fake-hwclock date is used
|
||||
if [ $http_date_seconds -ge $curr_date_seconds ]; then
|
||||
date -s "${http_date}"
|
||||
fi
|
||||
fi
|
||||
systemctl start ntp
|
||||
}
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ fi
|
||||
|
||||
# Upload cube file
|
||||
|
||||
output=$(curl -kL -F "service_enabled=${ynh_service_enabled}" -F _method=put -F "cubefile=@${cubefile_path}" "https://${ynh_domain}/${ynh_path}/?/settings" --resolve "${ynh_domain}:443:127.0.0.1" -b "${tmpdir}/cookies" 2> /dev/null | grep RETURN_MSG | sed 's/<!-- RETURN_MSG -->//' | sed 's/<\/?[^>]\+>//g' | sed 's/^ \+//g')
|
||||
output=$(curl -kL -H "X-Requested-With: yunohost-config" -F "service_enabled=${ynh_service_enabled}" -F _method=put -F "cubefile=@${cubefile_path}" "https://${ynh_domain}/${ynh_path}/?/settings" --resolve "${ynh_domain}:443:127.0.0.1" -b "${tmpdir}/cookies" 2> /dev/null | grep RETURN_MSG | sed 's/<!-- RETURN_MSG -->//' | sed 's/<\/?[^>]\+>//g' | sed 's/^ \+//g')
|
||||
|
||||
|
||||
# Configure IPv6 Delegated Prefix on Hotspot
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
{
|
||||
"name": "VPN Client",
|
||||
"id": "vpnclient",
|
||||
"version": "1.3.0",
|
||||
"packaging_format": 1,
|
||||
"description": {
|
||||
"en": "VPN Client",
|
||||
"fr": "Client VPN"
|
||||
},
|
||||
"license": "AGPL-3",
|
||||
"url": "https://github.com/labriqueinternet/vpnclient_ynh",
|
||||
"version": "1.1.0",
|
||||
"license": "AGPL-3.0",
|
||||
"maintainer": {
|
||||
"name": "Julien Vaubourg",
|
||||
"email": "julien@vaubourg.com",
|
||||
"url": "http://julien.vaubourg.com"
|
||||
"name": "pitchum",
|
||||
"email": "pitchum@users.noreply.github.com"
|
||||
},
|
||||
"multi_instance": false,
|
||||
"requirements": {
|
||||
"yunohost": ">= 2.2.0",
|
||||
"moulinette": ">= 2.4.0"
|
||||
},
|
||||
"multi_instance": false,
|
||||
"services": [
|
||||
"nginx",
|
||||
"php5-fpm",
|
||||
|
||||
@@ -1,10 +1,61 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Common variables
|
||||
# Common variables and helpers
|
||||
#
|
||||
|
||||
pkg_dependencies="php5-fpm sipcalc dnsutils openvpn curl fake-hwclock"
|
||||
|
||||
log() {
|
||||
echo "${1}"
|
||||
}
|
||||
|
||||
info() {
|
||||
log "[INFO] ${1}"
|
||||
}
|
||||
|
||||
warn() {
|
||||
log "[WARN] ${1}"
|
||||
}
|
||||
|
||||
err() {
|
||||
log "[ERR] ${1}"
|
||||
}
|
||||
to_logs() {
|
||||
|
||||
# When yunohost --verbose or bash -x
|
||||
if $_ISVERBOSE; then
|
||||
cat
|
||||
else
|
||||
cat > /dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
# Experimental helpers
|
||||
# Cf. https://github.com/YunoHost-Apps/Experimental_helpers/blob/72b0bc77c68d4a4a2bf4e95663dbc05e4a762a0a/ynh_read_manifest/ynh_read_manifest
|
||||
read_json () {
|
||||
sudo python3 -c "import sys, json;print(json.load(open('$1'))['$2'])"
|
||||
}
|
||||
|
||||
# Experimental helper
|
||||
# Cf. https://github.com/YunoHost-Apps/Experimental_helpers/blob/72b0bc77c68d4a4a2bf4e95663dbc05e4a762a0a/ynh_read_manifest/ynh_read_manifest
|
||||
read_manifest () {
|
||||
if [ -f '../manifest.json' ] ; then
|
||||
read_json '../manifest.json' "$1"
|
||||
else
|
||||
read_json '../settings/manifest.json' "$1"
|
||||
fi
|
||||
}
|
||||
|
||||
# Experimental helper
|
||||
# cf. https://github.com/YunoHost-Apps/Experimental_helpers/blob/master/ynh_abort_if_up_to_date/ynh_abort_if_up_to_date
|
||||
ynh_abort_if_up_to_date () {
|
||||
version=$(read_json "/etc/yunohost/apps/$YNH_APP_INSTANCE_NAME/manifest.json" 'version' 2> /dev/null || echo '20160501-7')
|
||||
last_version=$(read_manifest 'version')
|
||||
if [ "${version}" = "${last_version}" ]; then
|
||||
info "Up-to-date, nothing to do"
|
||||
ynh_die "" 0
|
||||
fi
|
||||
}
|
||||
|
||||
# Helper to start/stop/.. a systemd service from a yunohost context,
|
||||
# *and* the systemd service itself needs to be able to run yunohost
|
||||
@@ -41,3 +92,157 @@ function ynh_systemctl()
|
||||
mv $LOCKFILE.bkp.$$ $LOCKFILE
|
||||
}
|
||||
|
||||
# Read the value of a key in a ynh manifest file
|
||||
#
|
||||
# usage: ynh_read_manifest manifest key
|
||||
# | arg: manifest - Path of the manifest to read
|
||||
# | arg: key - Name of the key to find
|
||||
ynh_read_manifest () {
|
||||
manifest="$1"
|
||||
key="$2"
|
||||
python3 -c "import sys, json;print(json.load(open('$manifest', encoding='utf-8'))['$key'])"
|
||||
}
|
||||
|
||||
# Read the upstream version from the manifest
|
||||
# The version number in the manifest is defined by <upstreamversion>~ynh<packageversion>
|
||||
# For example : 4.3-2~ynh3
|
||||
# This include the number before ~ynh
|
||||
# In the last example it return 4.3-2
|
||||
#
|
||||
# usage: ynh_app_upstream_version
|
||||
ynh_app_upstream_version () {
|
||||
manifest_path="../manifest.json"
|
||||
if [ ! -e "$manifest_path" ]; then
|
||||
manifest_path="../settings/manifest.json" # Into the restore script, the manifest is not at the same place
|
||||
fi
|
||||
version_key=$(ynh_read_manifest "$manifest_path" "version")
|
||||
echo "${version_key/~ynh*/}"
|
||||
}
|
||||
|
||||
# Read package version from the manifest
|
||||
# The version number in the manifest is defined by <upstreamversion>~ynh<packageversion>
|
||||
# For example : 4.3-2~ynh3
|
||||
# This include the number after ~ynh
|
||||
# In the last example it return 3
|
||||
#
|
||||
# usage: ynh_app_package_version
|
||||
ynh_app_package_version () {
|
||||
manifest_path="../manifest.json"
|
||||
if [ ! -e "$manifest_path" ]; then
|
||||
manifest_path="../settings/manifest.json" # Into the restore script, the manifest is not at the same place
|
||||
fi
|
||||
version_key=$(ynh_read_manifest "$manifest_path" "version")
|
||||
echo "${version_key/*~ynh/}"
|
||||
}
|
||||
|
||||
# Exit without error if the package is up to date
|
||||
#
|
||||
# This helper should be used to avoid an upgrade of a package
|
||||
# when it's not needed.
|
||||
#
|
||||
# To force an upgrade, even if the package is up to date,
|
||||
# you have to set the variable YNH_FORCE_UPGRADE before.
|
||||
# example: sudo YNH_FORCE_UPGRADE=1 yunohost app upgrade MyApp
|
||||
#
|
||||
# usage: ynh_abort_if_up_to_date
|
||||
ynh_abort_if_up_to_date () {
|
||||
local force_upgrade=${YNH_FORCE_UPGRADE:-0}
|
||||
local package_check=${PACKAGE_CHECK_EXEC:-0}
|
||||
|
||||
local version=$(ynh_read_manifest "/etc/yunohost/apps/$YNH_APP_INSTANCE_NAME/manifest.json" "version" || echo 1.0)
|
||||
local last_version=$(ynh_read_manifest "../manifest.json" "version" || echo 1.0)
|
||||
if [ "$version" = "$last_version" ]
|
||||
then
|
||||
if [ "$force_upgrade" != "0" ]
|
||||
then
|
||||
echo "Upgrade forced by YNH_FORCE_UPGRADE." >&2
|
||||
unset YNH_FORCE_UPGRADE
|
||||
elif [ "$package_check" != "0" ]
|
||||
then
|
||||
echo "Upgrade forced for package check." >&2
|
||||
else
|
||||
ynh_die "Up-to-date, nothing to do" 0
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Operations needed by both 'install' and 'upgrade' scripts
|
||||
function vpnclient_deploy_files_and_services()
|
||||
{
|
||||
local domain=$1
|
||||
local app=$2
|
||||
local sysuser="${app}"
|
||||
|
||||
# Ensure vpnclient_ynh has its own system user
|
||||
if ! ynh_system_user_exists ${sysuser}
|
||||
then
|
||||
ynh_system_user_create ${sysuser}
|
||||
fi
|
||||
|
||||
# Ensure the system user has enough sudo permissions
|
||||
sudo install -b -o root -g root -m 0440 ../conf/sudoers.conf /etc/sudoers.d/${app}_ynh
|
||||
ynh_replace_string "__VPNCLIENT_SYSUSER__" "${sysuser}" /etc/sudoers.d/${app}_ynh
|
||||
|
||||
# Install IPv6 scripts
|
||||
sudo install -o root -g root -m 0755 ../conf/ipv6_expanded /usr/local/bin/
|
||||
sudo install -o root -g root -m 0755 ../conf/ipv6_compressed /usr/local/bin/
|
||||
|
||||
# Install command-line cube file loader
|
||||
sudo install -o root -g root -m 0755 ../conf/ynh-vpnclient-loadcubefile.sh /usr/local/bin/
|
||||
|
||||
# Copy confs
|
||||
sudo mkdir -pm 0755 /var/log/nginx/
|
||||
sudo chown root:${sysuser} /etc/openvpn/
|
||||
sudo chmod 775 /etc/openvpn/
|
||||
sudo mkdir -pm 0755 /etc/yunohost/hooks.d/post_iptable_rules/
|
||||
|
||||
sudo install -b -o root -g ${sysuser} -m 0664 ../conf/openvpn_client.conf.tpl /etc/openvpn/client.conf.tpl
|
||||
sudo install -o root -g root -m 0644 ../conf/openvpn_client.conf.tpl /etc/openvpn/client.conf.tpl.restore
|
||||
sudo install -b -o root -g root -m 0644 ../conf/nginx_vpnadmin.conf "/etc/nginx/conf.d/${domain}.d/${app}.conf"
|
||||
sudo install -b -o root -g root -m 0644 ../conf/phpfpm_vpnadmin.conf /etc/php5/fpm/pool.d/${app}.conf
|
||||
sudo install -b -o root -g root -m 0755 ../conf/hook_post-iptable-rules /etc/yunohost/hooks.d/90-vpnclient.tpl
|
||||
sudo install -b -o root -g root -m 0644 ../conf/openvpn@.service /etc/systemd/system/
|
||||
|
||||
# Copy web sources
|
||||
sudo mkdir -pm 0755 /var/www/${app}/
|
||||
sudo cp -a ../sources/* /var/www/${app}/
|
||||
|
||||
sudo chown -R root: /var/www/${app}/
|
||||
sudo chmod -R 0644 /var/www/${app}/*
|
||||
sudo find /var/www/${app}/ -type d -exec chmod +x {} \;
|
||||
|
||||
# Create certificates directory
|
||||
sudo mkdir -pm 0770 /etc/openvpn/keys/
|
||||
sudo chown root:${sysuser} /etc/openvpn/keys/
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
sudo sed "s|<TPL:NGINX_LOCATION>|${path_url}|g" -i "/etc/nginx/conf.d/${domain}.d/${app}.conf"
|
||||
sudo sed "s|<TPL:NGINX_REALPATH>|/var/www/${app}/|g" -i "/etc/nginx/conf.d/${domain}.d/${app}.conf"
|
||||
sudo sed "s|<TPL:PHP_NAME>|${app}|g" -i "/etc/nginx/conf.d/${domain}.d/${app}.conf"
|
||||
|
||||
#=================================================
|
||||
# PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
sudo sed "s|<TPL:PHP_NAME>|${app}|g" -i /etc/php5/fpm/pool.d/${app}.conf
|
||||
sudo sed "s|<TPL:PHP_USER>|${sysuser}|g" -i /etc/php5/fpm/pool.d/${app}.conf
|
||||
sudo sed "s|<TPL:PHP_GROUP>|${sysuser}|g" -i /etc/php5/fpm/pool.d/${app}.conf
|
||||
sudo sed "s|<TPL:NGINX_REALPATH>|/var/www/${app}/|g" -i /etc/php5/fpm/pool.d/${app}.conf
|
||||
|
||||
# Fix sources
|
||||
sudo sed "s|<TPL:NGINX_LOCATION>|${path_url}|g" -i /var/www/${app}/config.php
|
||||
|
||||
# Copy init script
|
||||
sudo install -o root -g root -m 0755 ../conf/ynh-vpnclient /usr/local/bin/
|
||||
sudo install -o root -g root -m 0644 ../conf/ynh-vpnclient.service /etc/systemd/system/
|
||||
|
||||
# Copy checker timer
|
||||
sudo install -o root -g root -m 0755 ../conf/ynh-vpnclient-checker.sh /usr/local/bin/
|
||||
sudo install -o root -g root -m 0644 ../conf/ynh-vpnclient-checker.service /etc/systemd/system/
|
||||
sudo install -o root -g root -m 0644 ../conf/ynh-vpnclient-checker.timer /etc/systemd/system/
|
||||
|
||||
sudo systemctl daemon-reload
|
||||
}
|
||||
|
||||
@@ -1,16 +1,82 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "backup script is not implemented"
|
||||
exit 0
|
||||
|
||||
#=================================================
|
||||
# GENERIC START
|
||||
#=================================================
|
||||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
||||
if [ ! -e _common.sh ]; then
|
||||
# Get the _common.sh file if it's not in the current directory
|
||||
cp ../settings/scripts/_common.sh ./_common.sh
|
||||
chmod a+rx _common.sh
|
||||
fi
|
||||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# MANAGE SCRIPT FAILURE
|
||||
#=================================================
|
||||
|
||||
ynh_abort_if_errors # Stop script if an error is detected
|
||||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
|
||||
backup_dir="${1}/apps/vpnclient"
|
||||
mkdir -p "${backup_dir}/"
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
sudo cp -a /etc/openvpn/keys/ "${backup_dir}/"
|
||||
sudo cp -a /etc/openvpn/client.conf.tpl "${backup_dir}/"
|
||||
final_path=$(ynh_app_setting_get $app final_path)
|
||||
domain=$(ynh_app_setting_get $app domain)
|
||||
db_name=$(ynh_app_setting_get $app db_name)
|
||||
|
||||
#=================================================
|
||||
# STANDARD BACKUP STEPS
|
||||
#=================================================
|
||||
# BACKUP THE APP MAIN DIR
|
||||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
final_path=$(ynh_app_setting_get $app final_path)
|
||||
domain=$(ynh_app_setting_get $app domain)
|
||||
|
||||
#=================================================
|
||||
# STANDARD BACKUP STEPS
|
||||
#=================================================
|
||||
# BACKUP THE APP MAIN DIR
|
||||
#=================================================
|
||||
|
||||
ynh_backup "$final_path"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
ynh_backup "/etc/nginx/conf.d/$domain.d/${app}.conf"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
ynh_backup "/etc/php5/fpm/pool.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC BACKUP
|
||||
#=================================================
|
||||
# BACKUP SYSTEMD
|
||||
#=================================================
|
||||
|
||||
ynh_backup "/etc/systemd/system/ynh-vpnclient.service"
|
||||
ynh_backup "/etc/systemd/system/ynh-vpnclient-checker.service"
|
||||
ynh_backup "/etc/systemd/system/ynh-vpnclient-checker.timer"
|
||||
|
||||
ynh_backup "/etc/cron.d/$app"
|
||||
|
||||
exit 0
|
||||
|
||||
39
scripts/helpers
Normal file
39
scripts/helpers
Normal file
@@ -0,0 +1,39 @@
|
||||
#!/bin/bash
|
||||
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#
|
||||
# Helper to start/stop/.. a systemd service from a yunohost context,
|
||||
# *and* the systemd service itself needs to be able to run yunohost
|
||||
# commands.
|
||||
#
|
||||
# Hence the need to release the lock during the operation
|
||||
#
|
||||
# usage : ynh_systemctl yolo restart
|
||||
#
|
||||
function ynh_systemctl()
|
||||
{
|
||||
local ACTION="$1"
|
||||
local SERVICE="$2"
|
||||
local LOCKFILE="/var/run/moulinette_yunohost.lock"
|
||||
|
||||
# Launch the action
|
||||
sudo systemctl "$ACTION" "$SERVICE" &
|
||||
local SYSCTLACTION=$!
|
||||
|
||||
# Save and release the lock...
|
||||
cp $LOCKFILE $LOCKFILE.bkp.$$
|
||||
rm $LOCKFILE
|
||||
|
||||
# Wait for the end of the action
|
||||
wait $SYSCTLACTION
|
||||
|
||||
# Make sure the lock is released...
|
||||
while [ -f $LOCKFILE ]
|
||||
do
|
||||
sleep 0.1
|
||||
done
|
||||
|
||||
# Restore the old lock
|
||||
mv $LOCKFILE.bkp.$$ $LOCKFILE
|
||||
}
|
||||
111
scripts/install
111
scripts/install
@@ -1,19 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
# VPN Client app for YunoHost
|
||||
# VPN Client app for YunoHost
|
||||
# Copyright (C) 2015 Julien Vaubourg <julien@vaubourg.com>
|
||||
# Contribute at https://github.com/labriqueinternet/vpnclient_ynh
|
||||
#
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
||||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
source _common.sh
|
||||
|
||||
#=================================================
|
||||
# MANAGE SCRIPT FAILURE
|
||||
@@ -38,8 +38,8 @@ ynh_abort_if_errors
|
||||
#=================================================
|
||||
|
||||
# Retrieve arguments
|
||||
domain=$YNH_APP_ARG_DOMAIN
|
||||
path_url=$YNH_APP_ARG_PATH
|
||||
domain=$1
|
||||
path_url=$2
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
@@ -49,7 +49,7 @@ app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
# Check destination directory
|
||||
final_path="/var/www/$app"
|
||||
test ! -e "$final_path" || ynh_die "This path already contains a folder"
|
||||
test ! -e "$final_path" || ynh_die "Path is already in use: ${final_path}."
|
||||
|
||||
# Normalize the url path syntax
|
||||
path_url=$(ynh_normalize_url_path "$path_url")
|
||||
@@ -75,88 +75,13 @@ ynh_app_setting_set "$app" final_path "$final_path"
|
||||
ynh_install_app_dependencies "$pkg_dependencies"
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC SETUP
|
||||
# DEPLOY FILES FROM PACKAGE
|
||||
#=================================================
|
||||
|
||||
# This is an upgrade?
|
||||
upgrade=$([ -z ${VPNCLIENT_UPGRADE+x} ] && echo true || echo false)
|
||||
vpnclient_deploy_files_and_services "${domain}" "${app}"
|
||||
|
||||
if ! $upgrade; then
|
||||
ynh_app_setting_set $app final_path $final_path
|
||||
|
||||
# Save arguments
|
||||
ynh_app_setting_set $app service_enabled 0
|
||||
ynh_app_setting_set $app server_name none
|
||||
ynh_app_setting_set $app server_port 1194
|
||||
ynh_app_setting_set $app server_proto udp
|
||||
ynh_app_setting_set $app ip6_addr none
|
||||
ynh_app_setting_set $app ip6_net none
|
||||
ynh_app_setting_set $app login_user "${login_user}"
|
||||
ynh_app_setting_set $app login_passphrase "${login_passphrase}"
|
||||
ynh_app_setting_set $app dns0 89.234.141.66
|
||||
ynh_app_setting_set $app dns1 2001:913::8
|
||||
|
||||
fi
|
||||
|
||||
# Install IPv6 scripts
|
||||
sudo install -o root -g root -m 0755 ../conf/ipv6_expanded /usr/local/bin/
|
||||
sudo install -o root -g root -m 0755 ../conf/ipv6_compressed /usr/local/bin/
|
||||
|
||||
# Install command-line cube file loader
|
||||
sudo install -o root -g root -m 0755 ../conf/ynh-vpnclient-loadcubefile.sh /usr/local/bin/
|
||||
|
||||
# Copy confs
|
||||
sudo mkdir -pm 0755 /var/log/nginx/
|
||||
sudo chown root:admins /etc/openvpn/
|
||||
sudo chmod 775 /etc/openvpn/
|
||||
sudo mkdir -pm 0755 /etc/yunohost/hooks.d/post_iptable_rules/
|
||||
|
||||
sudo install -b -o root -g admins -m 0664 ../conf/openvpn_client.conf.tpl /etc/openvpn/client.conf.tpl
|
||||
sudo install -o root -g root -m 0644 ../conf/openvpn_client.conf.tpl /etc/openvpn/client.conf.tpl.restore
|
||||
sudo install -b -o root -g root -m 0644 ../conf/nginx_vpnadmin.conf "/etc/nginx/conf.d/${domain}.d/vpnadmin.conf"
|
||||
sudo install -b -o root -g root -m 0644 ../conf/phpfpm_vpnadmin.conf /etc/php5/fpm/pool.d/vpnadmin.conf
|
||||
sudo install -b -o root -g root -m 0755 ../conf/hook_post-iptable-rules /etc/yunohost/hooks.d/90-vpnclient.tpl
|
||||
sudo install -b -o root -g root -m 0644 ../conf/openvpn@.service /etc/systemd/system/
|
||||
|
||||
# Copy web sources
|
||||
sudo mkdir -pm 0755 /var/www/vpnadmin/
|
||||
sudo cp -a ../sources/* /var/www/vpnadmin/
|
||||
|
||||
sudo chown -R root: /var/www/vpnadmin/
|
||||
sudo chmod -R 0644 /var/www/vpnadmin/*
|
||||
sudo find /var/www/vpnadmin/ -type d -exec chmod +x {} \;
|
||||
|
||||
# Create certificates directory
|
||||
sudo mkdir -pm 0770 /etc/openvpn/keys/
|
||||
sudo chown root:admins /etc/openvpn/keys/
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
sudo sed "s|<TPL:NGINX_LOCATION>|${path_url}|g" -i "/etc/nginx/conf.d/${domain}.d/vpnadmin.conf"
|
||||
sudo sed 's|<TPL:NGINX_REALPATH>|/var/www/vpnadmin/|g' -i "/etc/nginx/conf.d/${domain}.d/vpnadmin.conf"
|
||||
sudo sed 's|<TPL:PHP_NAME>|vpnadmin|g' -i "/etc/nginx/conf.d/${domain}.d/vpnadmin.conf"
|
||||
|
||||
#=================================================
|
||||
# PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
sudo sed 's|<TPL:PHP_NAME>|vpnadmin|g' -i /etc/php5/fpm/pool.d/vpnadmin.conf
|
||||
sudo sed 's|<TPL:PHP_USER>|admin|g' -i /etc/php5/fpm/pool.d/vpnadmin.conf
|
||||
sudo sed 's|<TPL:PHP_GROUP>|admins|g' -i /etc/php5/fpm/pool.d/vpnadmin.conf
|
||||
sudo sed 's|<TPL:NGINX_REALPATH>|/var/www/vpnadmin/|g' -i /etc/php5/fpm/pool.d/vpnadmin.conf
|
||||
|
||||
# Fix sources
|
||||
sudo sed "s|<TPL:NGINX_LOCATION>|${path_url}|g" -i /var/www/vpnadmin/config.php
|
||||
|
||||
# Copy init script
|
||||
sudo install -o root -g root -m 0755 ../conf/ynh-vpnclient /usr/local/bin/
|
||||
sudo install -o root -g root -m 0644 ../conf/ynh-vpnclient.service /etc/systemd/system/
|
||||
|
||||
# Copy checker timer
|
||||
sudo install -o root -g root -m 0755 ../conf/ynh-vpnclient-checker.sh /usr/local/bin/
|
||||
sudo install -o root -g root -m 0644 ../conf/ynh-vpnclient-checker.service /etc/systemd/system/
|
||||
sudo install -o root -g root -m 0644 ../conf/ynh-vpnclient-checker.timer /etc/systemd/system/
|
||||
|
||||
# Set default inits
|
||||
# The boot order of these services are important, so they are disabled by default
|
||||
@@ -177,19 +102,7 @@ sudo systemctl enable ynh-vpnclient-checker.service
|
||||
ynh_systemctl start ynh-vpnclient-checker.timer
|
||||
sudo systemctl enable ynh-vpnclient-checker.timer
|
||||
|
||||
if ! $upgrade; then
|
||||
ynh_systemctl start ynh-vpnclient
|
||||
|
||||
# Check configuration consistency
|
||||
|
||||
if [ -z "${crt_server_ca_path}" ]; then
|
||||
echo "WARNING: VPN Client is not started because you need to define a server CA through the web admin" >&2
|
||||
fi
|
||||
|
||||
if [ -z "${crt_client_key_path}" -a -z "${login_user}" ]; then
|
||||
echo "WARNING: VPN Client is not started because you need either a client certificate, either a username (or both)" >&2
|
||||
fi
|
||||
fi
|
||||
|
||||
sudo yunohost app ssowatconf
|
||||
|
||||
exit 0
|
||||
|
||||
8
scripts/prerequisites
Normal file
8
scripts/prerequisites
Normal file
@@ -0,0 +1,8 @@
|
||||
# Source me
|
||||
|
||||
# Check YunoHost version (firewall hook in Moulinette)
|
||||
ynh_version=$(sudo dpkg -l yunohost | grep ii | awk '{ print $3 }' | sed 's/\.//g')
|
||||
|
||||
if [ "${ynh_version}" -lt 240 ]; then
|
||||
echo "WARN: You need a YunoHost's version equals or greater than 2.4.0 for activating the firewalling" >&2
|
||||
fi
|
||||
@@ -48,18 +48,26 @@ sudo rm -f /tmp/.ynh-vpnclient-*
|
||||
|
||||
# Remove confs
|
||||
sudo rm -f /etc/openvpn/client.conf{.tpl,.tpl.restore,}
|
||||
sudo rm -f /etc/nginx/conf.d/${domain}.d/vpnadmin.conf
|
||||
sudo rm -f /etc/php5/fpm/pool.d/vpnadmin.conf
|
||||
sudo rm -f /etc/nginx/conf.d/${domain}.d/${app}.conf
|
||||
sudo rm -f /etc/php5/fpm/pool.d/${app}.conf
|
||||
sudo rm -f /etc/yunohost/hooks.d/90-vpnclient.tpl
|
||||
sudo rm -f /etc/systemd/system/openvpn@.service
|
||||
|
||||
# Remove certificates
|
||||
sudo rm -rf /etc/openvpn/keys/
|
||||
|
||||
# Remove packages
|
||||
ynh_remove_app_dependencies
|
||||
|
||||
# Restart services
|
||||
sudo systemctl restart php5-fpm
|
||||
sudo systemctl reload nginx
|
||||
|
||||
# Remove sources
|
||||
sudo rm -rf /var/www/vpnadmin/
|
||||
sudo rm -rf /var/www/${app}/
|
||||
|
||||
# Removed system user
|
||||
ynh_system_user_delete ${app}
|
||||
sudo rm -f /etc/sudoers.d/${app}_ynh
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "restore script is not implemented"
|
||||
exit 0
|
||||
#=================================================
|
||||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
@@ -19,12 +21,15 @@ source /usr/share/yunohost/helpers
|
||||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
#sysuser="${app}"
|
||||
sysuser="vpnclient" # XXX hard-coded variable
|
||||
|
||||
backup_dir="${1}/apps/vpnclient"
|
||||
|
||||
sudo mkdir -p /etc/openvpn/
|
||||
sudo cp -a "${backup_dir}/keys/" /etc/openvpn/
|
||||
sudo cp -a "${backup_dir}/client.conf.tpl" /etc/openvpn/
|
||||
sudo chown -R root:admins /etc/openvpn/keys/
|
||||
sudo chown -R root:${sysuser} /etc/openvpn/keys/
|
||||
|
||||
gitcommit=$(sudo grep revision /etc/yunohost/apps/vpnclient/status.json | sed 's/.*"revision": "\([^"]\+\)".*/\1/')
|
||||
tmpdir=$(mktemp -dp /tmp/ vpnclient-restore-XXXXX)
|
||||
@@ -37,3 +42,4 @@ bash ./upgrade
|
||||
|
||||
sudo rm -r "${tmpdir}/"
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -9,13 +9,6 @@
|
||||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# MANAGE SCRIPT FAILURE
|
||||
#=================================================
|
||||
|
||||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
@@ -29,41 +22,70 @@ final_path=$(ynh_app_setting_get $app final_path)
|
||||
server_name=$(ynh_app_setting_get $app server_name)
|
||||
|
||||
#=================================================
|
||||
# CHECK VERSION
|
||||
# SPECIAL UPGRADE FOR VERSIONS < 1.2.0
|
||||
#=================================================
|
||||
|
||||
ynh_abort_if_up_to_date
|
||||
# Apply renaming that occured in v1.2.0 ("vpnadmin" -> "${app}")
|
||||
if [ -f /etc/nginx/conf.d/${domain}.d/vpnadmin.conf ]; then
|
||||
sudo sed "s|/var/www/vpnadmin/|/var/www/${app}/|g" -i "/etc/nginx/conf.d/${domain}.d/vpnadmin.conf"
|
||||
sudo sed "s|vpnadmin.sock|${app}.sock|g" -i "/etc/nginx/conf.d/${domain}.d/vpnadmin.conf"
|
||||
mv /etc/nginx/conf.d/${domain}.d/vpnadmin.conf /etc/nginx/conf.d/${domain}.d/${app}.conf
|
||||
fi
|
||||
if [ -f /etc/php5/fpm/pool.d/vpnadmin.conf ]; then
|
||||
sudo sed "s|/var/www/vpnadmin/|/var/www/${app}/|g" -i /etc/php5/fpm/pool.d/vpnadmin.conf
|
||||
sudo sed "s|vpnadmin.sock|${app}.sock|g" -i /etc/php5/fpm/pool.d/vpnadmin.conf
|
||||
mv /etc/php5/fpm/pool.d/vpnadmin.conf /etc/php5/fpm/pool.d/${app}.conf
|
||||
fi
|
||||
test -d /var/www/vpnadmin && mv /var/www/vpnadmin /var/www/${app}
|
||||
|
||||
## Versions known to have a buggy backup script
|
||||
#buggy_versions="1.0.0 1.0.1 1.1.0"
|
||||
#curr_version=$(read_manifest version)
|
||||
#if echo $buggy_versions | grep -w $curr_version > /dev/null; then
|
||||
# echo "Your current version of ${app} is very old: ${curr_version}. Please ignore the next warning." >&2
|
||||
#fi
|
||||
#
|
||||
##=================================================
|
||||
## BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||
##=================================================
|
||||
#
|
||||
#ynh_backup_before_upgrade
|
||||
#ynh_clean_setup () {
|
||||
# ynh_restore_upgradebackup
|
||||
#}
|
||||
## Exit if an error occurs during the execution of the script
|
||||
#ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# DO UPGRADE
|
||||
#=================================================
|
||||
# INSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
|
||||
ynh_install_app_dependencies "$pkg_dependencies"
|
||||
|
||||
sudo mkdir -m 0700 -p /var/cache/labriqueinternet/vpnclient/
|
||||
sudo tar czf "/var/cache/labriqueinternet/vpnclient/rollback_$(date +%Y-%m-%d-%H%M%S).tgz" /etc/openvpn/ /etc/yunohost/apps/vpnclient/ &> /dev/null
|
||||
#=================================================
|
||||
# DEPLOY FILES FROM PACKAGE
|
||||
#=================================================
|
||||
|
||||
tmpdir=$(mktemp -dp /tmp/ vpnclient-upgrade-XXXXX)
|
||||
sudo cp -a /etc/yunohost/apps/vpnclient/settings.yml "${tmpdir}/"
|
||||
sudo cp -a /etc/openvpn/keys/ "${tmpdir}/"
|
||||
# Keep a copy of existing config files before overwriting them
|
||||
tmpdir=$(mktemp -d /tmp/vpnclient-upgrade-XXX)
|
||||
sudo cp -r /etc/openvpn/client* ${tmpdir}
|
||||
|
||||
if [ ! -e /etc/openvpn/client.conf.tpl.restore ] || ! cmp -s /etc/openvpn/client.conf.tpl{,.restore}; then
|
||||
sudo cp -a /etc/openvpn/client.conf.tpl "${tmpdir}/"
|
||||
fi
|
||||
# Deploy files from package
|
||||
vpnclient_deploy_files_and_services "${domain}" "${app}"
|
||||
|
||||
export VPNCLIENT_UPGRADE=1
|
||||
sudo bash /etc/yunohost/apps/vpnclient/scripts/remove &> /dev/null
|
||||
bash ./install "${domain}" "${path}" "${server_name}"
|
||||
# Restore previously existing config files
|
||||
sudo cp -r ${tmpdir}/client* /etc/openvpn/
|
||||
sudo rm -rf ${tmpdir}
|
||||
|
||||
sudo rmdir /etc/openvpn/keys/
|
||||
sudo cp -a "${tmpdir}/keys/" /etc/openvpn/keys/
|
||||
sudo cp -a "${tmpdir}/settings.yml" /etc/yunohost/apps/vpnclient/
|
||||
sudo cp -a "${tmpdir}/client.conf.tpl" /etc/openvpn/ 2> /dev/null
|
||||
sudo rm -r "${tmpdir}/"
|
||||
#=================================================
|
||||
# RELOAD RELEVANT SERVICES
|
||||
#=================================================
|
||||
|
||||
# Changes
|
||||
ynh_systemctl reload php5-fpm
|
||||
ynh_systemctl reload nginx
|
||||
|
||||
if [ -z "$(ynh_setting vpnclient dns0)" ]; then
|
||||
sudo yunohost app setting vpnclient dns0 -v 89.234.141.66
|
||||
sudo yunohost app setting vpnclient dns1 -v 2001:913::8
|
||||
fi
|
||||
|
||||
ynh_systemctl start ynh-vpnclient
|
||||
ynh_systemctl restart ynh-vpnclient
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -117,6 +117,11 @@ dispatch('/', function() {
|
||||
});
|
||||
|
||||
dispatch_put('/settings', function() {
|
||||
|
||||
if(!isset($_SERVER['HTTP_X_REQUESTED_WITH'])) {
|
||||
throw new Exception('CSRF protection');
|
||||
}
|
||||
|
||||
$service_enabled = isset($_POST['service_enabled']) ? 1 : 0;
|
||||
|
||||
if($service_enabled == 1) {
|
||||
|
||||
@@ -28,7 +28,7 @@ function tabsClick() {
|
||||
return false;
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
function ready() {
|
||||
$('.btn-group').button();
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
|
||||
@@ -73,11 +73,29 @@ $(document).ready(function() {
|
||||
$(choosertxtid).val($(this).val().replace(/^.*[\/\\]/, ''));
|
||||
});
|
||||
|
||||
$('#save').click(function() {
|
||||
$(this).prop('disabled', true);
|
||||
$('#form').on("submit", function(event) {
|
||||
event.preventDefault()
|
||||
$('#save').prop('disabled', true);
|
||||
$('#save-loading').show();
|
||||
$('#form').submit();
|
||||
});
|
||||
$.ajax({
|
||||
url: this.action,
|
||||
type: this.method,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
cache: false,
|
||||
data: new FormData(this),
|
||||
headers: {
|
||||
'X-Requested-With': 'jQuery',
|
||||
},
|
||||
timeout: 5000,
|
||||
dataType: "html",
|
||||
// success: function() {}, // XXX will never happen because the VPN connection will be restarted after the form is posted.
|
||||
complete: function() {
|
||||
console.log("Forcing page reload after a few seconds...");
|
||||
setTimeout(function() {document.location.reload();}, 45000)
|
||||
},
|
||||
});
|
||||
})
|
||||
|
||||
$('#status .close').click(function() {
|
||||
$(this).parent().hide();
|
||||
@@ -110,4 +128,6 @@ $(document).ready(function() {
|
||||
$('.enabled').show('slow');
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(ready)
|
||||
|
||||
@@ -200,7 +200,7 @@
|
||||
<div class="form-group">
|
||||
<label for="login_passphrase" class="col-sm-3 control-label"><?= _('Password') ?></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" data-toggle="tooltip" data-title="<?= _('Leave empty if not necessary') ?>" class="form-control" name="login_passphrase" id="login_passphrase" placeholder="XVCwSbDkxnqQ" value="<?= $login_passphrase ?>" />
|
||||
<input type="password" data-toggle="tooltip" data-title="<?= _('Leave empty if not necessary') ?>" class="form-control" name="login_passphrase" id="login_passphrase" placeholder="XVCwSbDkxnqQ" value="<?= $login_passphrase ?>" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user